Work on gibs and chasms
This commit is contained in:
@@ -7,6 +7,7 @@ Description : Simulation update
|
||||
-}
|
||||
module Dodge.Update (updateUniverse) where
|
||||
|
||||
import Dodge.Prop.Moving
|
||||
import Dodge.WorldEvent.Explosion
|
||||
import Dodge.Data.Object
|
||||
import Color
|
||||
@@ -278,6 +279,7 @@ functionalUpdate u =
|
||||
. over uvWorld updateFlames
|
||||
. over uvWorld updateShockwaves
|
||||
. over uvWorld updateBullets
|
||||
. over uvWorld updateDebris
|
||||
. over uvWorld updateEnergyBalls -- energybs can be created by bullets,
|
||||
-- so should probably be updated before bullets
|
||||
. over uvWorld updateRadarBlips
|
||||
@@ -598,6 +600,13 @@ updateBullets w = w' & cWorld . lWorld . bullets <>~ catMaybes ps
|
||||
mapAccumR updateBullet (w & cWorld . lWorld . bullets .~ []) $
|
||||
w ^. cWorld . lWorld . bullets
|
||||
|
||||
updateDebris :: World -> World
|
||||
updateDebris w = w' & cWorld . lWorld . debris <>~ catMaybes xs
|
||||
where
|
||||
(w', xs) =
|
||||
mapAccumR updateDebrisChunk (w & cWorld . lWorld . debris .~ []) $
|
||||
w ^. cWorld . lWorld . debris
|
||||
|
||||
updateTeslaArcs :: World -> World
|
||||
updateTeslaArcs = updateObjCatMaybes teslaArcs updateTeslaArc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user