Add z level to energy balls

This commit is contained in:
2025-08-04 22:49:36 +01:00
parent bde0fa2a5c
commit 09428f2707
14 changed files with 125 additions and 110 deletions
+16 -12
View File
@@ -15,8 +15,9 @@ drawEnergyBall eb = case _ebType eb of
drawExplosiveBall :: EnergyBall -> Picture
drawExplosiveBall eb =
setLayer BloomLayer
. setDepth 20
. uncurryV translate (_ebPos eb)
-- . setDepth 20
-- . uncurryV translate (_ebPos eb)
. translate3 (_ebPos eb)
. color white
$ thickCircle r x
where
@@ -27,9 +28,10 @@ drawExplosiveBall eb =
drawStaticBall :: EnergyBall -> Picture
drawStaticBall pt =
setLayer BloomNoZWrite
. setDepth 20
-- . setDepth (_ebZ pt + 20)
. uncurryV translate (_ebPos pt)
-- . setDepth 20
-- -- . setDepth (_ebZ pt + 20)
-- . uncurryV translate (_ebPos pt)
. translate3 (_ebPos pt)
$ circleSolidCol blue (withAlpha 0.5 white) 8
drawFlamelet :: Float -> Float -> EnergyBall -> Picture
@@ -40,13 +42,13 @@ drawFlamelet size rot pt =
, setLayer BloomNoZWrite pi2
]
where
z = 20
sp = _ebPos pt
siz2 = size + 0.2
time = _ebTimer pt
piu =
setDepth (z + 5)
. uncurryV translate sp
translate3 sp
-- setDepth (z + 5)
-- . uncurryV translate sp
. color
( mixColors
(fromIntegral (max 0 (time -2)))
@@ -61,8 +63,9 @@ drawFlamelet size rot pt =
. polygon
$ reverse (rectNSWE siz2 (- siz2) (- siz2) siz2)
pi2 =
setDepth (z + 5)
. uncurryV translate sp
translate3 sp
--setDepth (z + 5)
-- . uncurryV translate sp
. color
( mixColors
(fromIntegral (max 0 (time -2)))
@@ -78,8 +81,9 @@ drawFlamelet size rot pt =
. reverse
$ rectNSWE siz2 (- siz2) (- siz2) siz2
pic =
setDepth (z + 2)
. uncurryV translate sp
translate3 sp
--setDepth (z + 2)
-- . uncurryV translate sp
. color
( mixColors
(fromIntegral (max 0 (time -2)))