diff --git a/assets/script/game/map/MissionComp.ts b/assets/script/game/map/MissionComp.ts index 44b9b9d6..26c5793f 100644 --- a/assets/script/game/map/MissionComp.ts +++ b/assets/script/game/map/MissionComp.ts @@ -198,9 +198,11 @@ export class MissionComp extends CCComp { oops.message.dispatchEvent(GameEvent.MissionStart, {}); this.mission_start(); }, 0); + smc.map.MapView.scene.mapLayer.stopAnimations(); } onDestroy(){ + smc.map.MapView.scene.mapLayer.playAnimations() super.onDestroy(); if (this.start_btn && this.start_btn.isValid) { this.start_btn.off(NodeEventType.TOUCH_END, this.onStartFightBtnClick, this); diff --git a/assets/script/game/map/MissionHomeComp.ts b/assets/script/game/map/MissionHomeComp.ts index 6ba09bfb..9a8edae3 100644 --- a/assets/script/game/map/MissionHomeComp.ts +++ b/assets/script/game/map/MissionHomeComp.ts @@ -80,7 +80,7 @@ export class MissionHomeComp extends CCComp { this.node.active=false; // 隐藏 mapLayer 下的 main 节点 - smc.map.MapView.scene.mapLayer?.stopAnimations(); + } @@ -104,7 +104,7 @@ export class MissionHomeComp extends CCComp { home_active(){ this.uodate_data() this.node.active=true - smc.map.MapView.scene.mapLayer?.playAnimations(); + } /** 更新主页显示数据(预留) */