aboutsummaryrefslogtreecommitdiff
path: root/src/Game/Entities.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-03-26 08:49:35 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-03-26 08:49:35 +0100
commit449dc21f1b48648c5e4abf1a6cace21176fa2226 (patch)
tree18b67359934694de20199e207dd0c9b33990e945 /src/Game/Entities.hs
parent11d2ed7f15a86dd465bc3456e3478e9ff03bf5d2 (diff)
downloadspace-plat-hs-449dc21f1b48648c5e4abf1a6cace21176fa2226.tar.gz
space-plat-hs-449dc21f1b48648c5e4abf1a6cace21176fa2226.zip
Support entities facing left
Perhaps it would be better to support "custom properties" in tiled, but this is OK for now.
Diffstat (limited to 'src/Game/Entities.hs')
-rw-r--r--src/Game/Entities.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Game/Entities.hs b/src/Game/Entities.hs
index 2f647d9..6506a60 100644
--- a/src/Game/Entities.hs
+++ b/src/Game/Entities.hs
@@ -44,8 +44,8 @@ mkEntities sprites m controls = do
pure $ Entities sprites playerRef (player : (entryEffect : entities))
where
toEntity :: IORef Entity -> M.Object -> IO Entity
- toEntity playerRef (M.SlimeEntity x y) = mkSlime sprites x y (collision playerRef 16) (M.isBlocked m)
- toEntity playerRef (M.RobotEntity x y) = mkRobot sprites x y (collision playerRef 24) (M.isBlocked m)
+ toEntity playerRef (M.SlimeEntity x y d) = mkSlime sprites x y d (collision playerRef 16) (M.isBlocked m)
+ toEntity playerRef (M.RobotEntity x y d) = mkRobot sprites x y d (collision playerRef 24) (M.isBlocked m)
toEntity playerRef (M.BatteryEntity x y) = mkBattery sprites x y (collision playerRef 16)
toEntity _ (M.PlayerEntity _ _) = error "Player already processed"