Cleanup barrels

This commit is contained in:
2025-06-14 23:08:11 +01:00
parent 5286485d62
commit 02498e5abb
14 changed files with 352 additions and 353 deletions
+15 -7
View File
@@ -1,6 +1,4 @@
module Dodge.EnergyBall.Draw (
drawEnergyBall,
) where
module Dodge.EnergyBall.Draw ( drawEnergyBall) where
import Dodge.Data.EnergyBall
import Geometry
@@ -11,12 +9,22 @@ drawEnergyBall eb = case _ebEff eb of
FlameletBall x a -> drawFlamelet x a eb
IncendiaryBall -> drawFlamelet 5 0 eb
ElectricalBall{} -> drawStaticBall eb
ExplosiveBall -> mempty
ExplosiveBall -> drawExplosiveBall eb
FlashBall -> mempty
drawStaticBall ::
EnergyBall ->
Picture
drawExplosiveBall :: EnergyBall -> Picture
drawExplosiveBall eb =
setLayer BloomLayer
. setDepth 20
. uncurryV translate (_ebPos eb)
. color white
$ thickCircle r x
where
x = 1 + 3 * (1 - (1-y**2))
r = 15 - (12 * y)
y = fromIntegral (_ebTimer eb - 10) / 10
drawStaticBall :: EnergyBall -> Picture
drawStaticBall pt =
setLayer BloomNoZWrite
. setDepth 20