Session quitting
This commit is contained in:
parent
2705959bfd
commit
4dce5bd4ca
7 changed files with 48 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ func _ready() -> void:
|
|||
Lobby.lobby_created.connect(show_host_buttons)
|
||||
Lobby.lobby_closed.connect(cleanup_lobby)
|
||||
Lobby.update_teams_state.connect(on_player_switched_team)
|
||||
Session.session_ended.connect(on_session_ended)
|
||||
|
||||
$Lobby.hide()
|
||||
$MainMenu.show()
|
||||
|
|
@ -98,3 +99,12 @@ func _on_join_defence_button_pressed() -> void:
|
|||
|
||||
func _on_join_spectators_button_pressed() -> void:
|
||||
Lobby.switch_team(Session.TEAMS.SPECTATE)
|
||||
|
||||
func on_session_ended() -> void:
|
||||
show()
|
||||
if Lobby.in_lobby:
|
||||
$MainMenu.hide()
|
||||
$Lobby.show()
|
||||
else:
|
||||
$MainMenu.show()
|
||||
$Lobby.hide()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue