Module

Control.Game

Package
purescript-game
Repository
3ddyy/purescript-game

#GameEvent Source

type GameEvent state = { eventType :: EventType, target :: EventTarget, update :: Event -> state -> Effect state, useCapture :: Boolean }

The type of events that can be used in Game

#Game Source

type Game state return = { display :: state -> Effect Unit, end :: state -> Maybe (Either Error return), events :: List (GameEvent state), gameWindow :: Window, init :: Effect state, update :: Seconds -> state -> Effect state }

The type of a game that can be run with game

#game Source

game :: forall a s. Game s a -> Aff a

Make an Aff that will start your game loop when run

Modules
Control.Game