MapPlayOptions beta
Interface of @v12-engine/client/app
export interface MapPlayOptionsWhat a game says of playing a map of its own made in the editor (see mapPlayScene)
Members
editor
editor?: string;The editor scene to go back to, from the debug panel. None when left out
id
id: string;The scene's id: what the game's editor scene names as its play
name
name: string;What the scene is called in the list of scenes
onStart
onStart?: (world: World, context: {
map: GameMap;
player: PlayerId;
}) => void | Promise<void>;What the game does once the world is made, and before anyone plays: computer players, a mission given, the first wave sent. Nothing when left out
player
player?: (map: GameMap) => PlayerId;Who the player at the screen is. The first player with a start when left out, or the first player of the map when none has one: a game that has its players decide nothing of the kind, a tower defense, says
rules
rules: Rules;The game's rules the map is played by
saves
saves?: boolean | NonNullable<GameScene['saves']>;Whether it is saved and loaded from the HUD: a save opens the scene again from it, and the world is loaded as it was, with the game's afterLoad (where it seats its computer players again, say), not start. name is what a save is called, autosave how it saves by itself (AutosaveOptions). No saving when left out
view
view: GameView;The game's view that draws the map