Fixes game over menu being hidden by snake and verifies compatibility with HTML5 export
parent
823d57a446
commit
8f6bc2c9a6
|
@ -14,3 +14,6 @@ export_presets.cfg
|
|||
.mono/
|
||||
data_*/
|
||||
mono_crash.*.json
|
||||
|
||||
# Export
|
||||
/Export/
|
||||
|
|
|
@ -33,5 +33,6 @@ text = "Restart"
|
|||
layout_mode = 2
|
||||
text = "Main Menu"
|
||||
|
||||
[connection signal="visibility_changed" from="." to="." method="update_score"]
|
||||
[connection signal="pressed" from="Restart" to="." method="restart"]
|
||||
[connection signal="pressed" from="MainMenu" to="." method="back"]
|
||||
|
|
|
@ -43,6 +43,7 @@ offset_right = 156.0
|
|||
offset_bottom = 197.0
|
||||
|
||||
[node name="GameOverMenu" parent="." instance=ExtResource("5_kry3j")]
|
||||
z_index = 1
|
||||
offset_left = 340.0
|
||||
offset_top = 173.0
|
||||
offset_right = 812.0
|
||||
|
|
|
@ -6,7 +6,8 @@ var main_menu : PackedScene = load("res://Scenes/main_menu.tscn")
|
|||
var score_label : Label = $FinalScore
|
||||
|
||||
func update_score() -> void:
|
||||
score_label.text = "Final Score\n{score}".format(GameManager)
|
||||
if score_label != null:
|
||||
score_label.text = "Final Score\n{score}".format(GameManager)
|
||||
|
||||
func restart():
|
||||
get_tree().change_scene_to_packed(level)
|
||||
|
|
Loading…
Reference in New Issue