actionrpg-heartbeast/ActionRPG-HeartBeast/Stats.gd
2024-11-10 14:05:00 -05:00

12 lines
198 B
GDScript

extends Node
export(int) var max_health = 1
onready var health = max_health setget set_health
signal no_health
func set_health(value):
health = value
if health <= 0:
emit_signal("no_health")