Teams🔗
Hérite: Resource
This class defines a Teams manager
Propriétés🔗
|
||
|
||
|
Méthodes🔗
_get(team_name: StringName) |
|
_set(key: StringName, team: Variant) |
|
keys() |
|
values() |
|
_iter_init(_arg: Variant) |
|
_iter_next(_arg: Variant) |
|
get_peer_team(peer_id: int) |
|
void |
erase_player(peer_id: 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) |
Signaux🔗
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.
Descriptions de propriété🔗
Dictionary _state = {} 🔗
Dictionary get_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!
There is currently no description for this property. Please help us by contributing one!
Descriptions de méthode🔗
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
This method retrieves the array of managed Team names.
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!
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!
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!