Separate out concrete part of world

This commit is contained in:
2022-07-25 12:10:50 +01:00
parent 3354d108be
commit b2efbd2b3e
134 changed files with 933 additions and 930 deletions
+3 -3
View File
@@ -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