diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2023-12-25 13:10:22 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2023-12-25 13:10:22 +0100 |
commit | c1f30a2905d7a44439c2c0797ddd87b58f79d724 (patch) | |
tree | ae973c30d87c3f24b0e778206a501a8dcd12ff73 /Global.gd | |
parent | d74263a17e98159b2e3176a5f8e1ff361909c210 (diff) |
level select input supportv2.1.0
Diffstat (limited to 'Global.gd')
-rw-r--r-- | Global.gd | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -7,7 +7,7 @@ signal game_ended() signal game_won() -var Levels = [ +var Levels = [ # should be 9 "Level_0001", "Level_0002", "Level_0003", @@ -15,7 +15,6 @@ var Levels = [ "Level_0005", "Level_0005", "Level_0004", - "Level_0003", "Level_0002", "Level_0001", ] @@ -85,7 +84,7 @@ func end_level(instance_level): for id in Network.players: rpc_id(id, "_update_level_map", instance_level.idx, global_level) - get_tree().change_scene_to_file("res://UI/LevelSelect.tscn") + (func(): get_tree().change_scene_to_file("res://UI/LevelSelect.tscn")).call_deferred() self.check_win() @@ -112,7 +111,7 @@ func end_game(): func _on_Network_game_ended(): - get_tree().change_scene_to_file("res://UI/GameOver.tscn") + (func(): get_tree().change_scene_to_file("res://UI/GameOver.tscn")).call_deferred() self.Level_Map = [] self.init() @@ -168,7 +167,7 @@ func check_win(): func check_win_timer(): var has_won = self.has_won() - if has_won: + if self.has_won(): emit_signal("game_won", Network.player) |