Create datatypes for radar sweeps
This commit is contained in:
@@ -5,6 +5,7 @@ Description : Simulation update
|
||||
-}
|
||||
module Dodge.Update ( updateUniverse ) where
|
||||
import Dodge.Data
|
||||
import Dodge.RadarSweep
|
||||
import Dodge.PosEvent
|
||||
import Dodge.Spark
|
||||
import Dodge.EnergyBall
|
||||
@@ -86,6 +87,7 @@ functionalUpdate cfig w = checkEndGame
|
||||
. dbArg _worldEvents
|
||||
. updateIMl _modifications _mdUpdate
|
||||
. updateSparks
|
||||
. updateRadarSweeps
|
||||
. updatePosEvents
|
||||
. updateFlames
|
||||
. updateEnergyBalls
|
||||
@@ -237,6 +239,10 @@ updateEnergyBalls :: World -> World
|
||||
updateEnergyBalls w = w' & energyBalls .~ catMaybes newebs
|
||||
where
|
||||
(w',newebs) = mapAccumR moveEnergyBall w $ _energyBalls w
|
||||
updateRadarSweeps :: World -> World
|
||||
updateRadarSweeps w = w' & radarSweeps .~ catMaybes newradarSweeps
|
||||
where
|
||||
(w',newradarSweeps) = mapAccumR updateRadarSweep w $ _radarSweeps w
|
||||
|
||||
updateSparks :: World -> World
|
||||
updateSparks w = w' & sparks .~ catMaybes newsparks
|
||||
|
||||
Reference in New Issue
Block a user