mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
12 lines
339 B
GDScript
12 lines
339 B
GDScript
extends EntityStateBar
|
|
class_name BossBar
|
|
|
|
@onready var nameLabel: Label = $"%name"
|
|
@onready var valueLabel: Label = $"%value"
|
|
|
|
func _process(delta):
|
|
super._process(delta)
|
|
if is_instance_valid(entity):
|
|
nameLabel.text = entity.displayName
|
|
valueLabel.text = "%.2f" % (entity.health / entity.fields[FieldStore.Entity.MAX_HEALTH] * 100)
|