Simplify clouds

This commit is contained in:
2025-06-24 09:42:51 +01:00
parent 366b998989
commit b1041d1eb0
12 changed files with 110 additions and 96 deletions
+8 -9
View File
@@ -1,13 +1,11 @@
-- | Creation of particles in the world.
module Dodge.WorldEvent.SpawnParticle (
makeGasCloud,
) where
module Dodge.WorldEvent.SpawnParticle (makeGasCloud) where
import Dodge.Data.World
import Geometry
import LensHelp
import Picture
import RandomHelp
--import Picture
--import RandomHelp
-- | At writing the radius is half the size of the effect area
makeGasCloud ::
@@ -20,18 +18,19 @@ makeGasCloud ::
makeGasCloud pos vel w =
w
& cWorld . lWorld . clouds .:~ theCloud
& randGen .~ g
where
-- & randGen .~ g
theCloud =
Cloud
{ _clPos = addZ 20 pos
, _clVel = addZ 0 vel
, _clPict = CloudColor 3 50 (withAlpha 0.5 col)
, _clRad = 10
-- , _clPict = CloudColor 50 -- (withAlpha 0.5 col)
, _clAlt = 25
, _clTimer = 400
, _clType = GasCloud
}
(col, g) = runState (takeOne [green, yellow]) $ _randGen w
-- (col, g) = runState (takeOne [green, yellow]) $ _randGen w
{- Attach poison cloud damage to creatures near cloud. -}