From a8091dc3c82a4d646e84b356c46319ba54847ce0 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 23 May 2023 21:54:53 +0100 Subject: Add deadly tiles in the blocked layer Currently supported by enemies. --- src/Game/Entities/Tracker.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Game/Entities/Tracker.hs') diff --git a/src/Game/Entities/Tracker.hs b/src/Game/Entities/Tracker.hs index ef7325f..80b8574 100644 --- a/src/Game/Entities/Tracker.hs +++ b/src/Game/Entities/Tracker.hs @@ -5,10 +5,10 @@ import Game.Entities.Runner import Game.Entities.Types import qualified Game.Sprites as S -mkTracker :: S.SpriteSheet -> Int -> Int -> Dir -> Collision -> Collision -> IsBlocked -> IO Entity -mkTracker sprites x y d playerCollision facingPlayerLower isBlocked = do +mkTracker :: S.SpriteSheet -> Int -> Int -> Dir -> Collision -> Collision -> IsBlocked -> IsBlocked -> IO Entity +mkTracker sprites x y d playerCollision facingPlayerLower isBlocked isBlockedDeadly = do s <- S.get sprites "tracker" - runner <- mkRunner sprites x y d playerCollision isBlocked + runner <- mkRunner sprites x y d playerCollision isBlocked isBlockedDeadly pure runner {sprite = s, update = updateTracker runner.update facingPlayerLower isBlocked} updateTracker :: (Entity -> IO Entity) -> Collision -> IsBlocked -> Entity -> IO Entity -- cgit v1.2.3