Game:

events: KEventHandler<GameEventMap>

Game global events.

gameObjEvents: KEventHandler<GameObjEventMap>

Where game object global events are stored.

sceneEvents: KEventController[]

Event Handlers that are cancelled on scene change.

root: GameObj<TimerComp>

The root game object, parent of all game objects.

gravity: Vec2 | null

The gravity vector of the game.

scenes: Record<string, SceneDef>

The scenes of the game.

sceneStack: Array<SceneState>

The scene stack that stores the scene states

currentScene: string | null

The current scene of the game.

layers: string[] | null

The layers of the game.

systems: System[]

All systems added to the game.

systemsByEvent: [ System[], System[], System[], System[], System[], System[] ]

The systems added to the game, sorted by event.

defRNG: RNG

The default RNG used by rng functions.

crashed: boolean

If game just crashed.

areaCount: number

How many areas are in the game.

fakeMouse: GameObj | null

Fake Mouse game obj.

retrieve(rect: Rect , retrieveCb: (obj: GameObj )=>void ): void

warned: Set<string>

Deprecated functions we already warned about.

The "Game" it's all the state related to the game running