From 1b05eefc7a5a4fb688d7b631529324ca08ed1a16 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Wed, 1 Mar 2023 23:11:31 +0000 Subject: Untangle state changes into actions WIP: still unclear if we really need the IORefs! --- src/Game/Entities/Types.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Game/Entities/Types.hs') diff --git a/src/Game/Entities/Types.hs b/src/Game/Entities/Types.hs index a50ab2d..e22032b 100644 --- a/src/Game/Entities/Types.hs +++ b/src/Game/Entities/Types.hs @@ -4,7 +4,7 @@ module Game.Entities.Types Collision, IsBlocked, Entities (..), - Spawn (..), + Action (..), Entity (..), ) where @@ -28,7 +28,7 @@ data Entities = Entities entities :: [Entity] } -data Spawn = DustEffectSpawn Int Int +data Action = ActionAddDustEffect Int Int | ActionAddBattery | ActionHitPlayer deriving (Show) data Entity = Entity { typ :: Type, @@ -42,5 +42,5 @@ data Entity = Entity sprite :: S.Sprite, update :: Entity -> IO Entity, destroy :: Bool, - spawns :: [Spawn] + actions :: [Action] } -- cgit v1.2.3