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/
 | 
					.mono/
 | 
				
			||||||
data_*/
 | 
					data_*/
 | 
				
			||||||
mono_crash.*.json
 | 
					mono_crash.*.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Export
 | 
				
			||||||
 | 
					/Export/
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,5 +33,6 @@ text = "Restart"
 | 
				
			||||||
layout_mode = 2
 | 
					layout_mode = 2
 | 
				
			||||||
text = "Main Menu"
 | 
					text = "Main Menu"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[connection signal="visibility_changed" from="." to="." method="update_score"]
 | 
				
			||||||
[connection signal="pressed" from="Restart" to="." method="restart"]
 | 
					[connection signal="pressed" from="Restart" to="." method="restart"]
 | 
				
			||||||
[connection signal="pressed" from="MainMenu" to="." method="back"]
 | 
					[connection signal="pressed" from="MainMenu" to="." method="back"]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,6 +43,7 @@ offset_right = 156.0
 | 
				
			||||||
offset_bottom = 197.0
 | 
					offset_bottom = 197.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[node name="GameOverMenu" parent="." instance=ExtResource("5_kry3j")]
 | 
					[node name="GameOverMenu" parent="." instance=ExtResource("5_kry3j")]
 | 
				
			||||||
 | 
					z_index = 1
 | 
				
			||||||
offset_left = 340.0
 | 
					offset_left = 340.0
 | 
				
			||||||
offset_top = 173.0
 | 
					offset_top = 173.0
 | 
				
			||||||
offset_right = 812.0
 | 
					offset_right = 812.0
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,8 @@ var main_menu : PackedScene = load("res://Scenes/main_menu.tscn")
 | 
				
			||||||
var score_label : Label = $FinalScore
 | 
					var score_label : Label = $FinalScore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func update_score() -> void:
 | 
					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():
 | 
					func restart():
 | 
				
			||||||
	get_tree().change_scene_to_packed(level)
 | 
						get_tree().change_scene_to_packed(level)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue