Add delay before game over
This commit is contained in:
+6
-3
@@ -269,9 +269,12 @@ markWallSeen w wl = w { _walls = IM.adjust mw (_wlID wl) $ _walls w }
|
||||
mw wl' = wl' {_wlSeen = True}
|
||||
|
||||
checkEndGame :: World -> World
|
||||
checkEndGame w
|
||||
| _crHP (you w) < 1 = w & sideEffects %~ ( . (menuLayers .~ [gameOverMenu]))
|
||||
| otherwise = w
|
||||
checkEndGame w = case _deathDelay w of
|
||||
Just x | x < 0 -> w & sideEffects %~ ( . (menuLayers .~ [gameOverMenu]))
|
||||
& deathDelay .~ Nothing
|
||||
Just _ -> w & deathDelay . _Just -~ 1
|
||||
_ | _crHP (you w) < 1 -> w & deathDelay ?~ 50
|
||||
_ -> w
|
||||
|
||||
updateGusts :: World -> World
|
||||
updateGusts w = w
|
||||
|
||||
Reference in New Issue
Block a user