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 --- Global.gd | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Global.gd') 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() -- cgit v1.2.3