diff options
Diffstat (limited to 'Scripts/game.gd')
-rw-r--r-- | Scripts/game.gd | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Scripts/game.gd b/Scripts/game.gd index 582a4da..f1520dd 100644 --- a/Scripts/game.gd +++ b/Scripts/game.gd @@ -1,7 +1,5 @@ extends Node2D -const NUM_LEVELS = 2 - # level control var current_level_id = 0 var levels = [] @@ -10,6 +8,7 @@ var post_game = false var scenes = [ preload("res://Levels/Tut01.tscn"), preload("res://Levels/Tut02.tscn"), + preload("res://Levels/Tut03.tscn"), preload("res://Levels/Level_test_2.tscn") ] @@ -52,7 +51,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 |