Files
loop/src/Dodge/WorldEvent/SpawnParticle.hs
T
2025-06-24 13:28:17 +01:00

29 lines
664 B
Haskell

-- | Creation of particles in the world.
module Dodge.WorldEvent.SpawnParticle (makeGasCloud) where
import Dodge.Data.World
import Geometry
import LensHelp
--import Picture
--import RandomHelp
-- | At writing the radius is half the size of the effect area
makeGasCloud ::
-- | Position
Point2 ->
-- | Velocity
Point2 ->
World ->
World
makeGasCloud pos vel = cWorld . lWorld . clouds .:~ theCloud
where
theCloud =
Cloud
{ _clPos = addZ 20 pos
, _clVel = addZ 0 vel
, _clTimer = 400
, _clType = GasCloud
}
{- Attach poison cloud damage to creatures near cloud. -}