diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-03-11 23:17:21 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-03-11 23:17:21 +0000 |
commit | 897bfe0f72ddc80a020a421cbe987b54716e571e (patch) | |
tree | 4fefcc434abf0e0699f40276efefa71a802457b5 /src/Game/Entities/Common.hs | |
parent | edc6b611de752a224082583cd00d19ee6da04c5e (diff) | |
download | space-plat-hs-897bfe0f72ddc80a020a421cbe987b54716e571e.tar.gz space-plat-hs-897bfe0f72ddc80a020a421cbe987b54716e571e.zip |
Exit transition
Diffstat (limited to 'src/Game/Entities/Common.hs')
-rw-r--r-- | src/Game/Entities/Common.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Game/Entities/Common.hs b/src/Game/Entities/Common.hs index 2e447f5..69786e5 100644 --- a/src/Game/Entities/Common.hs +++ b/src/Game/Entities/Common.hs @@ -30,7 +30,7 @@ collision :: IORef Entity -> Int -> Collision collision playerRef otherHeight other = do player <- readIORef playerRef pure $ - player.dir /= Dying + player.typ == TypePlayer && player.x + 4 < other.x + 12 && other.x + 4 < player.x + 12 && player.y + otherHeight - 4 < other.y + otherHeight |