This commit is contained in:
2022-07-24 13:53:35 +01:00
parent ac069d08f6
commit 2c1bc67a51
16 changed files with 185 additions and 199 deletions
+7 -7
View File
@@ -3,7 +3,7 @@ module Dodge.WorldEvent.SpawnParticle
( makeGasCloud
, makeStaticBall
, concBall
, randParticleAt
-- , randParticleAt
) where
import Dodge.Data
import RandomHelp
@@ -11,12 +11,12 @@ import Picture
import Geometry
import LensHelp
randParticleAt :: (Point2 -> State StdGen Particle) -> Point2 -> World -> World
randParticleAt f p w = w
& instantParticles .:~ thepart
& randGen .~ g
where
(thepart,g) = runState (f p) (_randGen w)
--randParticleAt :: (Point2 -> State StdGen Particle) -> Point2 -> World -> World
--randParticleAt f p w = w
-- & instantParticles .:~ thepart
-- & randGen .~ g
-- where
-- (thepart,g) = runState (f p) (_randGen w)
randEnergyBallAt :: (Point2 -> State StdGen EnergyBall) -> Point2 -> World -> World
randEnergyBallAt f p w = w
& energyBalls .:~ thepart