return to level menu after chapter is finished

This commit is contained in:
bleeptrack 2021-01-12 12:48:06 +01:00
parent fc2be5214e
commit 7b12cc1467
2 changed files with 9 additions and 2 deletions

View file

@ -124,9 +124,14 @@ func reload_level():
load_level(game.current_level)
func load_next_level():
game.current_level = (game.current_level + 1) % levels.chapters[game.current_chapter].levels.size()
game.current_level += 1
if game.current_level >= levels.chapters[game.current_chapter].levels.size():
back()
else:
load_level(game.current_level)
func show_win_status(win_states):
var all_won = true
var win_text = "\n\n"

View file

@ -179,9 +179,11 @@ size_flags_vertical = 3
margin_right = 633.0
margin_bottom = 60.0
rect_min_size = Vector2( 0, 60 )
size_flags_vertical = 3
size_flags_stretch_ratio = 0.0
custom_fonts/normal_font = ExtResource( 7 )
text = "Level name here!"
fit_content_height = true
__meta__ = {
"_edit_use_anchors_": false
}