Skip to content

GameStartContext ​

Interface of @v12-engine/engine

ts
export interface GameStartContext

What a game's start is told (Game.onStart): the map its world was made from, the player at the screen (in a page), the lobby's settings (on a server), and whether the world is new (fresh) or loaded from a save, which has everything a start gives already. Each host says what it knows; the rest is left out

Members ​

fresh ​

ts
fresh?: boolean;

Whether the world is new: false for one loaded from a save. True when left out

map ​

ts
map?: GameMap;

The map the world was made from; none for a world made in code

player ​

ts
player?: PlayerId;

The player at the screen, in a page

settings ​

ts
settings?: Record<string, string>;

What the lobby set, on a server