wuwangdong 4 år sedan
förälder
incheckning
fb8cc5f076
2 ändrade filer med 24 tillägg och 17 borttagningar
  1. 22 17
      assets/script/game/data/GameData.ts
  2. 2 0
      assets/script/game/game/Game.ts

+ 22 - 17
assets/script/game/data/GameData.ts

@@ -139,6 +139,9 @@ export class GameData {
 
     public insertAdLimit = 0;
     public insertAdSwitch: string[] = [];
+
+    //是否在做订单刷新动画
+    public isDoOrderRefreshAni: boolean = false;
     /**
      * 初始化游戏数据:网络配置信息,用户信息
      * @returns 
@@ -928,21 +931,23 @@ export class GameData {
             //     this.doJudgeOrderLogic(haveEmpty);
             // }
             //let next1 = gData.pastureSystem.nextPasture(haveEmpty);
-            let next1 = gData.pastureSystem.nextPastureExtra();
-            if (!next1) {
-                //let next2 = gData.factorySystem.nextFactory(haveEmpty);
-                let next2 = gData.factorySystem.nextFactoryExtra();
-                if (!next2) {
-                    this.nextType = 0;
-                    //gData.gameData.nextMake = null;
-                }
-                else {
-                    //this.nextType = 3;
-                }
-            }
-            else {
-                //this.nextType = 2;
-            }
+
+            // let next1 = gData.pastureSystem.nextPastureExtra();
+            // if (!next1) {
+            //     //let next2 = gData.factorySystem.nextFactory(haveEmpty);
+            //     let next2 = gData.factorySystem.nextFactoryExtra();
+            //     if (!next2) {
+            //         this.nextType = 0;
+            //         //gData.gameData.nextMake = null;
+            //     }
+            //     else {
+            //         //this.nextType = 3;
+            //     }
+            // }
+            // else {
+            //     //this.nextType = 2;
+            // }
+            this.nextType = 0;
         }
         else {
             //this.nextType = 1;
@@ -2101,9 +2106,9 @@ class PlayerProp {
         gData.gameData.init_wallet_redMoney = true;
         mk.event.emit('refreshCoin');
 
-        if(this._redMoney >= 300000){
+        if(!mk.guide.isGuideComplete() && this._redMoney >= 300000){
             let isHaveUI = mk.ui.isPopPanel();
-            if(!isHaveUI){
+            if(!isHaveUI && !gData.gameData.isDoOrderRefreshAni){
                 mk.guide.open(14);
             }    
         }

+ 2 - 0
assets/script/game/game/Game.ts

@@ -1153,6 +1153,7 @@ export default class Game extends cc.Component {
             mk.ui.openPanel('module/reward/reward');
 
             if(isGame){
+                gData.gameData.isDoOrderRefreshAni = true;
                 this.node_crop.forEach((v) => {
                     v.active = false;
                 })
@@ -1178,6 +1179,7 @@ export default class Game extends cc.Component {
     }
 
     public showRefreshLogic() {
+        gData.gameData.isDoOrderRefreshAni = false;
         this.node_crop.forEach((v) => {
             v.active = true;
         })