summaryrefslogtreecommitdiff
path: root/Network/Network.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Network/Network.gd')
-rw-r--r--Network/Network.gd6
1 files changed, 5 insertions, 1 deletions
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):