19 lines
468 B
Haskell
19 lines
468 B
Haskell
module Dodge.Wall.Dust (muchWlDustAt) where
|
|
|
|
import Data.Foldable
|
|
import Control.Lens
|
|
import Dodge.Data.World
|
|
import Dodge.WorldEvent.Cloud
|
|
import Geometry
|
|
import RandomHelp
|
|
|
|
muchWlDustAt :: Wall -> Point2 -> World -> World
|
|
muchWlDustAt wl p = flip (foldl' f) [10, 20 .. 100]
|
|
where
|
|
f w h =
|
|
w
|
|
& makeDustAt (_wlMaterial wl) 200 (addZ h (p +.+ off))
|
|
& randGen .~ g
|
|
where
|
|
(off, g) = runState (randInCirc 1) (_randGen w)
|