refactor: 优化战斗流程与英雄死亡处理逻辑

1. 移除HeroAttrsComp中多余的空行
2. 修改英雄死亡处理:直接销毁实体而非移至墓地
3. 调整波次更迭逻辑:直接进入BattleStart而非PrepareStart
4. 简化fight_ready方法:移除死亡英雄复活入场逻辑
5. 调整抽卡面板与卡牌池逻辑:战斗阶段保留抽卡面板且仅刷英雄卡
6. 将enterPreparePhase改为public方法
This commit is contained in:
walkpan
2026-05-15 19:00:11 +08:00
parent c912e446b1
commit 882f2b8536
5 changed files with 13 additions and 37 deletions

View File

@@ -446,14 +446,13 @@ export class HeroViewComp extends CCComp {
}
if(this.model.fac === FacSet.HERO){
// 英雄移到玩家看不到的墓地
this.node.setPosition(v3(-2000, -2000, 0));
// 英雄直接销毁,不再进入墓地
const collider = this.node.getComponent(Collider2D);
if (collider) {
collider.enabled = false;
}
// 隐藏UI
this.top_node.active = false;
this.ent.destroy();
} else {
// 🔥 方案B治理性措施 - 在销毁实体前先禁用碰撞体,从源头减少"尸体"参与碰撞
const collider = this.node.getComponent(Collider2D);