Game interface

Game lifecycle events and pause controls.

Methods

gameOver(): void
The user reached a game over event. Required

firstFrameReady(): void
Announces that the first frame is ready to be shown. Required

levelComplete(level: number): void
The user reached a level complete event. Required

onPause(callback: () => void): void
Subscribes to pause events. Required

onResume(callback: () => void): void
Subscribes to resume events. Required

ready(): void
The game has finished loading and is ready to play. Required.