diff options
author | IcECreAm777 <hgk.1998@googlemail.com> | 2023-07-09 15:12:49 +0200 |
---|---|---|
committer | IcECreAm777 <hgk.1998@googlemail.com> | 2023-07-09 15:12:49 +0200 |
commit | bcccb662566481ea5956e40086e894aa8543f665 (patch) | |
tree | 7d6d2c5d9aa9a640cbeef3637a53999b25ec31e3 /Scripts/game.gd | |
parent | 85574ecd2137fc0c56e183b6cfd18091be3b649d (diff) | |
download | 2023-bcccb662566481ea5956e40086e894aa8543f665.tar.gz 2023-bcccb662566481ea5956e40086e894aa8543f665.tar.bz2 2023-bcccb662566481ea5956e40086e894aa8543f665.zip |
tutorial levels finished
Diffstat (limited to '')
-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 |