diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-03-11 22:14:27 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-03-11 22:14:27 +0000 |
commit | 2330f10e9ee28cd6389fccf5f01467bedf6c0266 (patch) | |
tree | e712db91ca62392145e6b1037a83eab300b4a2c6 /src | |
parent | 45a103da2133b645fac9617cc97c11901d3e258f (diff) | |
download | space-plat-hs-2330f10e9ee28cd6389fccf5f01467bedf6c0266.tar.gz space-plat-hs-2330f10e9ee28cd6389fccf5f01467bedf6c0266.zip |
Add the exit it is drawn before any other entity
Diffstat (limited to 'src')
-rw-r--r-- | src/Game/Entities.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Game/Entities.hs b/src/Game/Entities.hs index bd9729b..b53e4e3 100644 --- a/src/Game/Entities.hs +++ b/src/Game/Entities.hs @@ -56,7 +56,7 @@ playerPosition (Entities _ _ entities) = addExit :: Entities -> Int -> Int -> IO Entities addExit es x y = do exit <- mkExit es.sprites x y (collision es.player 24) - pure es {entities = es.entities ++ [exit]} + pure es {entities = head es.entities : exit : tail es.entities} updateAll :: Entities -> GS.State -> IO (Entities, GS.State) updateAll es state = do |