Cleanup barrels
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user