aboutsummaryrefslogtreecommitdiff
path: root/src/Game/Entities/Common.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-03-11 23:17:21 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-03-11 23:17:21 +0000
commit897bfe0f72ddc80a020a421cbe987b54716e571e (patch)
tree4fefcc434abf0e0699f40276efefa71a802457b5 /src/Game/Entities/Common.hs
parentedc6b611de752a224082583cd00d19ee6da04c5e (diff)
downloadspace-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.hs2
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