diff options
author | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 12:20:31 +0200 |
---|---|---|
committer | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 12:20:31 +0200 |
commit | 9cb0b053b337742aae96517a8c5c4700698faa03 (patch) | |
tree | 3d64563a49f498b79dfced19b2371dd97797250f /godot/scenes/Game.gd | |
parent | 1cb66d602745d176b113e76a7f77bd007768b509 (diff) | |
download | 2022-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.gd | 9 |
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 |