aboutsummaryrefslogtreecommitdiff
path: root/src/Game
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-16 22:52:34 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-16 22:52:34 +0100
commit528154a4645fdb82f623655ded4319d72877444b (patch)
treed2319ca1877f38ab9ff5a44ecfe404c7ad6992fb /src/Game
parent5b13a8c276199f3ccdfdcb0d96dd7631b7e1b1fb (diff)
downloadspace-plat-hs-528154a4645fdb82f623655ded4319d72877444b.tar.gz
space-plat-hs-528154a4645fdb82f623655ded4319d72877444b.zip
Change stage using a simple transition
Diffstat (limited to 'src/Game')
-rw-r--r--src/Game/Entities.hs2
-rw-r--r--src/Game/State.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Game/Entities.hs b/src/Game/Entities.hs
index 6ddf589..578bf51 100644
--- a/src/Game/Entities.hs
+++ b/src/Game/Entities.hs
@@ -116,7 +116,7 @@ updateAll es state = do
((head ents) {typ = TypeEffect} : tail ents)
t
ActionEntryDone -> processActions s {GS.playState = GS.InPlay} ents t
- ActionExitDone -> processActions s {GS.playState = GS.ExitDone} ents t
+ ActionExitDone -> processActions s {GS.playState = GS.ExitDone 0} ents t
ActionAddBlast x y d playerCollision isBlocked -> do
blast <- mkBlast es.sprites x y d playerCollision isBlocked
processActions s (ents ++ [blast]) t
diff --git a/src/Game/State.hs b/src/Game/State.hs
index df2d4fa..5c9de0b 100644
--- a/src/Game/State.hs
+++ b/src/Game/State.hs
@@ -6,7 +6,7 @@ import qualified Game.Map as M
maxLives :: Int
maxLives = 4
-data PlayState = InPlay | IntoStage | ExitStarted | ExitDone | GameOver deriving (Eq)
+data PlayState = InPlay | IntoStage | ExitStarted | ExitDone Int | GameOver deriving (Eq)
data State = State
{ batteries :: Int,