1
1
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:
2025-08-28 07:28:11 +08:00
parent 8e4b560e82
commit ef03aa2922
4 changed files with 19 additions and 12 deletions
-8
View File
@@ -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)
)