Tutorial 18.3 Player Stats with HP Label
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user