Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SceneF a = SceneF {}
- data Scene = Scene (SceneF s)
- mkScene :: a -> (Input -> a -> Result (StackCommand, a)) -> (Renderer -> a -> IO ()) -> Scene
- data StackCommand
- updateScenes :: Input -> Stack Scene -> Result ([Request], Stack Scene)
- updateScene :: Input -> Scene -> Result ([Request], (StackCommand, Scene))
- renderTopScene :: Renderer -> Stack Scene -> IO ()
Documentation
Scene describes a generic interface for a game Scene * state: for the scene data * update: how to update the scene * render: how to render the scene
mkScene :: a -> (Input -> a -> Result (StackCommand, a)) -> (Renderer -> a -> IO ()) -> Scene Source #
Create a Scene from the interface
data StackCommand Source #
A command for the scene stack, to be returned by update
updateScenes :: Input -> Stack Scene -> Result ([Request], Stack Scene) Source #
Update the top state on the stack
updateScene :: Input -> Scene -> Result ([Request], (StackCommand, Scene)) Source #
Update an existentially quantified Scene