Cleanup
This commit is contained in:
+12
-12
@@ -62,8 +62,8 @@ updateUniverse u = case _menuLayers u of
|
||||
| i < 1 -> u & over uvWorld doWorldEvents
|
||||
| otherwise -> u & menuLayers %~ ( (WaitScreen s (i-1) :) . tail )
|
||||
(OptionScreen {_scOptionFlag = GameOverOptions} : _) -> u & uvWorld %~
|
||||
( updateParticles
|
||||
. (radarBlips .~ [])
|
||||
( --updateParticles
|
||||
(radarBlips .~ [])
|
||||
-- . updateIMl _props _pjUpdate
|
||||
. updateLightSources
|
||||
. updateClouds )
|
||||
@@ -96,7 +96,7 @@ functionalUpdate w = checkEndGame
|
||||
. over uvWorld updateFlames
|
||||
. over uvWorld updateShockwaves
|
||||
. over uvWorld updateEnergyBalls
|
||||
. over uvWorld updateParticles
|
||||
-- . over uvWorld updateParticles
|
||||
. over uvWorld updateBullets
|
||||
. over uvWorld updateRadarBlips
|
||||
. over uvWorld updateFlares
|
||||
@@ -285,10 +285,10 @@ updatePosEvents w = w' & posEvents .~ catMaybes newposEvents
|
||||
|
||||
|
||||
{- Apply internal particle updates, delete 'Nothing's. -}
|
||||
updateParticles :: World -> World
|
||||
updateParticles w = updateInstantParticles $ set particles (catMaybes ps) w'
|
||||
where
|
||||
(w',ps) = mapAccumR (\a b -> _ptUpdate b a b) w $ _particles w
|
||||
--updateParticles :: World -> World
|
||||
--updateParticles w = updateInstantParticles $ set particles (catMaybes ps) w'
|
||||
-- where
|
||||
-- (w',ps) = mapAccumR (\a b -> _ptUpdate b a b) w $ _particles w
|
||||
updateBeams :: World -> World
|
||||
updateBeams w = w
|
||||
& newBeams .~ WorldBeams [] [] [] []
|
||||
@@ -365,11 +365,11 @@ updateInstantBullets w = case _instantBullets w of
|
||||
ps -> let (w',ps') = mapAccumR updateBullet (w {_instantBullets=[]}) ps
|
||||
in updateInstantBullets $ w' & bullets .++~ catMaybes ps'
|
||||
|
||||
updateInstantParticles :: World -> World
|
||||
updateInstantParticles w = case _instantParticles w of
|
||||
[] -> w
|
||||
ps -> let (w',ps') = mapAccumR (\a b -> _ptUpdate b a b) (w {_instantParticles=[]}) ps
|
||||
in updateInstantParticles $ w' & particles .++~ catMaybes ps'
|
||||
--updateInstantParticles :: World -> World
|
||||
--updateInstantParticles w = case _instantParticles w of
|
||||
-- [] -> w
|
||||
-- ps -> let (w',ps') = mapAccumR (\a b -> _ptUpdate b a b) (w {_instantParticles=[]}) ps
|
||||
-- in updateInstantParticles $ w' & particles .++~ catMaybes ps'
|
||||
|
||||
updateMIM :: ASetter' World (IM.IntMap a) -> (a -> a -> Maybe a) -> World -> World
|
||||
updateMIM f up = f %~ IM.mapMaybe (dbArg up)
|
||||
|
||||
Reference in New Issue
Block a user