summaryrefslogtreecommitdiff
path: root/Global.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Global.gd')
-rw-r--r--Global.gd7
1 files changed, 7 insertions, 0 deletions
diff --git a/Global.gd b/Global.gd
index 7371ff5..ac637e3 100644
--- a/Global.gd
+++ b/Global.gd
@@ -21,6 +21,8 @@ var Level_Map = []
func _ready():
+ Network.connect("game_ended", self, "_on_game_end")
+
for level in self.Levels:
self.Level_Map.push_back({
time = 0,
@@ -110,3 +112,8 @@ func check_win():
if has_won:
emit_signal("game_won", Network.player)
+
+
+func _on_game_end():
+ self.Level_Map = []
+ self._ready()