From fc6bfa1ca5307e915d44eeac507ccc56ba01b487 Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 4 May 2020 21:31:42 +0200 Subject: [PATCH] fix state machine --- src/Affection/StateMachine.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Affection/StateMachine.hs b/src/Affection/StateMachine.hs index 1f14abf..7d9ab55 100644 --- a/src/Affection/StateMachine.hs +++ b/src/Affection/StateMachine.hs @@ -7,14 +7,14 @@ import Affection.Types import qualified SDL -- | Typeclass for simple scaffolding of a state machine -class StateMachine a where +class StateMachine us a where -- | State load routine - smLoad :: a -> Affection () + smLoad :: a -> us -> Affection () -- | state update routine - smUpdate :: a -> Double -> Affection () + smUpdate :: a -> us -> Double -> Affection () -- | State event handler routine - smEvent :: a -> [SDL.EventPayload] -> Affection () + smEvent :: a -> us -> [SDL.EventPayload] -> Affection () -- | State draw routine - smDraw :: a -> Affection () + smDraw :: a -> us -> Affection () -- | State clean routine - smClean :: a -> Affection () + smClean :: a -> us -> Affection ()