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/Slime.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Game/Entities/Slime.hs') diff --git a/src/Game/Entities/Slime.hs b/src/Game/Entities/Slime.hs index c102712..7607fb7 100644 --- a/src/Game/Entities/Slime.hs +++ b/src/Game/Entities/Slime.hs @@ -6,8 +6,8 @@ import Game.Entities.Const import Game.Entities.Types import qualified Game.Sprites as S -mkSlime :: S.SpriteSheet -> Int -> Int -> Collision -> IsBlocked -> IO Entity -mkSlime sprites x y playerCollision isBlocked = do +mkSlime :: S.SpriteSheet -> Int -> Int -> Dir -> Collision -> IsBlocked -> IO Entity +mkSlime sprites x y d playerCollision isBlocked = do s <- S.get sprites "slime" pure Entity @@ -19,7 +19,7 @@ mkSlime sprites x y playerCollision isBlocked = do set = 0, jumping = False, gravity = gravityOff, - dir = DirRight, + dir = d, sprite = s, update = updateSlime playerCollision isBlocked, destroy = False, -- cgit v1.2.3