diff options
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) |