From 7920e8758506cd46c58ea4889c9f4fb704abfd16 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 2 Jan 2021 15:31:54 +0100 Subject: Level Map HUD and game end trigger --- Network/Network.gd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Network') diff --git a/Network/Network.gd b/Network/Network.gd index 0f007b4..77630a7 100644 --- a/Network/Network.gd +++ b/Network/Network.gd @@ -82,11 +82,15 @@ sync func _start_game(): func end_game(winning_player): + emit_signal("game_ended", winning_player) + rpc("_end_game", winning_player) + + +sync func _end_game(winning_player): # TODO: change scene for all to win scene and set winning player id, # so it can be displayed with self.players print(winning_player) get_tree().change_scene("res://Network/Lobby.tscn") - pass func _player_connected(id): -- cgit v1.2.3