diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-03-26 08:49:35 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-03-26 08:49:35 +0100 |
commit | 449dc21f1b48648c5e4abf1a6cace21176fa2226 (patch) | |
tree | 18b67359934694de20199e207dd0c9b33990e945 /src/Game/Entities/Slime.hs | |
parent | 11d2ed7f15a86dd465bc3456e3478e9ff03bf5d2 (diff) | |
download | space-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/Slime.hs')
-rw-r--r-- | src/Game/Entities/Slime.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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, |