Add HUD component and update player state management for lives

This commit is contained in:
2025-04-27 02:02:03 +02:00
parent 0c1192536c
commit c3304408b9
10 changed files with 286 additions and 5 deletions

View File

@@ -1,9 +1,14 @@
class_name PlayerDeathComponent
extends Node
@onready var gm: GM = $"/root/GameManager"
func reset_scene() -> void:
get_tree().reload_current_scene()
func _on_health_component_on_death() -> void:
# todo: play audio on death
gm.remove_lives(1)
call_deferred("reset_scene")