wuwangdong 4 лет назад
Родитель
Сommit
afa3673548
37 измененных файлов с 1049 добавлено и 606 удалено
  1. 26 19
      assets/resources/data/guide_data.json
  2. 270 345
      assets/resources/game/prefab/game.prefab
  3. 5 5
      assets/resources/game/prefab/uiPanel/HarvestPanel.prefab
  4. 34 17
      assets/resources/module/speedUpUI/restoreProductTimes.prefab
  5. 2 2
      assets/resources/module/speedUpUI/speedUp.prefab
  6. 2 2
      assets/script/before/main/FactoryIcon.ts
  7. 19 4
      assets/script/before/main/FarmIcon.ts
  8. 1 1
      assets/script/before/main/PastureIcon.ts
  9. 74 18
      assets/script/before/view/data/HarvestData.ts
  10. 1 2
      assets/script/before/view/ui/HarvestPanel.ts
  11. 11 2
      assets/script/before/view/ui/PlantPanel.ts
  12. 6 0
      assets/script/game/component/TableView.ts
  13. 12 15
      assets/script/game/data/AdData.ts
  14. 10 3
      assets/script/game/data/GameData.ts
  15. 1 0
      assets/script/game/data/module/GuideData.ts
  16. 2 1
      assets/script/game/data/module/LineUpUIData.ts
  17. 1 1
      assets/script/game/data/module/RewardData.ts
  18. 8 0
      assets/script/game/game/FunBtns.ts
  19. 190 36
      assets/script/game/game/Game.ts
  20. 15 1
      assets/script/game/module/guide/Guide.ts
  21. 2 0
      assets/script/game/module/guide/GuideVO.ts
  22. 6 3
      assets/script/game/module/speedUpUI/ProductReward.ts
  23. 37 3
      assets/script/game/module/speedUpUI/RestoreProductTimes.ts
  24. 11 1
      assets/script/mk/system/GuideSystem.ts
  25. 1 1
      assets/script/mk/system/JsbSystem.ts
  26. 7 2
      assets/script/mk/system/UISystem.ts
  27. BIN
      build/jsb-link/assets/main/index.jsc
  28. 0 0
      build/jsb-link/assets/resources/config.json
  29. 0 0
      build/jsb-link/assets/resources/import/04/04dd6ff2-c365-488b-9c49-8994289ce473.json
  30. 0 0
      build/jsb-link/assets/resources/import/23/2301f946-ef9d-4d93-b296-1f8ff5b307d3.json
  31. 0 0
      build/jsb-link/assets/resources/import/85/85eaeddc-5fb5-4c16-9904-be1f708bfbab.json
  32. 0 0
      build/jsb-link/assets/resources/import/b4/b4dea4a9-29c8-46bc-a50d-5754afa7a2bd.json
  33. 0 0
      build/jsb-link/assets/resources/import/c2/c24623b9-b557-420c-bf8c-8927ea736fa1.json
  34. BIN
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/caches/build_file_checksums.ser
  35. 1 1
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr.java
  36. 292 119
      build/jsb-link/js backups (useful for debugging)/main.index.js
  37. 2 2
      packages-hot-update/cfg.json

+ 26 - 19
assets/resources/data/guide_data.json

@@ -1,6 +1,6 @@
 [
 	{
-		"id": "1_0",
+		"id": "10_0",
 		"trigger": "1",
 		"trNum": "0",
 		"btnEnable": "0",
@@ -12,10 +12,11 @@
 		"displayRect": "",
 		"clickRect": "all",
 		"finger": "",
-		"lagNext": "0"
+		"lagNext": "0",
+		"continue": "false"
 	},
 	{
-		"id": "1_1",
+		"id": "10_1",
 		"trigger": "1",
 		"btnEnable": "1",
 		"trNum": "0",
@@ -27,40 +28,43 @@
 		"displayRect": "",
 		"clickRect": "主界面层/game/功能按钮/底部按钮/中间按钮",
 		"finger": "100:20",
-		"lagNext": "0"
+		"lagNext": "0",
+		"continue": "false"
 	},
 	{
-		"id": "1_2",
+		"id": "10_2",
 		"trigger": "1",
 		"trNum": "0",
-		"btnEnable": "0",
+		"btnEnable": "1",
 		"trForm": "1",
 		"dialogPos": ":200::::",
 		"dialogPos1": "",
 		"dialogAlignment": "0",
 		"dialog": "<color=8A4312>点击<color=ff0000>收获</color>农作物</color>",
 		"displayRect": "0:0:250:180",
-		"clickRect": "all",
+		"clickRect": "event",
 		"finger": "",
-		"lagNext": "0"
+		"lagNext": "0",
+		"continue": "false"
 	},
 	{
-		"id": "1_3",
+		"id": "10_3",
 		"trigger": "0",
 		"trNum": "0",
 		"btnEnable": "1",
 		"trForm": "1",
-		"dialogPos": ":700::::",
+		"dialogPos": ":800::::",
 		"dialogPos1": "",
 		"dialogAlignment": "0",
 		"dialog": "<color=8A4312>这里是订单,收获<color=ff0000>足额</color>\n农作物<color=ff0000>就可以领奖啦!</color></color>",
 		"displayRect": "",
 		"clickRect": "主界面层/game/node_ui/顶部个人信息/订单",
 		"finger": "",
-		"lagNext": "0"
+		"lagNext": "0",
+		"continue": "false"
 	},
 	{
-		"id": "1_4",
+		"id": "10_4",
 		"trigger": "1",
 		"trNum": "0",
 		"btnEnable": "1",
@@ -68,14 +72,15 @@
 		"dialogPos": ":200::::",
 		"dialogPos1": "",
 		"dialogAlignment": "0",
-		"dialog": "<color=8A4312>继续生产1次,很快就\n可以提现了!</color>",
+		"dialog": "<color=8A4312><color=ff0000>继续生产</c>,很快就可\n以完成订单了!</color>",
 		"displayRect": "",
 		"clickRect": "主界面层/game/功能按钮/底部按钮/中间按钮",
 		"finger": "100:20",
-		"lagNext": "0"
+		"lagNext": "0",
+		"continue": "false"
 	},
 	{
-		"id": "2_0",
+		"id": "11_0",
 		"trigger": "1",
 		"trNum": "0",
 		"btnEnable": "0",
@@ -83,14 +88,15 @@
 		"dialogPos": "::::-600:",
 		"dialogPos1": "",
 		"dialogAlignment": "0",
-		"dialog": "<color=8A4312>再收获1次,就可以完成\n订单,提现仅一步之遥!</color>",
+		"dialog": "<color=8A4312>再生产1次,就可以收获\n啦,完成订单立即<color=ff0000>提现</color>!</color>",
 		"displayRect": "",
 		"clickRect": "all",
 		"finger": "100:-280",
-		"lagNext": "0"
+		"lagNext": "0",
+		"continue": "false"
 	},
 	{
-		"id": "3_0",
+		"id": "12_0",
 		"trigger": "0",
 		"trNum": "0",
 		"btnEnable": "0",
@@ -102,6 +108,7 @@
 		"displayRect": "",
 		"clickRect": "主界面层/game/node_ui/顶部个人信息/订单",
 		"finger": "",
-		"lagNext": "0"
+		"lagNext": "0",
+		"continue": "false"
 	}
 ]

Разница между файлами не показана из-за своего большого размера
+ 270 - 345
assets/resources/game/prefab/game.prefab


+ 5 - 5
assets/resources/game/prefab/uiPanel/HarvestPanel.prefab

@@ -197,7 +197,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        109.802,
+        135.80200000000002,
         0,
         0,
         0,
@@ -2553,7 +2553,7 @@
     "asset": {
       "__uuid__": "04dd6ff2-c365-488b-9c49-8994289ce473"
     },
-    "fileId": "017uQvDQNLDZJxkg+Yat/R",
+    "fileId": "e6bV/EgFVKsZ6eVnVCmHNT",
     "sync": false
   },
   {
@@ -2664,7 +2664,7 @@
     "asset": {
       "__uuid__": "04dd6ff2-c365-488b-9c49-8994289ce473"
     },
-    "fileId": "77ZZvxLahJ+aDf4sIOh2Ib",
+    "fileId": "15fH/7xnpPR61/tcmO4JoI",
     "sync": false
   },
   {
@@ -2775,7 +2775,7 @@
     "asset": {
       "__uuid__": "04dd6ff2-c365-488b-9c49-8994289ce473"
     },
-    "fileId": "a5CatQDXRPKKPJZnjvyAXH",
+    "fileId": "95sGbj6wxI86+IAyddqDBy",
     "sync": false
   },
   {
@@ -3022,7 +3022,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        -413,
+        -383,
         0,
         0,
         0,

+ 34 - 17
assets/resources/module/speedUpUI/restoreProductTimes.prefab

@@ -24,9 +24,6 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 60
-      },
-      {
         "__id__": 61
       },
       {
@@ -34,10 +31,13 @@
       },
       {
         "__id__": 63
+      },
+      {
+        "__id__": 64
       }
     ],
     "_prefab": {
-      "__id__": 64
+      "__id__": 65
     },
     "_opacity": 255,
     "_color": {
@@ -101,7 +101,7 @@
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 59
+      "__id__": 60
     },
     "_opacity": 255,
     "_color": {
@@ -174,11 +174,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 57
+        "__id__": 58
       }
     ],
     "_prefab": {
-      "__id__": 58
+      "__id__": 59
     },
     "_opacity": 255,
     "_color": {
@@ -203,7 +203,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        27.286,
+        31.286,
         0,
         0,
         0,
@@ -805,7 +805,7 @@
     "asset": {
       "__uuid__": "85eaeddc-5fb5-4c16-9904-be1f708bfbab"
     },
-    "fileId": "bb4rdqISFE4qXP6edEde2n",
+    "fileId": "90mrdSk7dHaJbee3HsYZH7",
     "sync": false
   },
   {
@@ -914,7 +914,7 @@
     "asset": {
       "__uuid__": "85eaeddc-5fb5-4c16-9904-be1f708bfbab"
     },
-    "fileId": "a97F631OdLn7cOR1dKl4aE",
+    "fileId": "75NJ/+X1JGFbuAno3sRTqn",
     "sync": false
   },
   {
@@ -1023,7 +1023,7 @@
     "asset": {
       "__uuid__": "85eaeddc-5fb5-4c16-9904-be1f708bfbab"
     },
-    "fileId": "a5H0TzGeFI+o9dRtOZozjw",
+    "fileId": "9b/qqPFvxKAq9eUU512Dxr",
     "sync": false
   },
   {
@@ -1132,7 +1132,7 @@
     "asset": {
       "__uuid__": "85eaeddc-5fb5-4c16-9904-be1f708bfbab"
     },
-    "fileId": "94brUhiZpKZr1gpqgCQYDc",
+    "fileId": "0dzNz37FNC5YlCc+mLV4pm",
     "sync": false
   },
   {
@@ -1613,7 +1613,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 156.8,
+      "width": 165.58,
       "height": 56.4
     },
     "_anchorPoint": {
@@ -1665,8 +1665,8 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_string": "领取双倍",
-    "_N$string": "领取双倍",
+    "_string": "再加{0}点",
+    "_N$string": "再加{0}点",
     "_fontSize": 37.7,
     "_lineHeight": 40,
     "_enableWrapText": true,
@@ -2008,7 +2008,7 @@
       }
     ],
     "_prefab": {
-      "__id__": 56
+      "__id__": 57
     },
     "_opacity": 255,
     "_color": {
@@ -2101,10 +2101,24 @@
       "__id__": 1
     },
     "transition_type": 0,
-    "onComplete": [],
+    "onComplete": [
+      {
+        "__id__": 56
+      }
+    ],
     "_id": ""
   },
   {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "8ba093FAVJIK7+9OVVRKnD3",
+    "handler": "clickCloseBtn",
+    "customEventData": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
@@ -2246,6 +2260,9 @@
     "lbl_times": {
       "__id__": 27
     },
+    "lbl_double": {
+      "__id__": 41
+    },
     "_id": ""
   },
   {

+ 2 - 2
assets/resources/module/speedUpUI/speedUp.prefab

@@ -481,7 +481,7 @@
     "node_panel": {
       "__id__": 1
     },
-    "transition_type": 0,
+    "transition_type": 3,
     "onComplete": [],
     "_id": ""
   },
@@ -2759,7 +2759,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 71,
+      "width": 69,
       "height": 68
     },
     "_anchorPoint": {

+ 2 - 2
assets/script/before/main/FactoryIcon.ts

@@ -15,7 +15,7 @@ export class FactoryIcon extends cc.Component {
 
     public configID: number = 0;
     public sortID: number = 0;
-    private tab: ProductType = ProductType.bmhc;
+    public tab: ProductType = ProductType.bmhc;
 
     private _state: FactroyState = -1;
     public get state(): FactroyState { return this._state; }
@@ -199,7 +199,7 @@ export class FactoryIcon extends cc.Component {
     public canHarvest() {
         this.getComponent(MoveToCenter).move();
         gData.factorySystem.currSelectFactory = this;
-        gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node);
+        gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node, true);
     }
 
     public canClearSick() {

+ 19 - 4
assets/script/before/main/FarmIcon.ts

@@ -214,10 +214,16 @@ export class FarmIcon extends cc.Component {
         this.plantIcon.node.active = false;
 
         let config = gData.gameData.getProductMap(this.plantID);
-        let growSpan = Date.now() + config.time * 1000;
-        this.data.state = FarmState.Growing;
+        if(mk.guide.getCurGuideIdString() == "10_2")
+        {
+            this.data.growSpan = 0;
+            this.data.state = FarmState.Ripe;
+        }else{
+            let growSpan = Date.now() + config.time * 1000;
+            this.data.growSpan = growSpan;
+            this.data.state = FarmState.Growing;
+        }
         this.data.productID = this.plantID;
-        this.data.growSpan = growSpan;
         gData.gameData.setFarmDataMap(this.configID, this.data);
 
         gData.gameData.isProducting = false;
@@ -233,7 +239,7 @@ export class FarmIcon extends cc.Component {
 
     public canHarvest() {
         gData.farmSystem.currSelectFarm = this;
-        gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this), this.node);
+        gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this), this.node, true);
     }
 
     public canClearSick() {
@@ -241,4 +247,13 @@ export class FarmIcon extends cc.Component {
         mk.data.sendDataEvent(DataEventId.button_click, "生虫icon");
         gData.adClearSickData.openPanel(ProductType.nzw, this.configID);
     }
+
+    public clickGuideBtn()
+    {
+        if(mk.guide.isGuiding())
+        {
+            //gData.farmSystem.currSelectFarm = this;
+            gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this), this.node, false, true);
+        }
+    }
 }

+ 1 - 1
assets/script/before/main/PastureIcon.ts

@@ -293,7 +293,7 @@ export default class PastureIcon extends cc.Component {
 
     public canHarvest() {
         this.getComponent(MoveToCenter).move();
-        gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node);
+        gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node, true);
     }
 
     public canClearSick() {

+ 74 - 18
assets/script/before/view/data/HarvestData.ts

@@ -17,23 +17,46 @@ export default class HarvestData extends Data {
     init_reward = false;
     node_fly: cc.Node = null;
     isMatchOrder = false;
-    openPanel(configID, plantID, call, node) {
+    //是否是点击一键生产按钮
+    isTouchBtn = false;
+    isCdOver = true;
+    openPanel(configID, plantID, call, node, isTouchBtn =false, isTeach = false) {
+        if(!this.isCdOver)
+        {
+            return;
+        }
         this.configID = configID;
         this.plantID = plantID;
         this.call = call;
         this.node_fly = node;
+        this.isTouchBtn = isTouchBtn;
         this.config = gData.gameData.getProductMap(this.plantID);
         this.judgeIsMatchOrder();
 
-        let isTeaching = mk.guide.isGuiding();
-        let rand = Math.random();
-        let rate = gData.adData.getPerByEcpm(RateConfig.RC_superDouble);
-        if (!isTeaching && rand <= rate) {
-            mk.ui.openPanel('game/prefab/uiPanel/HarvestPanel');
-        } else {
+        if(!isTeach)
+        {
+            let isTeaching = mk.guide.isGuiding();
+            let rand = Math.random();
+            let rate = gData.adData.getPerByEcpm(RateConfig.RC_superDouble);
+            if (!isTeaching && rand <= rate) {
+                if(gData.gameData.playerProp.orderData && gData.gameData.playerProp.orderData.overTimes >0)
+                {
+                    this.isTouchBtn = false;
+                    mk.ui.openPanel('game/prefab/uiPanel/HarvestPanel');
+                }else{
+                    this.isCdOver = false;
+                    this.getNormalReward();
+                }
+                
+            } else {
+                this.isCdOver = false;
+                this.getNormalReward();
+            }
+        }else{
+            this.isCdOver = false;
             this.getNormalReward();
         }
-
+    
     }
 
     setAdData(data) {
@@ -52,7 +75,11 @@ export default class HarvestData extends Data {
     }
 
     async getNormalReward() {
-        await mk.time.WaitForSeconds(0.5);
+
+        if(this.isTouchBtn)
+        {
+            await mk.time.WaitForSeconds(0.5);
+        }
         let data = { id: this.config.id };
         let response = await mk.http.sendData('redMoney/addRedMoneyByFarm', data);
 
@@ -62,22 +89,51 @@ export default class HarvestData extends Data {
 
         //奖励弹窗
         if (response.data.redMoneyAddition <= 0) {
+            this.isCdOver = true;
             console.log('返回奖励为0')
         }
         else {
-            this.getType = 0;
-            let rewardData = [{ rewardType: 1, rewardNum: response.data.redMoneyAddition }];
-            gData.reward.data = rewardData;
-            gData.reward.callback = this.call;
-
 
-            let world_Pos = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
-            gData.reward.getReward(world_Pos, this.isMatchOrder);
-            //mk.ui.openPanel('module/reward/reward');
+            if(this.isTouchBtn)
+            {
+                let world_Pos = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
+                let pos =  mk.fly.node.convertToNodeSpaceAR(world_Pos);
+                let prefab = await mk.loader.load("module/guide/hand", cc.Prefab);
+                let hand = cc.instantiate(prefab);
+                hand.scale = 0.8;
+                let ani = hand.getComponent(cc.Animation);
+                let state = ani.getAnimationState("guideA");
+                state.speed = 2;
+                hand.parent = mk.fly.node;
+                hand.setPosition(pos);
+                cc.tween(hand).delay(0.4).call(()=>{
+                    this.isCdOver = true;
+                    this.getType = 0;
+                    let rewardData = [{ rewardType: 1, rewardNum: response.data.redMoneyAddition }];
+                    gData.reward.data = rewardData;
+                    gData.reward.callback = this.call;
+        
+        
+                    //let world_Pos = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
+                    gData.reward.getReward(world_Pos, this.isMatchOrder);
+                }).removeSelf().start();
+            }else{
+                this.isCdOver = true;
+                this.getType = 0;
+                let rewardData = [{ rewardType: 1, rewardNum: response.data.redMoneyAddition }];
+                gData.reward.data = rewardData;
+                gData.reward.callback = this.call;
+    
+    
+                let world_Pos = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
+                gData.reward.getReward(world_Pos, this.isMatchOrder);
+                //mk.ui.openPanel('module/reward/reward');
+            }
+            
         }
     }
 
-    private judgeIsMatchOrder()
+    public judgeIsMatchOrder()
     {
         let data = gData.gameData.playerProp.orderData;
         if (data && data.orderTaskList) {

+ 1 - 2
assets/script/before/view/ui/HarvestPanel.ts

@@ -45,9 +45,8 @@ export default class HarvestPanel extends cc.Component {
             gData.reward.data = rewardData;
             gData.reward.callback = gData.harvestData.call;
 
-
             let world_Pos = gData.harvestData.node_fly.parent.convertToWorldSpaceAR(gData.harvestData.node_fly.getPosition());
-            gData.reward.getReward(world_Pos);
+            gData.reward.getReward(world_Pos, gData.harvestData.isMatchOrder);
             //mk.ui.openPanel('module/reward/reward');
         }
         mk.ui.closePanel('HarvestPanel');

+ 11 - 2
assets/script/before/view/ui/PlantPanel.ts

@@ -63,8 +63,17 @@ export default class PlantPanel extends cc.Component {
         {
             cc.tween(this).delay(0.2).call(()=>{
 
-                this.tableView.contentMoveByIndex(gData.plantData.productIndex-1, 0.1);
-                
+                if(this.list_data.length > 4)
+                {
+                    if(gData.plantData.productIndex <= this.list_data.length-4)
+                    {
+                        this.tableView.contentMoveByIndex(gData.plantData.productIndex-1, 0.1);
+                    }else{
+                        //this.tableView.moveButtom();
+                        this.tableView.contentMoveByIndex(this.list_data.length-4, 0.1);
+                    }  
+                }
+                     
             }).start();
         }
     }

+ 6 - 0
assets/script/game/component/TableView.ts

@@ -635,6 +635,12 @@ export default class TableView extends cc.Component {
         }
     }
 
+    public moveButtom()
+    {
+        let pos = this.scrollView.getMaxScrollOffset();
+        this.scrollView.scrollToOffset(pos, 0.1);
+    }
+
     public getItemByIndexAndCount(index: number, count: number) {
         const itemArray: Array<any> = [];
         for (let j = 0; j != this.itemArr.length; ++j) {

+ 12 - 15
assets/script/game/data/AdData.ts

@@ -401,6 +401,10 @@ export class AdData {
             return;
         }
 
+        if(mk.guide.isGuiding())
+        {
+            return;
+        }
         this.clickTimesAdd++;
         if (this.clickTimesAdd >= this.popClickTimes) {
             this.clickTimesAdd = 0;
@@ -425,45 +429,38 @@ export class AdData {
                 case RateConfig.RC_fullScreen:
                     if (gData.gameData.adShowConfig.average_ecpm <= parseInt(forceAd[i].ecpmMax)) {
                         per = parseFloat(forceAd[i].qpPercent);
-                        break;
+                        return per;
                     }
-                    break;
                 case RateConfig.RC_tableScreen:
                     if (gData.gameData.adShowConfig.average_ecpm <= parseInt(forceAd[i].ecpmMax)) {
                         per = parseFloat(forceAd[i].cpPercent);
-                        break;
+                        return per;
                     }
-                    break;
                 case RateConfig.RC_banner:
                     if (gData.gameData.adShowConfig.average_ecpm <= parseInt(forceAd[i].ecpmMax)) {
                         per = parseFloat(forceAd[i].baPercent);
-                        break;
-                    }
-                    break;
+                        return per;
+                    }     
                 case RateConfig.RC_infrormationFlow:
                     if (gData.gameData.adShowConfig.average_ecpm <= parseInt(forceAd[i].ecpmMax)) {
                         per = parseFloat(forceAd[i].xxPercent);
-                        break;
+                        return per;
                     }
-                    break;
                 case RateConfig.RC_splash:
                     if (gData.gameData.adShowConfig.average_ecpm <= parseInt(forceAd[i].ecpmMax)) {
                         per = parseFloat(forceAd[i].kpPercent);
-                        break;
+                        return per;
                     }
-                    break;
                 case RateConfig.RC_superDouble:
                     if (gData.gameData.adShowConfig.average_ecpm <= parseInt(forceAd[i].ecpmMax)) {
                         per = parseFloat(forceAd[i].jbPercent);
-                        break;
+                        return per;
                     }
-                    break;
                 case RateConfig.RC_moreGameRedBag:
                     if (gData.gameData.adShowConfig.average_ecpm <= parseInt(forceAd[i].ecpmMax)) {
                         per = parseFloat(forceAd[i].htPercent);
-                        break;
+                        return per;
                     }
-                    break;
             }
         }
 

+ 10 - 3
assets/script/game/data/GameData.ts

@@ -211,7 +211,7 @@ export class GameData {
         //mk.console.logSingle('redMoneyCashPayRecordList==>', res_data.redMoneyCashPayRecordList);
         this.playerProp.userFarmTaskInfo = res_data.userFarmTaskInfo;
         this.playerProp.speedUpLeftTimes = res_data.speedUpLeftTimes;
-        this.playerProp.completeFarmTaskTimes = 3;//res_data.completeFarmTaskTimes;
+        this.playerProp.completeFarmTaskTimes = res_data.completeFarmTaskTimes;
         this.playerProp.orderData = res_data.userOrderTaskInfo;
         console.log("==============initPlayerProp");
         console.log(res_data.userOrderTaskInfo);
@@ -394,7 +394,7 @@ export class GameData {
     /** 增加减少生产次数
      * @param add 增减变量
      */
-    public changeLeftTimes(add, isIgnoreMaxTimes = false) {
+    public changeLeftTimes(add, isIgnoreMaxTimes = false, isRefresh = true) {
 
         gData.gameData.leftTimes += add;
         if (add > 0 && !isIgnoreMaxTimes) {
@@ -406,7 +406,10 @@ export class GameData {
         }
         gData.gameData.setProp(GameProp.leftTimes, gData.gameData.leftTimes);
 
-        gData.gameData.init_leftTimes = true;
+        if(isRefresh)
+        {
+            gData.gameData.init_leftTimes = true;
+        }
     }
 
     //图鉴领取数据
@@ -790,6 +793,8 @@ export class GameData {
             if (com >= count) {
                 if (!this.gameStyle.getIsCanGetOrderReward()) {
                     mk.tip.pop('任务红包进度已满,快去提现');
+                }else{
+                    mk.tip.pop("订单已完成,快领奖吧!");
                 }
                 return false;
             }
@@ -1303,6 +1308,7 @@ export class GameData {
             if (data.tab == config.tab) {
                 if (data.productID < id) {
                     data.productID = id;
+                    data.id = config.id;
                 }
                 has = true;
                 break;
@@ -1457,6 +1463,7 @@ export class GameData {
             //     let d = { id: dataE.productID, tab: dataE.tab };
             //     data.unLockProductList.push(d);
             // }
+            mk.console.logSingle("updateMaxProduct", data);
             let respone = await mk.http.sendData('orderTask/updateUnlockProduct', data);
             console.log("------");
         }

+ 1 - 0
assets/script/game/data/module/GuideData.ts

@@ -44,6 +44,7 @@ export class GuideData {
             guide.finger = o.finger;
             guide.lag_next = parseFloat(o.lagNext);
             guide.display_type = parseInt(o.trNum);
+            guide.continue = o.continue;
             if (id != guide.id) {
                 this.data.set(id, arr);
                 arr = [];

+ 2 - 1
assets/script/game/data/module/LineUpUIData.ts

@@ -13,7 +13,8 @@ export class LineUpUIData extends Data {
     showTips()
     {
         cc.tween(this).delay(0.5).call(()=>{
-            mk.tip.pop(`插队成功,并获得${this.redMoney}红包币`);
+            let add = Math.round(this.redMoney / 100);
+            mk.tip.pop(`插队成功,并获得${add}红包币`);
         }).start();     
     }
 

+ 1 - 1
assets/script/game/data/module/RewardData.ts

@@ -62,7 +62,7 @@ export class RewardData extends Data {
             let num = 10;
             if(isMatchOrder)
             {
-                num = 4;
+                num = 1;
             }
             let scale = -1;
             if( gData.reward.data[i].rewardType === RewardType.productTimes)

+ 8 - 0
assets/script/game/game/FunBtns.ts

@@ -20,6 +20,8 @@ export default class FunBtns extends cc.Component {
     btn8: cc.Node = null;
     @property({ type: cc.Node, displayName: "互推" })
     btn9: cc.Node = null;
+    @property({ type: cc.Node, displayName: "订单" })
+    btn12: cc.Node = null;
 
     onLoad() {
         gData.gameData.funBtns = this;
@@ -35,6 +37,12 @@ export default class FunBtns extends cc.Component {
             let node_btn = this['btn' + (i + 1)];
             if (node_btn) {
                 node_btn.active = data[i] == "1";
+                //订单
+                if(i == 11 && data[i] == "0")
+                {
+                    this.btn5.y = this.btn5.y + 170;
+                    this.btn9.y = this.btn9.y + 170;
+                }
             }
         }
 

+ 190 - 36
assets/script/game/game/Game.ts

@@ -3,7 +3,7 @@ import JsbSystem from "../../mk/system/JsbSystem";
 import TimeUtil from "../../mk/utils/TimeUtil";
 import SetGray from "../component/SetGray";
 import { AdFun, RateConfig } from "../data/AdData";
-import { DataEventId, GameProp, ProductType, VideoAdType } from "../data/GameData";
+import { DataEventId, FarmState, GameProp, ProductType, VideoAdType } from "../data/GameData";
 
 const { ccclass, property } = cc._decorator;
 
@@ -111,6 +111,10 @@ export default class Game extends cc.Component {
     @property({ displayName: '手指', type: cc.Node })
     node_orderHand: cc.Node = null;
 
+    @property({ type: cc.Node, displayName: '增加效果文本2' })
+    ani_add4: cc.Node = null;
+    @property({ displayName: '红包币', type: cc.Label })
+    lbl_addRedMoney: cc.Label = null;
 
     posY = 0;
     /** 是否开始增加次数倒计时 */
@@ -163,8 +167,15 @@ export default class Game extends cc.Component {
         //     }
         //     this.autoPopSign = false;        
         // }
-        mk.guide.open(1);
-
+        if(gData.gameData.funOpenData[11] == "1")
+        {
+            let isTeach = mk.guide.open(10);
+            if (isTeach) {
+                mk.event.register("event_guide", this.initGuideEvent.bind(this), this);
+                //mk.guide.continueCallBack = this.judgeContinueTeach;
+            }
+        }
+    
         let value = mk.storage.getStorage('loadingFinish');
         if (!value) {
             mk.storage.setStorage('loadingFinish', 1);
@@ -206,24 +217,28 @@ export default class Game extends cc.Component {
         gData.gameData.firstCheckNext();
 
         let add = 0;
+        let needAdd = true;
+        let offset = 0;
         if (gData.gameData.leftTimes < gData.gameData.maxTimes && this.lastTimeSpan != 0) {
             let pass = Date.now() - this.lastTimeSpan;
             if (pass >= this.span) {
                 add = Math.floor(pass / this.span);
                 this.lastTimeSpan += (add * this.span);
                 mk.storage.setStorage('lastTimeSpan', this.lastTimeSpan);
-                gData.gameData.changeLeftTimes(add);
-
-                gData.gameData.init_leftTimes = true;
+                offset = gData.gameData.maxTimes - gData.gameData.leftTimes;
+                gData.gameData.changeLeftTimes(add, false, this.isShowAddProductTimesUI);
             }
         }
 
-        if (!this.isShowAddProductTimesUI) {
+        if (!this.isShowAddProductTimesUI && needAdd) {
             this.isShowAddProductTimesUI = true;
-            if (add > 0) {
-                add = add > gData.gameData.maxTimes ? gData.gameData.maxTimes : add;
-                gData.gameData.restoreProductTimes = add;
-                mk.ui.openPanel('module/speedUpUI/restoreProductTimes');
+            if (add > 0) {    
+                add = add > offset ? offset : add;
+                if (add > 0) {
+                    //add = add > gData.gameData.maxTimes ? gData.gameData.maxTimes : add;
+                    gData.gameData.restoreProductTimes = add;
+                    mk.ui.openPanel('module/speedUpUI/restoreProductTimes');
+                }
             }
         }
 
@@ -506,6 +521,10 @@ export default class Game extends cc.Component {
         mk.audio.playEffect("button");
         if (gData.gameData.leftTimes <= 0) {
             // mk.tip.pop('生产次数不足');
+            // if(!mk.guide.isGuiding())
+            // {
+            //     mk.ui.openPanel('module/speedUpUI/productReward');
+            // } 
             mk.ui.openPanel('module/speedUpUI/productReward');
             return;
         }
@@ -515,6 +534,8 @@ export default class Game extends cc.Component {
             return;
         }
 
+
+
         let flyRed = await gData.gameData.makeProduct();
 
         if (flyRed) {
@@ -570,7 +591,11 @@ export default class Game extends cc.Component {
 
     public doFlyExpAni(exp: number, startPos: cc.Node, data) {
         let pos = this.lbl_farmLevel.node.parent.convertToWorldSpaceAR(this.lbl_farmLevel.node.getPosition());
-        mk.fly.PlayCoinAnim(2, 3, startPos, pos, () => {
+        let num = 3;
+        if (gData.harvestData.isMatchOrder) {
+            num = 1;
+        }
+        mk.fly.PlayCoinAnim(2, num, startPos, pos, () => {
             if (gData.gameData.playerProp.gradeLevel < data.farmLevel) {
                 gData.gameData.playerProp.gradeLevel = data.farmLevel;
                 mk.data.setTAEventUser(0, 'farm_lv', gData.gameData.playerProp.gradeLevel);
@@ -640,6 +665,53 @@ export default class Game extends cc.Component {
     }
 
     public clickFarmMapUIBtn() {
+        mk.audio.playEffect("button");
+        mk.data.sendDataEvent(DataEventId.button_click, "图鉴浮窗icon");
+        if (this.productType == ProductType.nzw) {
+            if (gData.farmSystem.currSelectFarm) {
+                if (gData.farmSystem.currSelectFarm.data.state != FarmState.Empty) {
+                    gData.farmSystem.currSelectFarm = null;
+                    let farms = gData.farmSystem.farms;
+                    for (let i = 0; i < farms.length; i++) {
+                        if (farms[i].data.state == FarmState.Empty) {
+                            gData.farmSystem.currSelectFarm = farms[i];
+                            break;
+                        }
+                    }
+                    if (!gData.farmSystem.currSelectFarm) {
+                        gData.farmSystem.currSelectFarm = farms[0];
+                    }
+                }
+
+            } else {
+                let farms = gData.farmSystem.farms;
+                for (let i = 0; i < farms.length; i++) {
+                    if (farms[i].data.state == FarmState.Empty) {
+                        gData.farmSystem.currSelectFarm = farms[i];
+                        break;
+                    }
+                }
+                if (!gData.farmSystem.currSelectFarm) {
+                    gData.farmSystem.currSelectFarm = farms[0];
+                }
+            }
+        } else {
+            let id = -1;
+            let factorys = gData.factorySystem.factoryIcons;
+            for (let i = 0; i != factorys.length; ++i) {
+                if (factorys[i].tab == this.productType && factorys[i].data.state == FarmState.Empty) {
+                    if (id != -1) {
+                        id = i;
+                    }
+                    gData.factorySystem.currSelectFactory = factorys[i];
+                    break;
+                }
+            }
+            if (!gData.factorySystem.currSelectFactory) {
+                gData.factorySystem.currSelectFactory = factorys[id];
+            }
+        }
+
         gData.plantData.openPanel(this.productType, 1, this.productIndex - 1);
     }
 
@@ -658,6 +730,12 @@ export default class Game extends cc.Component {
         //     namePath = 'game/coregame/texture/factory_icons/factoryNams/factory_name_icon_';
         // }
 
+        
+        if(gData.gameData.funOpenData[12] == "0")
+        {
+            this.node_farmMapUI.active = false;
+            return;
+        }
         //1:有可领奖的,2:正在解锁,3:所有奖励都领取完
         this.uiShowType = 3;
         for (let key in ProductType) {
@@ -666,7 +744,13 @@ export default class Game extends cc.Component {
                 let list_data = gData.gameData.getProductArrByType(ProductType[key]);
                 for (let i = 0; i != list_data.length; ++i) {
                     let data = list_data[i];
-                    if (data.picture <= max) {
+                    //剔除前三个农作物
+                    let extraCondition = true;
+                    if(ProductType[key] == ProductType.nzw)
+                    {
+                        extraCondition = (data.picture >10003);
+                    }
+                    if (extraCondition && data.picture <= max) {
                         let state = gData.gameData.getFarmMapRewardState(this.getIndex(data));
                         if (state == 0) {
                             this.uiShowType = 1;
@@ -676,6 +760,7 @@ export default class Game extends cc.Component {
                             this.node_farmMapGetReward.active = true;
                             this.node_farmMapProduct.active = false;
                             this.node_farmMapUI.active = true;
+                            this.node_farmMapUI.width = 320;
                             //this.sp_farmMapIcon.spriteFrame = await mk.loader.load(plantPath + data.picture, cc.SpriteFrame);
                             return;
                         }
@@ -689,6 +774,8 @@ export default class Game extends cc.Component {
                         let times = gData.gameData.getProductMakeTimesById(data.picture - 1);
                         let plantName = gData.gameData.getProductMap(data.picture - 1).name;
                         let des = this.getDesByType(data);
+                        let len = plantName.length;
+                        this.node_farmMapUI.width = 300 + (len - 2) * 20 + (len - 2)*5;
                         this.lbl_farmMapDes.string = `<color=#7E411F>${des}<color=#FF0000>${data.value}</c>次${plantName} <color=#FF0000>${times}</c>/${data.value}</color>`;
                         //this.sp_farmMapIcon.spriteFrame = await mk.loader.load('module/farmMap/texture/gift', cc.SpriteFrame);
                         return;
@@ -717,13 +804,14 @@ export default class Game extends cc.Component {
     private btnCD = 0;
     private startTimes = false;
     public clickGetFarmMapRewardBtn() {
-
+        mk.audio.playEffect("button");
         if (!this.startTimes) {
             this.startTimes = true;
             this.btnCD = 0;
         } else {
             return;
         }
+        mk.data.sendDataEvent(DataEventId.button_click, "图鉴浮窗icon");
 
         mk.audio.playEffect("button");
 
@@ -761,10 +849,10 @@ export default class Game extends cc.Component {
             }
 
             //订单部分
-            for (var i = 0; i < len2; i++) {
-                let ran = Util.rnd(0, 9);
-                this.lbl_redMoneyValue[i].string = `${ran}`;
-            }
+            // for (var i = 0; i < len2; i++) {
+            //     let ran = Util.rnd(0, 9);
+            //     this.lbl_redMoneyValue[i].string = `${ran}`;
+            // }
 
         }, 0.1)
     }
@@ -885,6 +973,7 @@ export default class Game extends cc.Component {
         let productJson = gData.gameData.configs.Product;
         let data = gData.gameData.playerProp.orderData;
         if (data) {
+            this.lbl_addRedMoney.string = data.redMoneyAddition / 100 + "";
             let len = data.orderTaskList.length;
             if (len == 3) {
                 let completeCount = 0;
@@ -932,6 +1021,7 @@ export default class Game extends cc.Component {
                 } else {
                     this.isGray = true;
                     this.node_getOrderReward.setGray(true, true);
+                    this.node_getOrderReward.getComponent(cc.Animation).setCurrentTime(0);
                     this.node_getOrderReward.getComponent(cc.Animation).stop();
                     this.node_orderHand.active = false;
                 }
@@ -945,6 +1035,7 @@ export default class Game extends cc.Component {
     }
 
     public clickGetOrderRewardBtn() {
+        mk.audio.playEffect("button");
         if (this.isGray) {
             mk.tip.pop("订单未完成");
         } else {
@@ -952,8 +1043,7 @@ export default class Game extends cc.Component {
         }
     }
 
-    public getIsCanGetOrderReward()
-    {
+    public getIsCanGetOrderReward() {
         return !this.isGray;
     }
 
@@ -963,11 +1053,12 @@ export default class Game extends cc.Component {
         if (response.errcode != 0) {
             return null;
         }
+        let addMoney = gData.gameData.playerProp.orderData.redMoneyAddition;
         gData.gameData.playerProp.orderData = response.data.userOrderTaskInfo;
         gData.gameData.cloneOrderData(true);
 
         gData.reward.adData = { videoRedMoney: { videoRewardList: null } };
-        gData.reward.adData.videoRedMoney.videoRewardList = [{ rewardType: 1, rewardNum: response.data.redMoneyAddition }]
+        gData.reward.adData.videoRedMoney.videoRewardList = [{ rewardType: 1, rewardNum: addMoney }]
         //gData.reward.adData = response.data.redMoneyAddition;
         mk.ui.openPanel('module/reward/reward');
 
@@ -993,12 +1084,20 @@ export default class Game extends cc.Component {
                         let sf = await mk.loader.load(plantPath + plantId, cc.SpriteFrame);
                         crop.getComponent(cc.Sprite).spriteFrame = sf;
                         mk.fly.playFlyAniExtra(farmNode, this.sp_cropIcon[i].node, crop, 0.6, index * 0.2, () => {
-                            if(index == 1)
-                            {
+                            if (index == 1) {
                                 this.doFlyOrderAni(i);
                             }
                         });
                     }
+
+                    let addAni = cc.instantiate(this.ani_add4);
+                    addAni.parent = farmNode;
+                    addAni.setPosition(cc.Vec2.ZERO);
+                    cc.tween(addAni).delay(0.8).call(() => {
+                        addAni.opacity = 255;
+                    }).by(0.8, { y: 100 }).to(0.4, { opacity: 0 }).call(() => {
+                        addAni.destroy();
+                    }).start();
                 }
                 break;
             }
@@ -1024,10 +1123,15 @@ export default class Game extends cc.Component {
                 this.node_getOrderReward.getComponent(cc.Animation).play();
                 this.node_orderHand.active = true;
                 mk.ui.closeAllUI();
-                let isGuide = mk.guide.open(3);
-                if (!isGuide) {
+                if(gData.gameData.funOpenData[11] == "1")
+                {
+                    let isGuide = mk.guide.open(12);
+                    if (!isGuide) {
+                        mk.tip.pop("订单已完成,快领奖吧!");
+                    }
+                }else{
                     mk.tip.pop("订单已完成,快领奖吧!");
-                }
+                }       
             }
 
             {
@@ -1058,16 +1162,66 @@ export default class Game extends cc.Component {
     }
 
     public clickOrderUIBtn() {
-        let data = gData.gameData.playerProp.orderData;
-        let orderData = data.orderTaskList;
-        let copyData = gData.gameData.playerProp.copyOrderData;
-        if (data && orderData && copyData) {
-            let num = 0;
-            for (let i = 0; i != orderData.length; ++i) {
-                num += (orderData[i].taskCount - copyData[i])
-            }
-            mk.guide.curDes = `<color=8A4312>继续生产${num}次,很快就\n可以提现了!</color>`;
-            //mk.guide.open(2, curDes);
+        mk.audio.playEffect("button");
+        if (mk.guide.isGuiding()) {
+            // let data = gData.gameData.playerProp.orderData;
+            // let orderData = data.orderTaskList;
+            // let copyData = gData.gameData.playerProp.copyOrderData;
+            // if (data && orderData && copyData) {
+            //     let num = 0;
+            //     for (let i = 0; i != orderData.length; ++i) {
+            //         num += (orderData[i].taskCount - copyData[i])
+            //     }
+            //     mk.guide.curDes = `<color=8A4312><color=ff0000>继续生产</c>${num}次,很快就\n可以完成订单了!</color>`;
+            //     //mk.guide.open(2, curDes);
+            // }
+            // let leftTimes = gData.gameData.leftTimes;
+            // if(leftTimes > 0)
+            // {
+            //     mk.guide.curDes = `<color=8A4312><color=ff0000>继续生产${leftTimes}次</c>,很快就\n可以完成订单了!</color>`;
+            // }
+        } else {
+            mk.tip.pop("收获相应物品即可领奖");
+        }
+
+    }
+
+    public judgeContinueTeach() {
+        // let data = gData.gameData.playerProp.orderData;
+        // let orderData = data.orderTaskList;
+        // let copyData = gData.gameData.playerProp.copyOrderData;
+        // if (data && orderData && copyData) {
+        //     let num = 0;
+        //     for (let i = 0; i != orderData.length; ++i) {
+        //         num += (orderData[i].taskCount - copyData[i])
+        //     }
+        //     mk.guide.curDes = `<color=8A4312>继续生产${num}次,很快就\n可以提现了!</color>`;
+        //     if (num > 0) {
+        //         return true;
+        //     } else {
+        //         return false;
+        //     }
+        // } else {
+        //     return false;
+        // }
+        let leftTimes = gData.gameData.leftTimes;
+        if(leftTimes > 0)
+        {
+            mk.guide.curDes = `<color=8A4312><color=ff0000>继续生产${leftTimes}次</c>,很快就\n可以完成订单了!</color>`;
+            return true;
+        }else{
+            // if(gData.gameData.moveMapNode)
+            // {
+            //     gData.gameData.moveMapNode.move(new cc.Vec3(0, -370, 0));
+            // }
+   
+            return false;
+        }
+    }
+
+    public initGuideEvent() {
+        if (gData.farmSystem._lastSeletFarm) {
+            gData.farmSystem._lastSeletFarm.clickGuideBtn();
         }
     }
 }

+ 15 - 1
assets/script/game/module/guide/Guide.ts

@@ -57,6 +57,7 @@ export default class Guide extends cc.Component {
     private nextStep() {
         this.crtStep++;
         this.crtGuide = this.guides[this.crtStep];
+        mk.guide.curGuideIdStr = gData.guideData.crtID + "_" + this.crtStep;
         mk.data.sendDataEvent(DataEventId.guide, `新手引导第${gData.guideData.crtID}_${this.crtStep}步完成`);
         this.updateGuide();
     }
@@ -120,6 +121,7 @@ export default class Guide extends cc.Component {
 
                 if (this.crtGuide.btnEnable == '1') {
                     //穿透点击目标节点时增加一个事件触发下一步,触发后移除
+
                     this.node_click.width = this.node_click.height = 0;
                     let eventHandler = new cc.Component.EventHandler();
                     eventHandler.target = this.node;
@@ -276,7 +278,17 @@ export default class Guide extends cc.Component {
         if (this.crtGuide.lag_next > 0) {
             await mk.time.WaitForSeconds(this.crtGuide.lag_next);
         }
-        this.nextStep();
+        if (this.crtGuide.continue == "true") {
+            if(mk.guide.continueCallBack)
+            {
+                let isContinue = mk.guide.continueCallBack();
+                if(isContinue)
+                {
+                    --this.crtStep;
+                }
+            }
+        }
+         this.nextStep();
     }
 
     /** 等待状态 透明不可点击 */
@@ -298,6 +310,8 @@ export default class Guide extends cc.Component {
     private close() {
         mk.guide.close();
         // this.node.destroy();
+        mk.guide.curGuideIdStr = null;
+        mk.guide.continueCallBack = null;
         mk.ui.closePanel(this.node.name);
     }
 

+ 2 - 0
assets/script/game/module/guide/GuideVO.ts

@@ -29,4 +29,6 @@ export default class GuideVO {
     lag_next: number;
     /** 使用方形框还是圆角框 0方形框 1圆形框 */
     display_type: number = 0;
+    /** 是否继续当前步骤 */
+    continue: string = null;
 }

+ 6 - 3
assets/script/game/module/speedUpUI/ProductReward.ts

@@ -51,8 +51,11 @@ export default class ProductReward extends cc.Component {
                             for (let i = 0; i != orderData.length; ++i) {
                                 num += (orderData[i].taskCount - copyData[i])
                             }
-                            let curDes = `<color=8A4312>再收获${num}次,就可以完成\n订单,提现仅一步之遥!</color>`;
-                            mk.guide.open(2, curDes);
+                            if(gData.gameData.funOpenData[11] == "1")
+                            {
+                                let curDes = `<color=8A4312>再生产${num}次,就可以收获\n啦,完成订单立即<color=ff0000>提现</color>!</color>`;
+                                mk.guide.open(11, curDes);
+                            }                     
                         }
                     }, 0.5)
                 } else {
@@ -78,7 +81,7 @@ export default class ProductReward extends cc.Component {
         if (isGuide) {
 
             let id = gData.gameData.getProp(GameProp.guideID);
-            if (id >= 2) {
+            if (id >= 11) {
                 mk.ad.showNative();
             }
         } else {

+ 37 - 3
assets/script/game/module/speedUpUI/RestoreProductTimes.ts

@@ -8,9 +8,21 @@ export default class RestoreProductTimes extends cc.Component {
     @property({ type: cc.RichText, displayName: "文本" })
     lbl_times: cc.RichText = null;
 
+    @property({ type: cc.Label, displayName: "按钮文本" })
+    lbl_double: cc.Label = null;
+
     start(){
 
         this.lbl_times.string = StringUtil.format(this.lbl_times.string, gData.gameData.restoreProductTimes.toString());
+        this.lbl_double.string = StringUtil.format(this.lbl_double.string, gData.gameData.restoreProductTimes.toString());
+        // cc.tween(this).delay(0.8).call(()=>{
+        //     this.addTimes();
+        // }).start();
+    }
+
+    onEnable()
+    {
+        mk.ad.showNative();
     }
 
     private clickVideoBtn() {
@@ -21,18 +33,40 @@ export default class RestoreProductTimes extends cc.Component {
             if (success) {
                 gData.adData.watchVideo(null);
 
-                let rewardData = [{ rewardType: 4, rewardNum: gData.gameData.restoreProductTimes }];
+                let rewardData = [{ rewardType: 4, rewardNum: gData.gameData.restoreProductTimes *2 }];
                 gData.reward.data = rewardData;
-                gData.reward.callback = this.addTimes;
+                gData.reward.callback = this.addDoubleTimes;
                 mk.ui.openPanel('module/reward/reward');
             }
         })
     }
 
+    addDoubleTimes() {
+        let add = gData.gameData.restoreProductTimes;
+        gData.gameData.changeLeftTimes(add, true);
+        gData.gameData.gameStyle.playAdd(add*2, 2);
+    }
+
+    public clickCloseBtn()
+    {
+        mk.audio.playEffect("button");
+        mk.ui.closePanel(this.node.name);
+
+        let rewardData = [{ rewardType: 4, rewardNum: gData.gameData.restoreProductTimes }];
+        gData.reward.data = rewardData;
+        gData.reward.callback = this.addTimes;
+        mk.ui.openPanel('module/reward/reward');
+    }
+
     addTimes() {
         let add = gData.gameData.restoreProductTimes;
-        gData.gameData.changeLeftTimes(add);
+        gData.gameData.init_leftTimes = true;
         gData.gameData.gameStyle.playAdd(add, 2);
     }
 
+    onDisable()
+    {
+        mk.ad.destroyNativeAd();
+    }
+
 }

+ 11 - 1
assets/script/mk/system/GuideSystem.ts

@@ -11,6 +11,11 @@ export default class GuideSystem {
     public ui: cc.Node;
     public curDes = '';
 
+    //当前进行到哪一步的拼接字符串
+    public curGuideIdStr: string = null;
+    //判断继续当前步骤的回调函数
+    public continueCallBack: Function = null;
+ 
     public open(id, curDes = '') {
         if (gData.gameData.configs.ServerConfig.NewUserGuide == '0') {
             return false;
@@ -46,7 +51,7 @@ export default class GuideSystem {
 
     /** 开启一个引导后直接默认已完成 */
     private setGuideID(id: number) {
-        if (id == 4) {
+        if (id == 12) {
             id = 9999;
             mk.data.sendXYEvent("guide_end", "新手引导结束");
         }
@@ -77,4 +82,9 @@ export default class GuideSystem {
     public isGuiding(): boolean {
         return mk.ui.getCurOnPanel("guide") != null;
     }
+
+    public getCurGuideIdString()
+    {
+        return this.curGuideIdStr;
+    }
 }

+ 1 - 1
assets/script/mk/system/JsbSystem.ts

@@ -565,7 +565,7 @@ export default class JsbSystem {
         return token;
     }
 
-    public static closePanelFromHome() {
+    public static backKeyCallBack() {
         if (this.callBack) {
             this.callBack();
         }

+ 7 - 2
assets/script/mk/system/UISystem.ts

@@ -163,10 +163,15 @@ export default class UISystem extends cc.Component {
             if (!node_panel) {
                 continue;
             }
-
+            //如果EffectOpenAndClose没有打开关闭动画是无效的
             let comp_anim = node_panel.getComponent('EffectOpenAndClose');
             if (comp_anim) {
-                comp_anim.hideEffect(this.destroyNode.bind(this, node_panel, panelName));
+                if(comp_anim.isOpenCloseEffect)
+                {
+                    comp_anim.hideEffect(this.destroyNode.bind(this, node_panel, panelName));
+                }else{
+                    this.destroyNode(node_panel, panelName);
+                }           
             } else {
                 this.destroyNode(node_panel, panelName);
             }

BIN
build/jsb-link/assets/main/index.jsc


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/config.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/import/04/04dd6ff2-c365-488b-9c49-8994289ce473.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/import/23/2301f946-ef9d-4d93-b296-1f8ff5b307d3.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/import/85/85eaeddc-5fb5-4c16-9904-be1f708bfbab.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/import/b4/b4dea4a9-29c8-46bc-a50d-5754afa7a2bd.json


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/jsb-link/assets/resources/import/c2/c24623b9-b557-420c-bf8c-8927ea736fa1.json


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/caches/build_file_checksums.ser


+ 1 - 1
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr.java

@@ -271,7 +271,7 @@ public class ThirdSdkMgr {
         ThirdSdkMgr.appActivity.runOnGLThread(new Runnable() {
             @Override
             public void run() {
-                Cocos2dxJavascriptJavaBridge.evalString(cocosJsbMgrName + "closePanelFromHome();");
+                Cocos2dxJavascriptJavaBridge.evalString(cocosJsbMgrName + "backKeyCallBack();");
             }
         });
     }

+ 292 - 119
build/jsb-link/js backups (useful for debugging)/main.index.js

@@ -2801,7 +2801,7 @@ var t = gData.gameData.configs.ServerConfig.ClickProduction.split(",");
 this.popClickTimes = c.default.rnd(parseInt(t[0]), parseInt(t[1]));
 };
 t.prototype.checkPopRed = function() {
-if (-1 != this.ProductionButtonArr.indexOf(this.ecpmLevel.toString())) {
+if (-1 != this.ProductionButtonArr.indexOf(this.ecpmLevel.toString()) && !mk.guide.isGuiding()) {
 this.clickTimesAdd++;
 if (this.clickTimesAdd >= this.popClickTimes) {
 this.clickTimesAdd = 0;
@@ -2817,52 +2817,25 @@ t.prototype.getPerByEcpm = function(t) {
 void 0 === t && (t = r.RC_fullScreen);
 for (var e = gData.gameData.configs.ForceAd, a = e.length, o = 0, n = 0; n < a; n++) switch (t) {
 case r.RC_fullScreen:
-if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) {
-o = parseFloat(e[n].qpPercent);
-break;
-}
-break;
+if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) return parseFloat(e[n].qpPercent);
 
 case r.RC_tableScreen:
-if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) {
-o = parseFloat(e[n].cpPercent);
-break;
-}
-break;
+if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) return parseFloat(e[n].cpPercent);
 
 case r.RC_banner:
-if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) {
-o = parseFloat(e[n].baPercent);
-break;
-}
-break;
+if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) return parseFloat(e[n].baPercent);
 
 case r.RC_infrormationFlow:
-if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) {
-o = parseFloat(e[n].xxPercent);
-break;
-}
-break;
+if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) return parseFloat(e[n].xxPercent);
 
 case r.RC_splash:
-if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) {
-o = parseFloat(e[n].kpPercent);
-break;
-}
-break;
+if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) return parseFloat(e[n].kpPercent);
 
 case r.RC_superDouble:
-if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) {
-o = parseFloat(e[n].jbPercent);
-break;
-}
-break;
+if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) return parseFloat(e[n].jbPercent);
 
 case r.RC_moreGameRedBag:
-if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) {
-o = parseFloat(e[n].htPercent);
-break;
-}
+if (gData.gameData.adShowConfig.average_ecpm <= parseInt(e[n].ecpmMax)) return parseFloat(e[n].htPercent);
 }
 return o;
 };
@@ -8422,7 +8395,7 @@ return [ 2 ];
 e.prototype.canHarvest = function() {
 this.getComponent(l.MoveToCenter).move();
 gData.factorySystem.currSelectFactory = this;
-gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node);
+gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node, !0);
 };
 e.prototype.canClearSick = function() {
 this.getComponent(l.MoveToCenter).move();
@@ -9654,10 +9627,15 @@ return c(this, function() {
 this.plantIcon.getComponent(cc.Animation).off(cc.Animation.EventType.FINISHED, this.onPlantAnimationFinish, this);
 this.plantIcon.node.active = !1;
 t = gData.gameData.getProductMap(this.plantID);
+if ("10_2" == mk.guide.getCurGuideIdString()) {
+this.data.growSpan = 0;
+this.data.state = s.FarmState.Ripe;
+} else {
 e = Date.now() + 1e3 * t.time;
+this.data.growSpan = e;
 this.data.state = s.FarmState.Growing;
+}
 this.data.productID = this.plantID;
-this.data.growSpan = e;
 gData.gameData.setFarmDataMap(this.configID, this.data);
 gData.gameData.isProducting = !1;
 return [ 2 ];
@@ -9672,13 +9650,16 @@ this.process.cleanProcess();
 };
 e.prototype.canHarvest = function() {
 gData.farmSystem.currSelectFarm = this;
-gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this), this.node);
+gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this), this.node, !0);
 };
 e.prototype.canClearSick = function() {
 gData.farmSystem.currSelectFarm = this;
 mk.data.sendDataEvent(s.DataEventId.button_click, "生虫icon");
 gData.adClearSickData.openPanel(s.ProductType.nzw, this.configID);
 };
+e.prototype.clickGuideBtn = function() {
+mk.guide.isGuiding() && gData.harvestData.openPanel(this.configID, this.plantID, this.onHarvest.bind(this), this.node, !1, !0);
+};
 i([ y({
 type: cc.Node,
 tooltip: "未解锁时显示节点"
@@ -12325,6 +12306,7 @@ e.btn6 = null;
 e.btn7 = null;
 e.btn8 = null;
 e.btn9 = null;
+e.btn12 = null;
 return e;
 }
 e.prototype.onLoad = function() {
@@ -12336,7 +12318,13 @@ this.init();
 e.prototype.init = function() {
 for (var t = gData.gameData.funOpenData, e = 0; e < t.length; e++) {
 var a = this["btn" + (e + 1)];
-a && (a.active = "1" == t[e]);
+if (a) {
+a.active = "1" == t[e];
+if (11 == e && "0" == t[e]) {
+this.btn5.y = this.btn5.y + 170;
+this.btn9.y = this.btn9.y + 170;
+}
+}
 }
 if (this.btn8.active) {
 var o = gData.gameData.playerProp.completeFarmTaskTimes >= parseInt(gData.gameData.configs.ServerConfig.FlyRedMoney);
@@ -12383,6 +12371,10 @@ i([ s({
 type: cc.Node,
 displayName: "互推"
 }) ], e.prototype, "btn9", void 0);
+i([ s({
+type: cc.Node,
+displayName: "订单"
+}) ], e.prototype, "btn12", void 0);
 return i([ c ], e);
 }(cc.Component);
 a.default = l;
@@ -12888,7 +12880,7 @@ this.playerProp.redMoneyCashPayRecordList = t.redMoneyCashPayRecordList;
 mk.console.logSingle("userNoviceWeFareInfo==>", t.userNoviceWeFareInfo);
 this.playerProp.userFarmTaskInfo = t.userFarmTaskInfo;
 this.playerProp.speedUpLeftTimes = t.speedUpLeftTimes;
-this.playerProp.completeFarmTaskTimes = 3;
+this.playerProp.completeFarmTaskTimes = t.completeFarmTaskTimes;
 this.playerProp.orderData = t.userOrderTaskInfo;
 console.log("==============initPlayerProp");
 console.log(t.userOrderTaskInfo);
@@ -13024,13 +13016,14 @@ this.setProp(i.leftTimes, this.leftTimes);
 this.maxTimes = parseInt(this.configs.ServerConfig.ProductionMax);
 this.ProductionRecovery = parseInt(this.configs.ServerConfig.ProductionRecovery);
 };
-t.prototype.changeLeftTimes = function(t, e) {
+t.prototype.changeLeftTimes = function(t, e, a) {
 void 0 === e && (e = !1);
+void 0 === a && (a = !0);
 gData.gameData.leftTimes += t;
 t > 0 && !e && (gData.gameData.leftTimes = gData.gameData.leftTimes > gData.gameData.maxTimes ? gData.gameData.maxTimes : gData.gameData.leftTimes);
 gData.gameData.leftTimes < 0 && (gData.gameData.leftTimes = 0);
 gData.gameData.setProp(i.leftTimes, gData.gameData.leftTimes);
-gData.gameData.init_leftTimes = !0;
+a && (gData.gameData.init_leftTimes = !0);
 };
 t.prototype.getFarmMapRewardState = function(t) {
 return t.i < this._farmMapRewardData.length && t.j < this._farmMapRewardData[t.i].length ? this._farmMapRewardData[t.i][t.j] : 1;
@@ -13283,7 +13276,7 @@ if (this.playerProp.userFarmTaskInfo) {
 t = this.playerProp.userFarmTaskInfo.completeCount;
 e = this.playerProp.userFarmTaskInfo.taskCount;
 if (t >= e) {
-this.gameStyle.getIsCanGetOrderReward() || mk.tip.pop("任务红包进度已满,快去提现");
+this.gameStyle.getIsCanGetOrderReward() ? mk.tip.pop("订单已完成,快领奖吧!") : mk.tip.pop("任务红包进度已满,快去提现");
 return [ 2, !1 ];
 }
 }
@@ -13645,7 +13638,10 @@ void 0 === e && (e = !1);
 var a = this.getProductMap(t);
 this._maxProduct || (this._maxProduct = []);
 for (var o = this._maxProduct.length, n = null, i = !1, r = 0; r < o; r++) if ((n = this._maxProduct[r]).tab == a.tab) {
-n.productID < t && (n.productID = t);
+if (n.productID < t) {
+n.productID = t;
+n.id = a.id;
+}
 i = !0;
 break;
 }
@@ -13765,6 +13761,7 @@ if (!this.maxProductToServer) return [ 3, 2 ];
 t = {
 unLockProductList: this._maxProduct
 };
+mk.console.logSingle("updateMaxProduct", t);
 return [ 4, mk.http.sendData("orderTask/updateUnlockProduct", t) ];
 
 case 1:
@@ -14397,6 +14394,8 @@ e.sp_mark = [];
 e.lbl_redMoneyValue = [];
 e.node_getOrderReward = null;
 e.node_orderHand = null;
+e.ani_add4 = null;
+e.lbl_addRedMoney = null;
 e.posY = 0;
 e.lastTimeSpan = 0;
 e.span = 0;
@@ -14433,7 +14432,7 @@ this.initInfo();
 this.runGuideWeak();
 this.initLeftTimes();
 this.initFarmExpUI();
-mk.guide.open(1);
+"1" == gData.gameData.funOpenData[11] && mk.guide.open(10) && mk.event.register("event_guide", this.initGuideEvent.bind(this), this);
 if (!mk.storage.getStorage("loadingFinish")) {
 mk.storage.setStorage("loadingFinish", 1);
 mk.data.sendDataEvent(d.DataEventId.loading, "loading结束");
@@ -14449,21 +14448,20 @@ gData.gameData.init_task && this.changeTaskUI();
 gData.gameData.init_expLevel && this.initFarmExpUI();
 gData.adData.startPopRed(t);
 gData.gameData.firstCheckNext();
-var e = 0;
+var e = 0, a = 0;
 if (gData.gameData.leftTimes < gData.gameData.maxTimes && 0 != this.lastTimeSpan) {
-var a = Date.now() - this.lastTimeSpan;
-if (a >= this.span) {
-e = Math.floor(a / this.span);
+var o = Date.now() - this.lastTimeSpan;
+if (o >= this.span) {
+e = Math.floor(o / this.span);
 this.lastTimeSpan += e * this.span;
 mk.storage.setStorage("lastTimeSpan", this.lastTimeSpan);
-gData.gameData.changeLeftTimes(e);
-gData.gameData.init_leftTimes = !0;
+a = gData.gameData.maxTimes - gData.gameData.leftTimes;
+gData.gameData.changeLeftTimes(e, !1, this.isShowAddProductTimesUI);
 }
 }
 if (!this.isShowAddProductTimesUI) {
 this.isShowAddProductTimesUI = !0;
-if (e > 0) {
-e = e > gData.gameData.maxTimes ? gData.gameData.maxTimes : e;
+if (e > 0 && (e = e > a ? a : e) > 0) {
 gData.gameData.restoreProductTimes = e;
 mk.ui.openPanel("module/speedUpUI/restoreProductTimes");
 }
@@ -14744,8 +14742,9 @@ console.log("dpFlyRedAni delay2-----");
 } else console.log("dpFlyRedAni2-----");
 };
 e.prototype.doFlyExpAni = function(t, e, a) {
-var o = this, n = this.lbl_farmLevel.node.parent.convertToWorldSpaceAR(this.lbl_farmLevel.node.getPosition());
-mk.fly.PlayCoinAnim(2, 3, e, n, function() {
+var o = this, n = this.lbl_farmLevel.node.parent.convertToWorldSpaceAR(this.lbl_farmLevel.node.getPosition()), i = 3;
+gData.harvestData.isMatchOrder && (i = 1);
+mk.fly.PlayCoinAnim(2, i, e, n, function() {
 if (gData.gameData.playerProp.gradeLevel < a.farmLevel) {
 gData.gameData.playerProp.gradeLevel = a.farmLevel;
 mk.data.setTAEventUser(0, "farm_lv", gData.gameData.playerProp.gradeLevel);
@@ -14805,16 +14804,50 @@ y: 240
 }).start();
 };
 e.prototype.clickFarmMapUIBtn = function() {
+mk.audio.playEffect("button");
+mk.data.sendDataEvent(d.DataEventId.button_click, "图鉴浮窗icon");
+if (this.productType == d.ProductType.nzw) if (gData.farmSystem.currSelectFarm) {
+if (gData.farmSystem.currSelectFarm.data.state != d.FarmState.Empty) {
+gData.farmSystem.currSelectFarm = null;
+for (var t = gData.farmSystem.farms, e = 0; e < t.length; e++) if (t[e].data.state == d.FarmState.Empty) {
+gData.farmSystem.currSelectFarm = t[e];
+break;
+}
+gData.farmSystem.currSelectFarm || (gData.farmSystem.currSelectFarm = t[0]);
+}
+} else {
+for (t = gData.farmSystem.farms, e = 0; e < t.length; e++) if (t[e].data.state == d.FarmState.Empty) {
+gData.farmSystem.currSelectFarm = t[e];
+break;
+}
+gData.farmSystem.currSelectFarm || (gData.farmSystem.currSelectFarm = t[0]);
+} else {
+var a = -1, o = gData.factorySystem.factoryIcons;
+for (e = 0; e != o.length; ++e) if (o[e].tab == this.productType && o[e].data.state == d.FarmState.Empty) {
+-1 != a && (a = e);
+gData.factorySystem.currSelectFactory = o[e];
+break;
+}
+gData.factorySystem.currSelectFactory || (gData.factorySystem.currSelectFactory = o[a]);
+}
 gData.plantData.openPanel(this.productType, 1, this.productIndex - 1);
 };
 e.prototype.initFarmMapUi = function() {
 return r(this, void 0, void 0, function() {
-var t, e, a, o, n, i, r, s;
+var t, e, a, o, n, i, r, s, l, p;
 return c(this, function() {
+if ("0" == gData.gameData.funOpenData[12]) {
+this.node_farmMapUI.active = !1;
+return [ 2 ];
+}
 this.uiShowType = 3;
 for (t in d.ProductType) if (e = gData.gameData.getMaxProduct(d.ProductType[t])) {
 a = gData.gameData.getProductArrByType(d.ProductType[t]);
-for (o = 0; o != a.length; ++o) if ((n = a[o]).picture <= e) {
+for (o = 0; o != a.length; ++o) {
+n = a[o];
+i = !0;
+d.ProductType[t] == d.ProductType.nzw && (i = n.picture > 10003);
+if (i && n.picture <= e) {
 if (0 == gData.gameData.getFarmMapRewardState(this.getIndex(n))) {
 this.uiShowType = 1;
 this.productType = d.ProductType[t];
@@ -14822,6 +14855,7 @@ this.productIndex = o;
 this.node_farmMapGetReward.active = !0;
 this.node_farmMapProduct.active = !1;
 this.node_farmMapUI.active = !0;
+this.node_farmMapUI.width = 320;
 return [ 2 ];
 }
 } else if (n.picture - 1 == e && 1 == n.unlock) {
@@ -14831,13 +14865,16 @@ this.productIndex = o;
 this.node_farmMapGetReward.active = !1;
 this.node_farmMapProduct.active = !0;
 this.node_farmMapUI.active = !0;
-i = gData.gameData.getProductMakeTimesById(n.picture - 1);
-r = gData.gameData.getProductMap(n.picture - 1).name;
-s = this.getDesByType(n);
-this.lbl_farmMapDes.string = "<color=#7E411F>" + s + "<color=#FF0000>" + n.value + "</c>次" + r + " <color=#FF0000>" + i + "</c>/" + n.value + "</color>";
+r = gData.gameData.getProductMakeTimesById(n.picture - 1);
+s = gData.gameData.getProductMap(n.picture - 1).name;
+l = this.getDesByType(n);
+p = s.length;
+this.node_farmMapUI.width = 300 + 20 * (p - 2) + 5 * (p - 2);
+this.lbl_farmMapDes.string = "<color=#7E411F>" + l + "<color=#FF0000>" + n.value + "</c>次" + s + " <color=#FF0000>" + r + "</c>/" + n.value + "</color>";
 return [ 2 ];
 }
 }
+}
 3 == this.uiShowType && (this.node_farmMapUI.active = !1);
 return [ 2 ];
 });
@@ -14851,9 +14888,11 @@ this.lbl_farmMapDes.string = "<color=#7E411F>" + o + "<color=#FF0000>" + t.value
 };
 e.prototype.clickGetFarmMapRewardBtn = function() {
 var t = this;
+mk.audio.playEffect("button");
 if (!this.startTimes) {
 this.startTimes = !0;
 this.btnCD = 0;
+mk.data.sendDataEvent(d.DataEventId.button_click, "图鉴浮窗icon");
 mk.audio.playEffect("button");
 mk.ad.videoAdType = d.VideoAdType.video_init_6;
 mk.ad.watchAd(function(e) {
@@ -14887,15 +14926,12 @@ return [ 2 ];
 }
 };
 e.prototype.showChangePart = function() {
-var t = this, e = this.lbl_value.length, a = this.lbl_redMoneyValue.length;
+var t = this, e = this.lbl_value.length;
+this.lbl_redMoneyValue.length;
 this.schedule(function() {
-for (var o = 0; o < e; o++) {
-var n = s.default.rnd(0, 9);
-t.lbl_value[o].string = "" + n;
-}
-for (o = 0; o < a; o++) {
-n = s.default.rnd(0, 9);
-t.lbl_redMoneyValue[o].string = "" + n;
+for (var a = 0; a < e; a++) {
+var o = s.default.rnd(0, 9);
+t.lbl_value[a].string = "" + o;
 }
 }, .1);
 };
@@ -15024,6 +15060,7 @@ this.orderPicIdArray = [];
 this.isGray = !0;
 t = gData.gameData.configs.Product;
 if (!(e = gData.gameData.playerProp.orderData)) return [ 3, 8 ];
+this.lbl_addRedMoney.string = e.redMoneyAddition / 100 + "";
 if (3 != (a = e.orderTaskList.length)) return [ 3, 6 ];
 o = 0;
 n = 0;
@@ -15073,6 +15110,7 @@ this.node_orderHand.active = !0;
 } else {
 this.isGray = !0;
 this.node_getOrderReward.setGray(!0, !0);
+this.node_getOrderReward.getComponent(cc.Animation).setCurrentTime(0);
 this.node_getOrderReward.getComponent(cc.Animation).stop();
 this.node_orderHand.active = !1;
 }
@@ -15096,6 +15134,7 @@ return [ 2 ];
 });
 };
 e.prototype.clickGetOrderRewardBtn = function() {
+mk.audio.playEffect("button");
 this.isGray ? mk.tip.pop("订单未完成") : this.getOrderReward();
 };
 e.prototype.getIsCanGetOrderReward = function() {
@@ -15103,15 +15142,16 @@ return !this.isGray;
 };
 e.prototype.getOrderReward = function() {
 return r(this, void 0, void 0, function() {
-var t, e;
-return c(this, function(a) {
-switch (a.label) {
+var t, e, a;
+return c(this, function(o) {
+switch (o.label) {
 case 0:
 t = {};
 return [ 4, mk.http.sendData("orderTask/receiveReward", t) ];
 
 case 1:
-if (0 != (e = a.sent()).errcode) return [ 2, null ];
+if (0 != (e = o.sent()).errcode) return [ 2, null ];
+a = gData.gameData.playerProp.orderData.redMoneyAddition;
 gData.gameData.playerProp.orderData = e.data.userOrderTaskInfo;
 gData.gameData.cloneOrderData(!0);
 gData.reward.adData = {
@@ -15121,7 +15161,7 @@ videoRewardList: null
 };
 gData.reward.adData.videoRedMoney.videoRewardList = [ {
 rewardType: 1,
-rewardNum: e.data.redMoneyAddition
+rewardNum: a
 } ];
 mk.ui.openPanel("module/reward/reward");
 this.initOrderUI();
@@ -15138,18 +15178,18 @@ return c(this, function(s) {
 switch (s.label) {
 case 0:
 o = function(o) {
-var i, s, l, p;
-return c(this, function(u) {
-switch (u.label) {
+var i, s, l, p, u;
+return c(this, function(d) {
+switch (d.label) {
 case 0:
-if (t != n.orderPicIdArray[o].picID) return [ 3, 6 ];
-if (!((i = gData.gameData.playerProp.orderData.orderTaskList[o]).completeCount < i.taskCount)) return [ 3, 5 ];
+if (t != n.orderPicIdArray[o].picID) return [ 3, 7 ];
+if (!((i = gData.gameData.playerProp.orderData.orderTaskList[o]).completeCount < i.taskCount)) return [ 3, 6 ];
 s = "";
 s = a ? "game/coregame/texture/plant_icons/plantIcon_" : "game/coregame/texture/factory_icons/factory_";
 return [ 4, n.updataOrderProgress(n.orderPicIdArray[o].ID) ];
 
 case 1:
-u.sent();
+d.sent();
 l = function(a) {
 var i, l;
 return c(this, function(c) {
@@ -15172,23 +15212,37 @@ return [ 2 ];
 });
 };
 p = 0;
-u.label = 2;
+d.label = 2;
 
 case 2:
 return 3 == p ? [ 3, 5 ] : [ 5, l(p) ];
 
 case 3:
-u.sent();
-u.label = 4;
+d.sent();
+d.label = 4;
 
 case 4:
 ++p;
 return [ 3, 2 ];
 
 case 5:
-return [ 2, "break" ];
+(u = cc.instantiate(n.ani_add4)).parent = e;
+u.setPosition(cc.Vec2.ZERO);
+cc.tween(u).delay(.8).call(function() {
+u.opacity = 255;
+}).by(.8, {
+y: 100
+}).to(.4, {
+opacity: 0
+}).call(function() {
+u.destroy();
+}).start();
+d.label = 6;
 
 case 6:
+return [ 2, "break" ];
+
+case 7:
 return [ 2 ];
 }
 });
@@ -15230,7 +15284,7 @@ this.node_getOrderReward.setGray(!1, !0);
 this.node_getOrderReward.getComponent(cc.Animation).play();
 this.node_orderHand.active = !0;
 mk.ui.closeAllUI();
-mk.guide.open(3) || mk.tip.pop("订单已完成,快领奖吧!");
+"1" == gData.gameData.funOpenData[11] && mk.guide.open(12) || mk.tip.pop("订单已完成,快领奖吧!");
 }
 if (i = e.orderTaskList[t]) if (i.completeCount == i.taskCount) {
 this.lbl_progress[t].node.active = !1;
@@ -15266,11 +15320,19 @@ return [ 2 ];
 });
 };
 e.prototype.clickOrderUIBtn = function() {
-var t = gData.gameData.playerProp.orderData, e = t.orderTaskList, a = gData.gameData.playerProp.copyOrderData;
-if (t && e && a) {
-for (var o = 0, n = 0; n != e.length; ++n) o += e[n].taskCount - a[n];
-mk.guide.curDes = "<color=8A4312>继续生产" + o + "次,很快就\n可以提现了!</color>";
+mk.audio.playEffect("button");
+mk.guide.isGuiding() || mk.tip.pop("收获相应物品即可领奖");
+};
+e.prototype.judgeContinueTeach = function() {
+var t = gData.gameData.leftTimes;
+if (t > 0) {
+mk.guide.curDes = "<color=8A4312><color=ff0000>继续生产" + t + "次</c>,很快就\n可以完成订单了!</color>";
+return !0;
 }
+return !1;
+};
+e.prototype.initGuideEvent = function() {
+gData.farmSystem._lastSeletFarm && gData.farmSystem._lastSeletFarm.clickGuideBtn();
 };
 i([ y({
 type: cc.Node,
@@ -15420,6 +15482,14 @@ i([ y({
 displayName: "手指",
 type: cc.Node
 }) ], e.prototype, "node_orderHand", void 0);
+i([ y({
+type: cc.Node,
+displayName: "增加效果文本2"
+}) ], e.prototype, "ani_add4", void 0);
+i([ y({
+displayName: "红包币",
+type: cc.Label
+}) ], e.prototype, "lbl_addRedMoney", void 0);
 return i([ f ], e);
 }(cc.Component);
 a.default = m;
@@ -16369,6 +16439,7 @@ r.click_rect = c.clickRect;
 r.finger = c.finger;
 r.lag_next = parseFloat(c.lagNext);
 r.display_type = parseInt(c.trNum);
+r.continue = c.continue;
 if (o != r.id) {
 this.data.set(o, a);
 a = [];
@@ -16399,6 +16470,8 @@ value: !0
 var o = t("../../game/data/GameData"), n = t("./UISystem"), i = function() {
 function t() {
 this.curDes = "";
+this.curGuideIdStr = null;
+this.continueCallBack = null;
 }
 t.prototype.open = function(t, e) {
 void 0 === e && (e = "");
@@ -16421,7 +16494,7 @@ this.setGuideID(this.crtGuideID++);
 return !0;
 };
 t.prototype.setGuideID = function(t) {
-if (4 == t) {
+if (12 == t) {
 t = 9999;
 mk.data.sendXYEvent("guide_end", "新手引导结束");
 }
@@ -16436,6 +16509,9 @@ return !this.crtGuideID || 9999 === this.crtGuideID;
 t.prototype.isGuiding = function() {
 return null != mk.ui.getCurOnPanel("guide");
 };
+t.prototype.getCurGuideIdString = function() {
+return this.curGuideIdStr;
+};
 return t;
 }();
 a.default = i;
@@ -16452,6 +16528,7 @@ value: !0
 });
 a.default = function() {
 this.display_type = 0;
+this.continue = null;
 };
 cc._RF.pop();
 }, {} ],
@@ -16766,6 +16843,7 @@ this.nextStep();
 e.prototype.nextStep = function() {
 this.crtStep++;
 this.crtGuide = this.guides[this.crtStep];
+mk.guide.curGuideIdStr = gData.guideData.crtID + "_" + this.crtStep;
 mk.data.sendDataEvent(s.DataEventId.guide, "新手引导第" + gData.guideData.crtID + "_" + this.crtStep + "步完成");
 this.updateGuide();
 };
@@ -16933,6 +17011,7 @@ t.sent();
 t.label = 2;
 
 case 2:
+"true" == this.crtGuide.continue && mk.guide.continueCallBack && mk.guide.continueCallBack() && --this.crtStep;
 this.nextStep();
 return [ 2 ];
 }
@@ -16954,6 +17033,8 @@ this.node_dialog.opacity = 0;
 };
 e.prototype.close = function() {
 mk.guide.close();
+mk.guide.curGuideIdStr = null;
+mk.guide.continueCallBack = null;
 mk.ui.closePanel(this.node.name);
 };
 e.prototype.clickSkip = function() {
@@ -17157,17 +17238,38 @@ e.getType = 0;
 e.init_reward = !1;
 e.node_fly = null;
 e.isMatchOrder = !1;
+e.isTouchBtn = !1;
+e.isCdOver = !0;
 return e;
 }
-e.prototype.openPanel = function(t, e, a, o) {
+e.prototype.openPanel = function(t, e, a, o, n, i) {
+void 0 === n && (n = !1);
+void 0 === i && (i = !1);
+if (this.isCdOver) {
 this.configID = t;
 this.plantID = e;
 this.call = a;
 this.node_fly = o;
+this.isTouchBtn = n;
 this.config = gData.gameData.getProductMap(this.plantID);
 this.judgeIsMatchOrder();
-var n = mk.guide.isGuiding(), i = Math.random(), r = gData.adData.getPerByEcpm(s.RateConfig.RC_superDouble);
-!n && i <= r ? mk.ui.openPanel("game/prefab/uiPanel/HarvestPanel") : this.getNormalReward();
+if (i) {
+this.isCdOver = !1;
+this.getNormalReward();
+} else {
+var r = mk.guide.isGuiding(), c = Math.random(), l = gData.adData.getPerByEcpm(s.RateConfig.RC_superDouble);
+if (!r && c <= l) if (gData.gameData.playerProp.orderData && gData.gameData.playerProp.orderData.overTimes > 0) {
+this.isTouchBtn = !1;
+mk.ui.openPanel("game/prefab/uiPanel/HarvestPanel");
+} else {
+this.isCdOver = !1;
+this.getNormalReward();
+} else {
+this.isCdOver = !1;
+this.getNormalReward();
+}
+}
+}
 };
 e.prototype.setAdData = function(e) {
 mk.console.logSingle("HarvestData  addata ", this.adData);
@@ -17180,32 +17282,68 @@ gData.harvestData.call = null;
 };
 e.prototype.getNormalReward = function() {
 return r(this, void 0, void 0, function() {
-var t, e, a, o;
-return c(this, function(n) {
-switch (n.label) {
+var t, e, a, o, n, i, r, s, l = this;
+return c(this, function(c) {
+switch (c.label) {
 case 0:
-return [ 4, mk.time.WaitForSeconds(.5) ];
+return this.isTouchBtn ? [ 4, mk.time.WaitForSeconds(.5) ] : [ 3, 2 ];
 
 case 1:
-n.sent();
+c.sent();
+c.label = 2;
+
+case 2:
 t = {
 id: this.config.id
 };
 return [ 4, mk.http.sendData("redMoney/addRedMoneyByFarm", t) ];
 
-case 2:
-if ((e = n.sent()) && 0 != e.errcode) return [ 2 ];
-if (e.data.redMoneyAddition <= 0) console.log("返回奖励为0"); else {
+case 3:
+if ((e = c.sent()) && 0 != e.errcode) return [ 2 ];
+if (!(e.data.redMoneyAddition <= 0)) return [ 3, 4 ];
+this.isCdOver = !0;
+console.log("返回奖励为0");
+return [ 3, 7 ];
+
+case 4:
+if (!this.isTouchBtn) return [ 3, 6 ];
+a = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
+o = mk.fly.node.convertToNodeSpaceAR(a);
+return [ 4, mk.loader.load("module/guide/hand", cc.Prefab) ];
+
+case 5:
+n = c.sent();
+(i = cc.instantiate(n)).scale = .8;
+i.getComponent(cc.Animation).getAnimationState("guideA").speed = 2;
+i.parent = mk.fly.node;
+i.setPosition(o);
+cc.tween(i).delay(.4).call(function() {
+l.isCdOver = !0;
+l.getType = 0;
+var t = [ {
+rewardType: 1,
+rewardNum: e.data.redMoneyAddition
+} ];
+gData.reward.data = t;
+gData.reward.callback = l.call;
+gData.reward.getReward(a, l.isMatchOrder);
+}).removeSelf().start();
+return [ 3, 7 ];
+
+case 6:
+this.isCdOver = !0;
 this.getType = 0;
-a = [ {
+r = [ {
 rewardType: 1,
 rewardNum: e.data.redMoneyAddition
 } ];
-gData.reward.data = a;
+gData.reward.data = r;
 gData.reward.callback = this.call;
-o = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
-gData.reward.getReward(o, this.isMatchOrder);
-}
+s = this.node_fly.parent.convertToWorldSpaceAR(this.node_fly.getPosition());
+gData.reward.getReward(s, this.isMatchOrder);
+c.label = 7;
+
+case 7:
 return [ 2 ];
 }
 });
@@ -17405,7 +17543,7 @@ rewardNum: e.data.redMoneyAddition
 gData.reward.data = a;
 gData.reward.callback = gData.harvestData.call;
 o = gData.harvestData.node_fly.parent.convertToWorldSpaceAR(gData.harvestData.node_fly.getPosition());
-gData.reward.getReward(o);
+gData.reward.getReward(o, gData.harvestData.isMatchOrder);
 }
 mk.ui.closePanel("HarvestPanel");
 return [ 2 ];
@@ -18641,7 +18779,7 @@ var t = "";
 cc.sys.os == cc.sys.OS_ANDROID ? t = this.callStaticMethod(this._JSB_ANDROID_PATH, "getAliDeviceToken", "()Ljava/lang/String;") : cc.sys.os == cc.sys.OS_IOS && (t = this.callStaticMethod("AppController", "openWx", ""));
 return t;
 };
-t.closePanelFromHome = function() {
+t.backKeyCallBack = function() {
 this.callBack && this.callBack();
 };
 t.systemExit = function() {
@@ -18721,7 +18859,8 @@ return e;
 e.prototype.showTips = function() {
 var t = this;
 cc.tween(this).delay(.5).call(function() {
-mk.tip.pop("插队成功,并获得" + t.redMoney + "红包币");
+var e = Math.round(t.redMoney / 100);
+mk.tip.pop("插队成功,并获得" + e + "红包币");
 }).start();
 };
 e.prototype.setAdData = function(e) {
@@ -22966,7 +23105,7 @@ return [ 2 ];
 };
 e.prototype.canHarvest = function() {
 this.getComponent(l.MoveToCenter).move();
-gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node);
+gData.harvestData.openPanel(this.configID, this.data.productID, this.onHarvest.bind(this), this.node, !0);
 };
 e.prototype.canClearSick = function() {
 this.getComponent(l.MoveToCenter).move();
@@ -23677,7 +23816,7 @@ var t = this;
 this.list_data = gData.plantData.productArr;
 this.tableView.node.emit("srollview-init", this.list_data);
 gData.plantData.productIndex > 1 && cc.tween(this).delay(.2).call(function() {
-t.tableView.contentMoveByIndex(gData.plantData.productIndex - 1, .1);
+t.list_data.length > 4 && (gData.plantData.productIndex <= t.list_data.length - 4 ? t.tableView.contentMoveByIndex(gData.plantData.productIndex - 1, .1) : t.tableView.contentMoveByIndex(t.list_data.length - 4, .1));
 }).start();
 };
 e.prototype.onDestroy = function() {};
@@ -24297,8 +24436,10 @@ this.scheduleOnce(function() {
 var t = gData.gameData.playerProp.orderData, e = t.orderTaskList, a = gData.gameData.playerProp.copyOrderData;
 if (t && e && a) {
 for (var o = 0, n = 0; n != e.length; ++n) o += e[n].taskCount - a[n];
-var i = "<color=8A4312>再收获" + o + "次,就可以完成\n订单,提现仅一步之遥!</color>";
-mk.guide.open(2, i);
+if ("1" == gData.gameData.funOpenData[11]) {
+var i = "<color=8A4312>再生产" + o + "次,就可以收获\n啦,完成订单立即<color=ff0000>提现</color>!</color>";
+mk.guide.open(11, i);
+}
 }
 }, .5);
 } else {
@@ -24321,7 +24462,7 @@ this.node_1.active = !1;
 this.node_2.active = !0;
 }
 }
-e ? gData.gameData.getProp(r.GameProp.guideID) >= 2 && mk.ad.showNative() : mk.ad.showNative();
+e ? gData.gameData.getProp(r.GameProp.guideID) >= 11 && mk.ad.showNative() : mk.ad.showNative();
 };
 e.prototype.update = function() {
 if (gData.gameData.init_productTask) {
@@ -25890,10 +26031,15 @@ n(e, t);
 function e() {
 var e = null !== t && t.apply(this, arguments) || this;
 e.lbl_times = null;
+e.lbl_double = null;
 return e;
 }
 e.prototype.start = function() {
 this.lbl_times.string = r.default.format(this.lbl_times.string, gData.gameData.restoreProductTimes.toString());
+this.lbl_double.string = r.default.format(this.lbl_double.string, gData.gameData.restoreProductTimes.toString());
+};
+e.prototype.onEnable = function() {
+mk.ad.showNative();
 };
 e.prototype.clickVideoBtn = function() {
 var t = this;
@@ -25905,23 +26051,46 @@ if (e) {
 gData.adData.watchVideo(null);
 var a = [ {
 rewardType: 4,
-rewardNum: gData.gameData.restoreProductTimes
+rewardNum: 2 * gData.gameData.restoreProductTimes
 } ];
 gData.reward.data = a;
-gData.reward.callback = t.addTimes;
+gData.reward.callback = t.addDoubleTimes;
 mk.ui.openPanel("module/reward/reward");
 }
 });
 };
+e.prototype.addDoubleTimes = function() {
+var t = gData.gameData.restoreProductTimes;
+gData.gameData.changeLeftTimes(t, !0);
+gData.gameData.gameStyle.playAdd(2 * t, 2);
+};
+e.prototype.clickCloseBtn = function() {
+mk.audio.playEffect("button");
+mk.ui.closePanel(this.node.name);
+var t = [ {
+rewardType: 4,
+rewardNum: gData.gameData.restoreProductTimes
+} ];
+gData.reward.data = t;
+gData.reward.callback = this.addTimes;
+mk.ui.openPanel("module/reward/reward");
+};
 e.prototype.addTimes = function() {
 var t = gData.gameData.restoreProductTimes;
-gData.gameData.changeLeftTimes(t);
+gData.gameData.init_leftTimes = !0;
 gData.gameData.gameStyle.playAdd(t, 2);
 };
+e.prototype.onDisable = function() {
+mk.ad.destroyNativeAd();
+};
 i([ p({
 type: cc.RichText,
 displayName: "文本"
 }) ], e.prototype, "lbl_times", void 0);
+i([ p({
+type: cc.Label,
+displayName: "按钮文本"
+}) ], e.prototype, "lbl_double", void 0);
 return i([ l ], e);
 }(cc.Component);
 a.default = u;
@@ -25988,7 +26157,7 @@ void 0 === e && (e = !1);
 if (gData.reward.data && gData.reward.data.length) for (var o = gData.reward.data.length, n = 0; n < o; n++) if (gData.reward.data[n].rewardType !== r.RewardType.rmb && 0 != gData.reward.data[n].rewardNum) {
 mk.audio.playEffect("redmoney");
 var i = "", c = 10;
-e && (c = 4);
+e && (c = 1);
 var s = -1;
 if (gData.reward.data[n].rewardType === r.RewardType.productTimes) {
 i = "Canvas/主界面层/game/功能按钮/底部按钮/中间按钮";
@@ -28732,6 +28901,10 @@ void 0 === e && (e = .5);
 var a = this.itemPosMap.get(t).startPos;
 this.direction == r.vertical ? this.scrollView.scrollToOffset(new cc.Vec2(this.content.x, a), e) : this.scrollView.scrollToOffset(new cc.Vec2(a, this.content.y), e);
 };
+e.prototype.moveButtom = function() {
+var t = this.scrollView.getMaxScrollOffset();
+this.scrollView.scrollToOffset(t, .1);
+};
 e.prototype.getItemByIndexAndCount = function(t, e) {
 for (var a = [], o = 0; o != this.itemArr.length; ++o) for (var n = t; n != t + e; ++n) if (this.itemArr[o].index == n) {
 a.push(this.itemArr[o]);
@@ -31092,7 +31265,7 @@ if (!(t && t.length > 0 && -1 != t.indexOf(e))) {
 var a = this.getCurOnPanel(e);
 if (a) {
 var o = a.getComponent("EffectOpenAndClose");
-o ? o.hideEffect(this.destroyNode.bind(this, a, e)) : this.destroyNode(a, e);
+o && o.isOpenCloseEffect ? o.hideEffect(this.destroyNode.bind(this, a, e)) : this.destroyNode(a, e);
 mk.event.emit("close-panel", e);
 }
 }

+ 2 - 2
packages-hot-update/cfg.json

@@ -10,7 +10,7 @@
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyTest/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/kxnlyJsb/baseRemote/"
     ],
-    "buildTime": 1635125034974,
-    "genTime": 1635125034974,
+    "buildTime": 1635313181310,
+    "genTime": 1635313181310,
     "genVersion": null
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов