feat: added main menu and game over

This commit is contained in:
Sara 2025-07-23 14:42:49 +02:00
parent c57a4c8bb9
commit 5b826cc23b
3 changed files with 42 additions and 1 deletions

View file

@ -7,6 +7,10 @@ script/source = "extends HealthStatus
func _on_health_changed(remaining: int, delta: int) -> void:
print(\"Player Health Changed:\", delta, \"remaining:\", remaining)
func _on_death() -> void:
get_tree().change_scene_to_file(\"res://menus/main_menu.tscn\")
"
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bxedw"]
@ -46,4 +50,5 @@ health = NodePath("../HealthStatus")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_eqqp1")
[connection signal="death" from="HealthStatus" to="HealthStatus" method="_on_death"]
[connection signal="health_changed" from="HealthStatus" to="HealthStatus" method="_on_health_changed"]