mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-03 19:04:40 +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)
|
load_level(game.current_level)
|
||||||
|
|
||||||
func load_next_level():
|
func load_next_level():
|
||||||
game.current_level = (game.current_level + 1) % levels.chapters[game.current_chapter].levels.size()
|
game.current_level += 1
|
||||||
load_level(game.current_level)
|
if game.current_level >= levels.chapters[game.current_chapter].levels.size():
|
||||||
|
|
||||||
|
back()
|
||||||
|
else:
|
||||||
|
load_level(game.current_level)
|
||||||
|
|
||||||
|
|
||||||
func show_win_status(win_states):
|
func show_win_status(win_states):
|
||||||
var all_won = true
|
var all_won = true
|
||||||
|
|
|
@ -179,9 +179,11 @@ size_flags_vertical = 3
|
||||||
margin_right = 633.0
|
margin_right = 633.0
|
||||||
margin_bottom = 60.0
|
margin_bottom = 60.0
|
||||||
rect_min_size = Vector2( 0, 60 )
|
rect_min_size = Vector2( 0, 60 )
|
||||||
|
size_flags_vertical = 3
|
||||||
size_flags_stretch_ratio = 0.0
|
size_flags_stretch_ratio = 0.0
|
||||||
custom_fonts/normal_font = ExtResource( 7 )
|
custom_fonts/normal_font = ExtResource( 7 )
|
||||||
text = "Level name here!"
|
text = "Level name here!"
|
||||||
|
fit_content_height = true
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue