Pass projectile object to draw function

This commit is contained in:
2021-05-24 14:21:13 +02:00
parent a15d592951
commit 38682049c4
10 changed files with 36 additions and 34 deletions
+2 -3
View File
@@ -42,7 +42,7 @@ For most menus the only way to change the world is using event handling. -}
update' :: World -> World
update' w = case _menuLayers w of
(WaitMessage s i: _)
| i < 1 -> w & doubleArgumentFor _worldEvents
| i < 1 -> w & dbArg _worldEvents
| otherwise -> w & menuLayers %~ ( (WaitMessage s (i-1) :) . tail )
(GameOverMenu : _) -> updateParticles
. updateProjectiles
@@ -60,7 +60,7 @@ update' w = case _menuLayers w of
. zoneCreatures
. updateWalls
. set worldEvents id
. doubleArgumentFor _worldEvents
. dbArg _worldEvents
. updateParticles
. updateProjectiles
. updateLightSources
@@ -83,7 +83,6 @@ update' w = case _menuLayers w of
where
(x,y) = cloudZoneOfPoint $ _clPos cr
cid = _clID cr
doubleArgumentFor f x = f x x
updateCreatureGroups :: World -> World
updateCreatureGroups w = w & creatureGroups %~