First (buggy) implementation of rewind gun

This commit is contained in:
2021-11-26 18:14:51 +00:00
parent 044a870412
commit 9057012bb2
6 changed files with 38 additions and 5 deletions
+6
View File
@@ -115,6 +115,7 @@ data World = World
, _config :: Configuration
, _preloadData :: PreloadData
, _savedWorlds :: M.Map SaveSlot World
, _rewindWorlds :: [World]
, _frameClock :: Int
}
@@ -421,12 +422,17 @@ data ItemDimension = ItemDimension
data ReloadType = ActiveReload | PassiveReload SoundID
-- I believe this is called every frame, not sure when though
data ItEffect = NoItEffect
| ItInvEffect
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
-- the Int is the items inventory position
,_itEffectCounter :: Int
}
| ItRewindEffect
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
,_itStoredWorlds :: [World]
}
| ItEffect
{_itInvEffect :: ItEffect -> Creature -> Int -> World -> World
,_itFloorEffect :: Int -> World -> World