mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-25 21:12:29 +08:00
feat: 更新UI组件,添加能量条和颜色条,优化能量管理逻辑
This commit is contained in:
@@ -4,8 +4,8 @@ class_name BossBar
|
||||
@onready var nameLabel: Label = $"%name"
|
||||
@onready var valueLabel: Label = $"%value"
|
||||
|
||||
func _process(delta):
|
||||
super._process(delta)
|
||||
func _physics_process(delta):
|
||||
super._physics_process(delta)
|
||||
if is_instance_valid(entity):
|
||||
nameLabel.text = entity.displayName
|
||||
valueLabel.text = "%.2f" % (entity.health / entity.fields[FieldStore.Entity.MAX_HEALTH] * 100)
|
||||
|
||||
Reference in New Issue
Block a user