From bcccb662566481ea5956e40086e894aa8543f665 Mon Sep 17 00:00:00 2001 From: IcECreAm777 Date: Sun, 9 Jul 2023 15:12:49 +0200 Subject: tutorial levels finished --- Scripts/game.gd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Scripts/game.gd') 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 -- cgit