From 449dc21f1b48648c5e4abf1a6cace21176fa2226 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sun, 26 Mar 2023 08:49:35 +0100 Subject: Support entities facing left Perhaps it would be better to support "custom properties" in tiled, but this is OK for now. --- src/Game/Entities.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Game/Entities.hs') 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" -- cgit v1.2.3