aboutsummaryrefslogtreecommitdiffstats
path: root/godot/scenes/Game.gd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--godot/scenes/Game.gd11
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()