aboutsummaryrefslogtreecommitdiffstats
path: root/godot/scenes/Game.gd
diff options
context:
space:
mode:
authorLibravatar IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com>2022-07-17 12:20:31 +0200
committerLibravatar IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com>2022-07-17 12:20:31 +0200
commit9cb0b053b337742aae96517a8c5c4700698faa03 (patch)
tree3d64563a49f498b79dfced19b2371dd97797250f /godot/scenes/Game.gd
parent1cb66d602745d176b113e76a7f77bd007768b509 (diff)
download2022-9cb0b053b337742aae96517a8c5c4700698faa03.tar.gz
2022-9cb0b053b337742aae96517a8c5c4700698faa03.tar.bz2
2022-9cb0b053b337742aae96517a8c5c4700698faa03.zip
fixed: bounce works again and +1 can't be activated twice in a row
gravity is deactivated for now
Diffstat (limited to 'godot/scenes/Game.gd')
-rw-r--r--godot/scenes/Game.gd9
1 files changed, 3 insertions, 6 deletions
diff --git a/godot/scenes/Game.gd b/godot/scenes/Game.gd
index d2dc2ed..56456c0 100644
--- a/godot/scenes/Game.gd
+++ b/godot/scenes/Game.gd
@@ -47,13 +47,8 @@ func _on_MainMenuButton_pressed():
func end_level():
- # save current strokes and reset
- strokes_per_level[current_level_id] = current_strokes
- current_strokes = 0
-
+ open_scoreboard()
post_game = true
-
- open_scoreboard()
func add_stroke():
@@ -84,6 +79,8 @@ func next_level():
levels[current_level_id].hide()
current_level_id = current_level_id + 1
+ current_strokes = 0
+
if current_level_id >= NUM_LEVELS:
get_tree().change_scene("res://scenes/levels/MainMenu.tscn")
return