Refactor, try to limit dependencies
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
module Dodge.Wall.Dust where
|
||||
import Dodge.Data
|
||||
|
||||
import Control.Lens
|
||||
import Dodge.Data.World
|
||||
import Dodge.WorldEvent.Cloud
|
||||
import Geometry
|
||||
import Control.Lens
|
||||
import RandomHelp
|
||||
|
||||
wlDustAt :: Wall -> Point2 -> World -> World
|
||||
@@ -11,12 +12,12 @@ wlDustAt wl = smokeCloudAt dustcol 20 200 1 . addZ 20
|
||||
dustcol = _wlColor wl & _4 .~ 1
|
||||
|
||||
muchWlDustAt :: Wall -> Point2 -> World -> World
|
||||
muchWlDustAt wl p = flip (foldr f) [10,20..100]
|
||||
muchWlDustAt wl p = flip (foldr f) [10, 20 .. 100]
|
||||
where
|
||||
f h w = w
|
||||
& smokeCloudAt dustcol 20 200 1 (addZ h (p +.+ off))
|
||||
& randGen .~ g
|
||||
f h w =
|
||||
w
|
||||
& smokeCloudAt dustcol 20 200 1 (addZ h (p +.+ off))
|
||||
& randGen .~ g
|
||||
where
|
||||
(off,g) = runState (randInCirc 1) (_randGen w)
|
||||
(off, g) = runState (randInCirc 1) (_randGen w)
|
||||
dustcol = _wlColor wl & _4 .~ 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user