Match🔗
Hérite: Node
There is currently no description for this class. Please help us by contributing one !
Propriétés🔗
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Dictionary [int, Player] |
|
|
|
Méthodes🔗
void |
set_state(new_state: MatchState) |
instantiate() static |
|
_populate_modes() static |
|
void |
_ready() |
void |
|
_on_player_spawn(data: Variant = null) |
|
_on_map_spawn(data: Variant = null) |
|
void |
|
get_spawn_position(peer_id: int) |
|
void |
start() |
void |
end() |
void |
pause() |
void |
_on_peer_disconnected(peer_id: int) |
void |
_on_state_changed(new_state: MatchState) |
void |
|
void |
|
void |
_spawn_ack(peer_id: int) |
void |
_spawn_unfreeze(peer_id: int) |
void |
switch_team(peer_id: int, to_team_name: String) |
void |
_on_team_added(team_name: String) |
void |
_on_team_erased(team_name: String) |
void |
_on_team_player_added(team_name: String, peer_id: int, username: String = "newblood") |
void |
_on_team_player_erased(team_name: String, peer_id: int) |
Signaux🔗
state_changed(new_state: MatchState) 🔗
Emitted after state is changed
Enumerations🔗
enum MatchState: 🔗
MatchState READY = 0
The match is ready to begin.
MatchState WARMUP = 1
A brief training session to prepare before it starts.
MatchState RUNNING = 2
The match is running as specified by a Ruleset.
MatchState PAUSED = 3
The match is paused (ex. a majority of players voted a pause).
MatchState ENDED = 4
The match has ended.
Constants🔗
scene = <Object> 🔗
There is currently no description for this constant. Please help us by contributing one!
Descriptions de propriété🔗
MatchState state = 0 🔗
void set_state(new_state: MatchState)
The current state of this Match
Array [Mode] modes = _populate_modes() 🔗
Statically initialized array of available Mode
The current Mode responsible for this Match behavior
The current Map used to dispute this Match
The Teams manager
The match timer for map state rotation
Scoreboard scoreboard = <unknown> 🔗
The Scoreboard to keep track of peer scores
MultiplayerSpawner map_spawner = <unknown> 🔗
There is currently no description for this property. Please help us by contributing one!
MultiplayerSpawner player_spawner = <unknown> 🔗
There is currently no description for this property. Please help us by contributing one!
MultiplayerSpawner objective_spawner = <unknown> 🔗
There is currently no description for this property. Please help us by contributing one!
Dictionary [int, Player] players = {} 🔗
The Player.peer_id to Player instance map (set registered on spawn)
Dictionary [int, Dictionary] spawn_acks = {} 🔗
The dictionary maintained by the server to track peer readyness on spawn so that the server can tell everyone to start local prediction
Descriptions de méthode🔗
void set_state(new_state: MatchState) 🔗
There is currently no description for this method. Please help us by contributing one!
There is currently no description for this method. Please help us by contributing one!
Array [Mode] _populate_modes() static 🔗
This method loads available match modes when the game is initialized
void _ready() 🔗
There is currently no description for this method. Please help us by contributing one!
void setup(map_id: int, p_mode: int) 🔗
Starts the match as specified by p_map and p_mode
Player _on_player_spawn(data: Variant = null) 🔗
This method runs authority and client peers when a Player is spawned by player_spawner
Map _on_map_spawn(data: Variant = null) 🔗
There is currently no description for this method. Please help us by contributing one!
Called by client peers to request the server to spawn a new player in the Match scene.
Vector3 get_spawn_position(peer_id: int) 🔗
There is currently no description for this method. Please help us by contributing one!
void start() 🔗
There is currently no description for this method. Please help us by contributing one!
void end() 🔗
Stops the Match
void pause() 🔗
Pause the Match (ex. when most peers voted for a pause)
void _on_peer_disconnected(peer_id: int) 🔗
There is currently no description for this method. Please help us by contributing one!
void _on_state_changed(new_state: MatchState) 🔗
Emitted on the server when the state changes
void _on_warmup_timeout() 🔗
There is currently no description for this method. Please help us by contributing one!
void _on_match_timeout() 🔗
There is currently no description for this method. Please help us by contributing one!
void _spawn_ack(peer_id: int) 🔗
This is called by players when they spawn to ack it to the server. When all peers have sent an ack then server send a global _spawn_unfreeze rpc
void _spawn_unfreeze(peer_id: int) 🔗
This method is called by the match authority when all peers have recognized a new player's node spawn. See the _spawn_ack rpc and spawn_acks.
void switch_team(peer_id: int, to_team_name: String) 🔗
This method switch a peer_id to the specified team along with its score.
void _on_team_added(team_name: String) 🔗
This method is called when the Teams.team_addded signal is emitted.
void _on_team_erased(team_name: String) 🔗
There is currently no description for this method. Please help us by contributing one!
void _on_team_player_added(team_name: String, peer_id: int, username: String = "newblood") 🔗
This method is called when the Team.player_added signal is emitted.
void _on_team_player_erased(team_name: String, peer_id: int) 🔗
This method is called when the Teams.Team signal is emitted.