Simplify clouds
This commit is contained in:
@@ -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. -}
|
||||
|
||||
Reference in New Issue
Block a user