Separate out concrete part of world
This commit is contained in:
@@ -17,7 +17,7 @@ makeFlamelet
|
||||
-> World
|
||||
makeFlamelet (V2 x y) z vel size time w = w
|
||||
& randGen .~ g
|
||||
& energyBalls .:~ EnergyBall
|
||||
& cWorld . energyBalls .:~ EnergyBall
|
||||
{ _ebVel = vel
|
||||
, _ebColor = red
|
||||
, _ebPos = V2 x y
|
||||
@@ -39,7 +39,7 @@ moveEnergyBall w eb
|
||||
|
||||
|
||||
incBallAt :: Point2 -> World -> World
|
||||
incBallAt p w = w & energyBalls .:~ theincball
|
||||
incBallAt p w = w & cWorld . energyBalls .:~ theincball
|
||||
& randGen .~ g
|
||||
where
|
||||
(theincball,g) = runState thestate (_randGen w)
|
||||
@@ -58,6 +58,6 @@ incBallAt p w = w & energyBalls .:~ theincball
|
||||
|
||||
ebFlicker :: EnergyBall -> World -> World
|
||||
ebFlicker pt
|
||||
| _ebTimer pt `mod` 7 == 0 = tempLightSources
|
||||
| _ebTimer pt `mod` 7 == 0 = cWorld . tempLightSources
|
||||
.:~ tlsTimeRadColPos 1 70 (0.5 *.*.* xyzV4 (_ebColor pt)) (addZ 20 $ _ebPos pt)
|
||||
| otherwise = id
|
||||
|
||||
Reference in New Issue
Block a user