fix(hero): 修复复活后碰撞体和UI未恢复的问题

- 在 HeroViewComp.alive() 中恢复碰撞体启用状态和顶部UI节点
- 在 HeroAtkSystem 中先触发死亡技能再检查复活,确保亡语效果正确触发
- 重构死亡处理逻辑,将死亡技能触发分离到独立方法
This commit is contained in:
panw
2026-04-23 10:07:45 +08:00
parent 7c78be0a43
commit 76772a1102
2 changed files with 39 additions and 21 deletions

View File

@@ -392,11 +392,17 @@ export class HeroViewComp extends CCComp {
this.model.is_dead=false
this.model.is_count_dead=false
this.deadCD = 0;
// this.status_change("idle");
// this.top_node.active=true
// this.setTopBarOpacity(false);
// this.lastBarUpdateTime=0
// 恢复碰撞体
const collider = this.node.getComponent(Collider2D);
if (collider) {
collider.enabled = true;
}
// 恢复UI
this.top_node.active = true;
this.status_change("idle");
}