1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 23:11:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Statemachine/EntityStateBar.gd
T

12 lines
282 B
GDScript
Raw Normal View History

extends Node
class_name EntityStateBar
2025-08-26 09:24:09 +08:00
@export var entity: EntityBase
2025-08-26 11:39:47 +08:00
@onready var healthBar: ColorBar = $"%health"
2025-08-26 09:24:09 +08:00
func _process(_delta):
if is_instance_valid(entity):
healthBar.maxValue = entity.fields.get(FieldStore.Entity.MAX_HEALTH)
2025-08-26 09:24:09 +08:00
healthBar.setCurrent(entity.health)