From 9ffa3f57067598acfbe5196a4452b225ab295b83 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Wed, 19 Apr 2023 23:16:22 +0100 Subject: Added "runner" enemy --- src/Game/Entities/Common.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Game/Entities/Common.hs') diff --git a/src/Game/Entities/Common.hs b/src/Game/Entities/Common.hs index 661fe07..eb84400 100644 --- a/src/Game/Entities/Common.hs +++ b/src/Game/Entities/Common.hs @@ -5,6 +5,7 @@ module Game.Entities.Common inLine, updateFrame, updateGravity, + turn, ) where @@ -13,6 +14,11 @@ import Game.Entities.Const import Game.Entities.Types import qualified Game.Sprites as S +-- | Return the opposite direction. +turn :: Dir -> Dir +turn DirRight = DirLeft +turn DirLeft = DirRight + -- | Convert direction into a sprite set. toSpriteSet :: Dir -> Int toSpriteSet DirRight = 0 -- cgit v1.2.3