mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-06 03:37:13 +08:00
refactor(Statemachine): 重构实体状态栏和Boss栏逻辑
将EntityStateBar的_ready逻辑移到EntityBase中统一管理 修改BossBar的更新逻辑从_physics_process改为_process 调整Wave配置中Boss的出现波次从8改为1
This commit is contained in:
@@ -4,11 +4,3 @@ class_name EntityStateBar
|
||||
@export var entity: EntityBase
|
||||
|
||||
@onready var healthBar: ColorBar = $"%health"
|
||||
|
||||
func _ready():
|
||||
if is_instance_valid(entity):
|
||||
entity.healthChanged.connect(
|
||||
func(health) -> void:
|
||||
healthBar.maxValue = entity.fields.get(FieldStore.Entity.MAX_HEALTH)
|
||||
healthBar.setCurrent(health)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user