This commit is contained in:
2022-07-19 14:26:10 +01:00
parent 0a7922ec5e
commit 8ee4d2e0f2
6 changed files with 68 additions and 78 deletions
+14 -3
View File
@@ -5,10 +5,21 @@ import Picture
drawEnergyBall :: EnergyBall -> Picture
drawEnergyBall = drawFlameletEB
drawEnergyBall eb = case _ebEff eb of
(ELECTRICAL,_) -> drawStaticBall eb
(FLAMING,_) -> drawFlamelet eb
_ -> error "don't know how to draw an energy ball of this type"
drawFlameletEB :: EnergyBall -> Picture
drawFlameletEB pt = pictures
drawStaticBall
:: EnergyBall
-> Picture
drawStaticBall pt = setLayer BloomNoZWrite
. setDepth (_ebZ pt + 20)
. uncurryV translate (_ebPos pt)
$ circleSolidCol (_ebColor pt) (withAlpha 0.5 white) (_ebWidth pt+5)
drawFlamelet :: EnergyBall -> Picture
drawFlamelet pt = pictures
[ setLayer BloomLayer pic
, setLayer BloomNoZWrite piu
, setLayer BloomNoZWrite pi2