summaryrefslogtreecommitdiff
path: root/Global.gd
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2021-01-02 15:31:54 +0100
committerDaniel Weipert <code@drogueronin.de>2021-01-02 15:31:54 +0100
commit7920e8758506cd46c58ea4889c9f4fb704abfd16 (patch)
treec64c8cf57ef906123d6989742baaee97dcc7947d /Global.gd
parentebae6d04ffc95c6648e863d3de71835f6cd4be96 (diff)
Level Map HUD and game end trigger
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()