feat(map): 优化战斗流程与卡牌系统交互
1. 第一波准备阶段首个英雄召唤后自动开战,移除手动点击开始按钮 2. 重构卡牌交互逻辑,移除上划召唤改为点击召唤 3. 新增英雄卡池显隐切换功能 4. 调整卡牌预制体尺寸与布局 5. 移除特定波次技能卡弹窗逻辑 6. 简化引导流程,不再弹出Guide4
This commit is contained in:
@@ -186,6 +186,8 @@ export class MissionComp extends CCComp {
|
||||
this.on(GameEvent.NewWave, this.onNewWave, this)
|
||||
this.on(GameEvent.DO_AD_BACK, this.do_ad, this)
|
||||
this.start_btn?.on(NodeEventType.TOUCH_END, this.onStartFightBtnClick, this)
|
||||
// 第一波准备阶段,首个英雄召唤后自动开始战斗(无需玩家点击开始按钮)
|
||||
oops.message.on(GameEvent.MasterCalled, this.onHeroSummoned, this);
|
||||
this.removeMemoryPanel()
|
||||
}
|
||||
|
||||
@@ -207,6 +209,7 @@ export class MissionComp extends CCComp {
|
||||
if (this.start_btn && this.start_btn.isValid) {
|
||||
this.start_btn.off(NodeEventType.TOUCH_END, this.onStartFightBtnClick, this);
|
||||
}
|
||||
oops.message.off(GameEvent.MasterCalled, this.onHeroSummoned, this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -699,6 +702,18 @@ export class MissionComp extends CCComp {
|
||||
this.to_fight();
|
||||
}
|
||||
|
||||
/**
|
||||
* 英雄召唤事件回调:
|
||||
* 第一波准备阶段(Prepare)只有第 1 波才会进入,
|
||||
* 此时首个英雄一旦召唤即自动开战,无需玩家点击开始按钮。
|
||||
* 后续波次走 PrepareStart 倒计时自动流转,不会进入 Prepare。
|
||||
*/
|
||||
private onHeroSummoned() {
|
||||
if (this.currentPhase !== MissionPhase.Prepare) return;
|
||||
if (!smc.mission.play || smc.mission.pause) return;
|
||||
this.to_fight();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 打开结算弹窗:
|
||||
|
||||
Reference in New Issue
Block a user