MapPlayer beta
Interface of @v12-engine/engine
export interface MapPlayerA seat for a player of the map: the player's id, name, team and colour with the options for what they start with
Members
camera
camera?: string;Where their view starts, by the name of a camera of the map (MapCamera). Over their start when it has one
color
color: [number, number, number];The player's colour as red, green and blue in 0..1
controller
controller?: 'person' | 'computer' | 'nobody';Who plays them: a person, the computer, or nobody (an open slot left empty). The game's to say when left out: the game reads it (world.map.player(id)), the engine does nothing with it
data
data?: Record<string, unknown>;What the game's own fields for players were set to (defineMapField with for: 'player')
id
id: PlayerId;The player's id, the number units and entities are owned by
name
name: string;The player's name as lobbies show it
race
race?: string;The race they play, fixed by the map (a campaign's), of the game's races (Rules.races), or random: not chosen in a lobby. Left to the lobby, or the game's first, when left out
resources
resources?: Record<string, number>;What they start with, by resource id, over what the game gives everyone
start
start?: Vec2;Where their base goes, for a game that gives everyone a start
team
team: number;The player's team number; players of the same number are allies