GameConfig is the object you pass when contructing a new Game.
Hierarchy
- GameConfig
Index
Properties
Properties
Optional containerId
• containerId? : undefined | string
The ID of a container to create the canvas in
Optional create
• create? : undefined | function
create is a function which is called once, just before the game starts
running. You can use it to initialise game state, if needed.
Optional frameRate
• frameRate? : undefined | number
Sets the game’s frame rate. By default, this is set to 24.
Optional onDotClicked
• onDotClicked? : undefined | function
onDotClicked is a function which is called when the player clicks on a
dot.
Optional onKeyPress
• onKeyPress? : undefined | function
onKeyPress is a function which is called when the player presses one of
the arrow keys.
Optional update
• update? : undefined | function
update is repeatedly called as the game runs. You can use it to define
the main functionality of your game.