diff options
author | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 18:16:22 +0200 |
---|---|---|
committer | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 18:16:22 +0200 |
commit | 7ded947ef4bd9b4dc15201fc6c1cb8ab4ed4e80e (patch) | |
tree | c934885adc40558b24de920a4f7adf551781546e /godot/scenes/Game.gd | |
parent | 8f12028fdb872682e55e191bd8dec6e355b355d1 (diff) | |
download | 2022-7ded947ef4bd9b4dc15201fc6c1cb8ab4ed4e80e.tar.gz 2022-7ded947ef4bd9b4dc15201fc6c1cb8ab4ed4e80e.tar.bz2 2022-7ded947ef4bd9b4dc15201fc6c1cb8ab4ed4e80e.zip |
prepared every level
Diffstat (limited to 'godot/scenes/Game.gd')
-rw-r--r-- | godot/scenes/Game.gd | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/godot/scenes/Game.gd b/godot/scenes/Game.gd index 9a68659..6d74fd6 100644 --- a/godot/scenes/Game.gd +++ b/godot/scenes/Game.gd @@ -1,11 +1,10 @@ extends Spatial const NUM_LEVELS = 3 -const PAR = [5,8,10] +const PAR = [5,8,15] # level control var current_level_id = 0 -var levels = [] var post_game = false # stroke control @@ -14,7 +13,8 @@ var strokes_per_level = [0,0,0] var scenes = [ preload("res://scenes/levels/level1/level1.tscn"), - preload("res://scenes/levels/level2/level2.tscn") + preload("res://scenes/levels/level2/level2.tscn"), + preload("res://scenes/levels/level3/level3.tscn") ] # Called when the node enters the scene tree for the first time. @@ -83,15 +83,14 @@ func next_level(): post_game = false current_level_id += 1 - current_strokes = 0 - load_scene_by_index(current_level_id) - if current_level_id >= NUM_LEVELS: get_tree().change_scene("res://scenes/levels/MainMenu.tscn") return + load_scene_by_index(current_level_id) + close_scoreboard() $Evaluation.hide() |