fix: 修复新波次开始后游戏阶段状态错误的问题
- 在 MissionComp 中新增波次时调用 enterPreparePhase 进入准备阶段 - 在 MissionMonComp 中检查战斗状态,避免波次结束后继续生成怪物 - 在 MissionCardComp 中监听新波次事件并进入准备阶段
This commit is contained in:
@@ -254,6 +254,7 @@ export class MissionComp extends CCComp {
|
||||
private onNewWave(event: string, data: any) {
|
||||
const wave = Number(data?.wave ?? 0);
|
||||
if (wave <= 0) return;
|
||||
this.enterPreparePhase();
|
||||
this.currentWave = wave;
|
||||
smc.vmdata.mission_data.level = wave;
|
||||
this.grantPrepareCoinByWave(wave);
|
||||
|
||||
Reference in New Issue
Block a user