Module

Graphics.Glapple.Data.GameSpec

Package
purescript-glapple
Repository
yukikurage/purescript-glapple

#GameSpec Source

newtype GameSpec sprite gameState input

A pure version of GameSpecM.

Constructors

  • GameSpec { eventHandler :: Event -> gameState -> gameState, initGameState :: gameState, inputHandler :: input -> gameState -> gameState, render :: { globalTime :: Number, localTime :: Number } -> gameState -> Picture sprite }

#mkGameSpecM Source

mkGameSpecM :: forall gameState sprite input output. GameSpec sprite gameState input -> GameSpecM sprite gameState input output

Convert GameSpec to GameSpecM.

#mkInitGameStateM Source

mkInitGameStateM :: forall f a. Applicative f => a -> f a

#mkRenderM Source

mkRenderM :: forall sprite gameState i output. ({ globalTime :: Number, localTime :: Number } -> gameState -> Picture sprite) -> GlappleM sprite gameState i output (Picture sprite)

#mkHandlerM Source

mkHandlerM :: forall a sprite gameState i output. (a -> gameState -> gameState) -> a -> GlappleM sprite gameState i output Unit