affection-0.0.0.9: A simple Game Engine using SDL

Safe HaskellNone
LanguageHaskell2010

Affection.StateMachine

Synopsis

Documentation

class StateMachine a us where Source #

Typeclass for simple scaffolding of a state machine

Minimal complete definition

smLoad, smUpdate, smEvent, smDraw, smClean

Methods

smLoad :: a -> Affection us () Source #

State load routine

smUpdate :: a -> Double -> Affection us () Source #

state update routine

smEvent :: a -> [EventPayload] -> Affection us () Source #

State event handler routine

smDraw :: a -> Affection us () Source #

State draw routine

smClean :: a -> Affection us () Source #

State clean routine