vulkan-tutorial/extern/affection/src/Affection/StateMachine.hs
nek0 8c037f69ce Add 'extern/affection/' from commit '9b7b1c6167b4fa516b91759ca86139ede07f231d'
git-subtree-dir: extern/affection
git-subtree-mainline: f422f94794
git-subtree-split: 9b7b1c6167
2022-07-09 20:36:04 +02:00

21 lines
574 B
Haskell

{-# LANGUAGE MultiParamTypeClasses #-}
module Affection.StateMachine where
import Affection.Types
import qualified SDL
-- | Typeclass for simple scaffolding of a state machine
class StateMachine us a where
-- | State load routine
smLoad :: a -> us -> Affection ()
-- | state update routine
smUpdate :: a -> us -> Double -> Affection ()
-- | State event handler routine
smEvent :: a -> us -> [SDL.EventPayload] -> Affection ()
-- | State draw routine
smDraw :: a -> us -> Affection ()
-- | State clean routine
smClean :: a -> us -> Affection ()