Game interface

Game lifecycle events.

WARNING: any event handlers must be registered before calling GameSnacks.init.

Signature

interface Game

Method signatures

Name Description
onGameOver(handler) Sets the handler for when the user reaches a game over state.
onLevelComplete(handler) Sets the handler for when the user completes a level.
onReady(handler) Sets the handler for when the game has finished loading and is ready to play.