1
1
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:
2025-08-27 20:27:01 +08:00
parent b4d11ee98a
commit 54a4113394
10 changed files with 107 additions and 36 deletions
+2 -2
View File
@@ -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)