mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
12 lines
282 B
GDScript
12 lines
282 B
GDScript
extends Node
|
|
class_name EntityStateBar
|
|
|
|
@export var entity: EntityBase
|
|
|
|
@onready var healthBar: ColorBar = $"%health"
|
|
|
|
func _process(_delta):
|
|
if is_instance_valid(entity):
|
|
healthBar.maxValue = entity.fields.get(FieldStore.Entity.MAX_HEALTH)
|
|
healthBar.setCurrent(entity.health)
|