mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-12-20 20:33:11 +01:00
return to level menu after chapter is finished
This commit is contained in:
parent
fc2be5214e
commit
7b12cc1467
2 changed files with 9 additions and 2 deletions
|
@ -124,8 +124,13 @@ 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()
|
||||
load_level(game.current_level)
|
||||
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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue