diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-04-17 23:41:35 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-04-17 23:41:35 +0100 |
commit | 7a8af18d0e1003c26eb595b5faa71e51da6286a6 (patch) | |
tree | d94ea6897570e12d9c044c40e82e9c05921ba64d /src/Game/Entities/Types.hs | |
parent | d333eca8c0761e39781af0711a54044cd5ea3c10 (diff) | |
download | space-plat-hs-7a8af18d0e1003c26eb595b5faa71e51da6286a6.tar.gz space-plat-hs-7a8af18d0e1003c26eb595b5faa71e51da6286a6.zip |
Added new shooter enemy
Diffstat (limited to 'src/Game/Entities/Types.hs')
-rw-r--r-- | src/Game/Entities/Types.hs | 7 |
1 files changed, 6 insertions, 1 deletions
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 } |