Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions.

TeamsπŸ”—

Inherits: Resource

This class defines a Teams manager

PropertiesπŸ”—

Dictionary

_state

{}

Dictionary

_teams

{}

int

_iter_cursor

0

MethodenπŸ”—

Dictionary

get_state()

Variant

_get(team_name: StringName)

bool

_set(key: StringName, team: Variant)

Array

keys()

Array

values()

bool

_iter_init(_arg: Variant)

bool

_iter_next(_arg: Variant)

Team

_iter_get(_arg: Variant)

bool

add_team(key: String)

Teams

add_teams(team_names: Array [String])

Team

get_peer_team(peer_id: int)

bool

erase(team_name: String)

void

erase_player(peer_id: int)

int

size()

void

switch_team(peer_id: int, team_name: String)

void

_on_team_player_added(team_name: String, peer_id: int, username: String)

void

_on_team_player_erased(team_name: String, peer_id: int)


SignalsπŸ”—

team_added(team_name: String) πŸ”—

Emitted when a Team is created.


team_erased(team_name: String) πŸ”—

Emitted when a Team is removed.


player_added(team_name: String, peer_id: int, username: String) πŸ”—

Emitted when a Player is added to a Team.


player_erased(team_name: String, peer_id: int) πŸ”—

Emitted when a Player is removed from a Team.


EigenschaftsbeschreibungenπŸ”—

Dictionary _state = {} πŸ”—

There is currently no description for this property. Please help us by contributing one!


Dictionary _teams = {} πŸ”—

There is currently no description for this property. Please help us by contributing one!


int _iter_cursor = 0 πŸ”—

There is currently no description for this property. Please help us by contributing one!


MethodenbeschreibungenπŸ”—

Dictionary get_state() πŸ”—

There is currently no description for this method. Please help us by contributing one!


Variant _get(team_name: StringName) πŸ”—

Retrieves an Array of int by team_name.

var teams := Teams.new()
teams.add_team("Phoenix")
print(teams["Phoenix"]) # this calls `_get`

bool _set(key: StringName, team: Variant) πŸ”—

Sets a Team by name with an optional default.

var teams := Teams.new()
teams["Phoenix"] = Teams.Team.new("Phoenix") # this calls `_set`
teams["Phoenix"] = null # refcount for Team is now 0

Array keys() πŸ”—

This method retrieves the array of managed Team names.


Array values() πŸ”—

This method retrieves the array of managed Team.


bool _iter_init(_arg: Variant) πŸ”—

There is currently no description for this method. Please help us by contributing one!


bool _iter_next(_arg: Variant) πŸ”—

There is currently no description for this method. Please help us by contributing one!


Team _iter_get(_arg: Variant) πŸ”—

There is currently no description for this method. Please help us by contributing one!


bool add_team(key: String) πŸ”—

This method adds a new Team into the manager.


Teams add_teams(team_names: Array [String]) πŸ”—

This method adds new Team in batch from team_names.


Team get_peer_team(peer_id: int) πŸ”—

There is currently no description for this method. Please help us by contributing one!


bool erase(team_name: String) πŸ”—

There is currently no description for this method. Please help us by contributing one!


void erase_player(peer_id: int) πŸ”—

There is currently no description for this method. Please help us by contributing one!


int size() πŸ”—

The number of Team.


void switch_team(peer_id: int, team_name: String) πŸ”—

This method eases peer team switching by moving them to the specified team_name. It does not do anything if the peer is not already added to a Team, see Team.add.


void _on_team_player_added(team_name: String, peer_id: int, username: String) πŸ”—

There is currently no description for this method. Please help us by contributing one!


void _on_team_player_erased(team_name: String, peer_id: int) πŸ”—

There is currently no description for this method. Please help us by contributing one!