mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
7120eaa79e
refactor: 统一测试BOSS的wave配置 fix: 修正Parrier.gd中的launcher判断条件 perf: 调整MTY的攻击冷却时间和技能范围 style: 移除部分调试标记和冗余代码
19 lines
484 B
GDScript
19 lines
484 B
GDScript
extends CanvasItem
|
|
class_name EntityStateBar
|
|
|
|
@export var entity: EntityBase
|
|
@export var longer: bool = false
|
|
|
|
@onready var healthBar: ColorBar = $"%health"
|
|
@onready var levelLabel: Label = $"%level"
|
|
@onready var levelLabels: HBoxContainer = $"%levelLabel"
|
|
|
|
func _ready():
|
|
if longer:
|
|
healthBar.size.x *= 2
|
|
healthBar.position.x *= 2
|
|
func forceSync():
|
|
healthBar.maxValue = entity.fields[FieldStore.Entity.MAX_HEALTH]
|
|
healthBar.currentValue = entity.health
|
|
healthBar.forceSync()
|