Tutorial 18.3 Player Stats with HP Label

This commit is contained in:
Alan Youngblood
2024-11-24 12:41:42 -05:00
parent 24bc047855
commit 7713127e27
4 changed files with 38 additions and 1 deletions

View File

@@ -4,8 +4,10 @@ export(int) var max_health = 1
onready var health = max_health setget set_health
signal no_health
signal health_changed(value)
func set_health(value):
health = value
emit_signal("health_changed", health)
if health <= 0:
emit_signal("no_health")