Improve debris

This commit is contained in:
2022-06-16 12:24:09 +01:00
parent fa762c7687
commit aa29e5ddf2
14 changed files with 75 additions and 50 deletions
+11
View File
@@ -3,9 +3,20 @@ import Dodge.Data
import Dodge.WorldEvent.Cloud
import Geometry
import Control.Lens
import RandomHelp
wlDustAt :: Wall -> Point2 -> World -> World
wlDustAt wl = smokeCloudAt dustcol 20 200 1 . addZ 20
where
dustcol = _wlColor wl & _4 .~ 1
muchWlDustAt :: Wall -> Point2 -> World -> World
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
where
(off,g) = runState (randInCirc 1) (_randGen w)
dustcol = _wlColor wl & _4 .~ 1