diff options
Diffstat (limited to '')
-rw-r--r-- | Scripts/game.gd | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Scripts/game.gd b/Scripts/game.gd index 72a01e3..c9beed2 100644 --- a/Scripts/game.gd +++ b/Scripts/game.gd @@ -1,17 +1,16 @@ extends Node2D -const NUM_LEVELS = 2 - # level control var current_level_id = 0 var levels = [] var post_game = false var scenes = [ -# preload("res://Nodes/levels/level1/level1.tscn"), -# preload("res://Nodes/levels/level2/level2.tscn") - preload("res://Nodes/Level_test.tscn"), - preload("res://Nodes/Level_test_2.tscn") + preload("res://Levels/Tut01.tscn"), + preload("res://Levels/Tut02.tscn"), + preload("res://Levels/Tut03.tscn"), + preload("res://Levels/Level1.tscn"), + preload("res://Levels/Level2.tscn") ] # Called when the node enters the scene tree for the first time. @@ -53,7 +52,7 @@ func end_level(): func next_level(): current_level_id += 1 - if current_level_id >= NUM_LEVELS: + if current_level_id >= scenes.size(): get_tree().change_scene_to_file("res://Nodes/main_menu.tscn") return |