From 7a8af18d0e1003c26eb595b5faa71e51da6286a6 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 17 Apr 2023 23:41:35 +0100 Subject: Added new shooter enemy --- src/Game/Entities/Types.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Game/Entities/Types.hs') diff --git a/src/Game/Entities/Types.hs b/src/Game/Entities/Types.hs index 05b419e..05726a8 100644 --- a/src/Game/Entities/Types.hs +++ b/src/Game/Entities/Types.hs @@ -6,6 +6,7 @@ module Game.Entities.Types Entities (..), Action (..), Entity (..), + EntityData (..), ) where @@ -16,6 +17,8 @@ data Dir = DirRight | DirLeft deriving (Eq, Show, Ord) data Type = TypePlayer | TypePickup | TypeEffect | TypeEnemy deriving (Eq) +data EntityData = NoData | ShooterData {coolDown :: Int} + type Collision = Entity -> IO Bool type IsBlocked = Int -> Int -> Bool @@ -36,6 +39,7 @@ data Action | ActionExitStarted | ActionEntryDone | ActionExitDone + | ActionAddBlast Int Int Dir Collision IsBlocked data Entity = Entity { typ :: Type, @@ -50,5 +54,6 @@ data Entity = Entity sprite :: S.Sprite, update :: Entity -> IO Entity, destroy :: Bool, - actions :: [Action] + actions :: [Action], + dat :: EntityData } -- cgit v1.2.3