Team switch on half rounds
This commit is contained in:
parent
7aaa676f32
commit
72bfd798da
2 changed files with 47 additions and 0 deletions
|
|
@ -141,12 +141,15 @@ func end_round(win_team: int) -> void:
|
|||
if multiplayer.is_server():
|
||||
get_tree().create_timer(5).timeout.connect(start_round)
|
||||
end_round.rpc(win_team)
|
||||
if current_round == Lobby.half_rounds:
|
||||
Lobby.swap_teams()
|
||||
|
||||
if win_team == TEAMS.DEFENCE:
|
||||
defender_score += 1
|
||||
elif win_team == TEAMS.ATTACK:
|
||||
attacker_score += 1
|
||||
|
||||
|
||||
round_state = ROUND_STATES.AFTER_ROUND
|
||||
round_state_changed.emit(round_state)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue