kaka 4 роки тому
батько
коміт
363cfa2253

+ 12 - 0
assets/resources/animation/Main.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "4e4c7e27-6fce-4142-bde1-d4e0cea5b72e",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 36 - 92
assets/resources/data/guide_data.json

@@ -4,7 +4,7 @@
 		"trigger": "1",
 		"trNum": "0",
 		"trForm": "2",
-		"dialogPos": ":20::::",
+		"dialogPos": ":0::::",
 		"dialogPos1": "",
 		"dialogAlignment": "1",
 		"dialog": "<color=476175>欢迎来到《开心农乐园》\n让我带你了解农场的玩法吧~</color>",
@@ -17,126 +17,70 @@
 		"id": "1_2",
 		"trigger": "1",
 		"trNum": "0",
-		"trForm": "2",
-		"dialogPos": ":20::::",
+		"trForm": "1",
+		"dialogPos": "300:::::",
 		"dialogPos1": "",
 		"dialogAlignment": "1",
-		"dialog": "<color=476175>点击</color><color=2ed04c>“开始游戏”</color>",
+		"dialog": "<color=476175>“任务红包”开启\n完成任务可立即提现</color>",
 		"displayRect": "",
-		"clickRect": "界面层/game/开始按钮",
-		"finger": "10:20",
+		"clickRect": "主界面层/game/node_ui/顶部个人信息/任务",
+		"finger": "100:20",
 		"lagNext": "1"
 	},
 	{
 		"id": "1_3",
 		"trigger": "1",
 		"trNum": "0",
-		"trForm": "2",
-		"dialogPos": "",
-		"dialogPos1": "295,-340",
-		"dialogAlignment": "1",
-		"dialog": "<color=476175>点击一下即可消除哦!</color>",
-		"displayRect": "-300:15:100:510",
-		"clickRect": "event",
-		"finger": "0:-50",
-		"lagNext": "1"
-	},
-	{
-		"id": "1_4",
-		"trigger": "1",
-		"trNum": "0",
-		"trForm": "2",
-		"dialogPos": "",
-		"dialogPos1": "0,-200",
+		"trForm": "1",
+		"dialogPos": ":300::::",
+		"dialogPos1": "",
 		"dialogAlignment": "1",
-		"dialog": "<color=476175>进度满即可</color><br/><color=ff4b4d>获得红包</color>",
-		"displayRect": "1:380:150:200",
+		"dialog": "<color=476175>完成任务必得现金,最\n高可以提现100元哦!</color>",
+		"displayRect": "0:200:500:300",
 		"clickRect": "all",
-		"finger": "",
-		"lagNext": "0"
-	},
-	{
-		"id": "1_5",
-		"trigger": "1",
-		"trNum": "0",
-		"trForm": "2",
-		"dialogPos": "",
-		"dialogPos1": "-40,-520",
-		"dialogAlignment": "1",
-		"dialog": "<color=476175>加油,红包就在眼前</color>",
-		"displayRect": "45:-30:600:600",
-		"clickRect": "event",
-		"finger": "50:20",
-		"lagNext": "2.5"
-	},
-	{
-		"id": "1_6",
-		"trigger": "1",
-		"trNum": "220",
-		"trForm": "2",
-		"dialogPos": "",
-		"dialogPos1": "0,-400",
-		"dialogAlignment": "1",
-		"dialog": "<color=476175>打开红包奖励</color>",
-		"displayRect": "",
-		"clickRect": "界面层/rewardLuck/动画节点/红包节点/按钮_广告",
-		"finger": "50:0",
+		"finger": "100:-100",
 		"lagNext": "1"
 	},
 	{
-		"id": "1_7",
-		"trigger": "1",
-		"trNum": "0",
-		"trForm": "2",
-		"dialogPos": "",
-		"dialogPos1": "0,-450",
-		"dialogAlignment": "1",
-		"dialog": "<color=476175>点击领取!</color>",
-		"displayRect": "",
-		"clickRect": "界面层/rewardLuck/动画节点/红包节点/领取按钮",
-		"finger": "50:20",
-		"lagNext": "0.5"
-	},
-	{
-		"id": "1_8",
+		"id": "2_1",
 		"trigger": "1",
 		"trNum": "0",
-		"trForm": "2",
-		"dialogPos": "",
-		"dialogPos1": "100,-650",
+		"trForm": "1",
+		"dialogPos": ":200::::",
+		"dialogPos1": "",
 		"dialogAlignment": "1",
-		"dialog": "<color=476175>达到</color><color=ff4b4d>3000</color><color=476175>即可提现!</color>",
+		"dialog": "<color=476175>点击生产,即可种植农\n作物,获得红包币哦</color>",
 		"displayRect": "",
-		"clickRect": "界面层/game/node_ui/顶部个人信息/红包币按钮",
-		"finger": "50:20",
-		"lagNext": "0"
+		"clickRect": "主界面层/game/功能按钮/底部按钮/中间按钮",
+		"finger": "100:20",
+		"lagNext": "1"
 	},
 	{
-		"id": "2_1",
+		"id": "3_1",
 		"trigger": "1",
 		"trNum": "0",
-		"trForm": "2",
-		"dialogPos": "",
-		"dialogPos1": "85,-650",
+		"trForm": "1",
+		"dialogPos": ":0::::",
+		"dialogPos1": "",
 		"dialogAlignment": "1",
-		"dialog": "<color=476175>达到提现条件啦!</color>",
-		"displayRect": "",
-		"clickRect": "界面层/game/node_ui/顶部个人信息/红包币按钮",
-		"finger": "50:20",
+		"dialog": "<color=476175>点击生产,即可种植农\n作物,获得红包币哦</color>",
+		"displayRect": "0:107:588:850",
+		"clickRect": "event",
+		"finger": "100:-350",
 		"lagNext": "1"
 	},
 	{
-		"id": "2_2",
+		"id": "4_1",
 		"trigger": "1",
 		"trNum": "0",
-		"trForm": "2",
-		"dialogPos": "",
-		"dialogPos1": "0,-400",
+		"trForm": "1",
+		"dialogPos": "300:::::",
+		"dialogPos1": "",
 		"dialogAlignment": "1",
-		"dialog": "<color=476175>点击即可提现!</color>",
+		"dialog": "<color=476175>太棒啦!你完成了任务!\n快点击提现吧~</color>",
 		"displayRect": "",
-		"clickRect": "界面层/redBagCash/动画节点/滚动视图/view/content/redBagCashItem/可领取",
-		"finger": "180:10",
-		"lagNext": "0"
+		"clickRect": "主界面层/game/node_ui/顶部个人信息/任务",
+		"finger": "100:20",
+		"lagNext": "1"
 	}
 ]

+ 8 - 8
assets/resources/game/prefab/game.prefab

@@ -4538,8 +4538,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 309,
-      "height": 86
+      "width": 370.8,
+      "height": 103.2
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -4557,8 +4557,8 @@
         0,
         0,
         1,
-        1.2,
-        1.2,
+        1,
+        1,
         1
       ]
     },
@@ -4899,7 +4899,7 @@
     "asset": {
       "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
     },
-    "fileId": "02QEu2Ax9AvKF9huIHDDYV",
+    "fileId": "59R06qpOdE/btgH0eIJmrg",
     "sync": false
   },
   {
@@ -5132,7 +5132,7 @@
     "asset": {
       "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
     },
-    "fileId": "52FEyxuxJPg6VeXdH0Kefl",
+    "fileId": "d5GXDLdDJEZrT08zbdmBU6",
     "sync": false
   },
   {
@@ -5262,7 +5262,7 @@
     "asset": {
       "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
     },
-    "fileId": "11+qK8jEdNIrpyKR0IfHy6",
+    "fileId": "cdYElazvNHYorclhr8qdVr",
     "sync": false
   },
   {
@@ -5445,7 +5445,7 @@
       "__uuid__": "6d5ab9a8-bbcb-4582-8a9b-deba178f62bb"
     },
     "_type": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillType": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",

+ 38 - 68
assets/resources/module/guide/guide.prefab

@@ -30,20 +30,20 @@
         "__id__": 17
       },
       {
-        "__id__": 54
+        "__id__": 53
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 66
+        "__id__": 65
       },
       {
-        "__id__": 67
+        "__id__": 66
       }
     ],
     "_prefab": {
-      "__id__": 68
+      "__id__": 67
     },
     "_opacity": 255,
     "_color": {
@@ -601,11 +601,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 52
+        "__id__": 51
       }
     ],
     "_prefab": {
-      "__id__": 53
+      "__id__": 52
     },
     "_opacity": 255,
     "_color": {
@@ -618,7 +618,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 750,
-      "height": 180
+      "height": 300
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -630,7 +630,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        -541,
+        0,
         0,
         0,
         0,
@@ -698,7 +698,7 @@
       "ctor": "Float64Array",
       "array": [
         -227.732,
-        243.13600000000002,
+        -4.247,
         0,
         0,
         0,
@@ -969,7 +969,7 @@
     "asset": {
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
     },
-    "fileId": "59kPpDBH9CYp9PUkbXbJL4",
+    "fileId": "66bBW5QxRGtr9rdfCeGS8j",
     "sync": false
   },
   {
@@ -1080,7 +1080,7 @@
     "asset": {
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
     },
-    "fileId": "a63zZ6OuJAnbzzd5vMPCXF",
+    "fileId": "17Y+/D9KhAuI9URZowezWk",
     "sync": false
   },
   {
@@ -1222,13 +1222,10 @@
     "_components": [
       {
         "__id__": 49
-      },
-      {
-        "__id__": 50
       }
     ],
     "_prefab": {
-      "__id__": 51
+      "__id__": 50
     },
     "_opacity": 255,
     "_color": {
@@ -1253,7 +1250,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        -38.685,
+        -64.338,
         0,
         0,
         0,
@@ -1631,7 +1628,7 @@
     "asset": {
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
     },
-    "fileId": "deIWb5EvNPTIH1j4zP7OzL",
+    "fileId": "1bJQaSv6BM6aV66VBVuqHB",
     "sync": false
   },
   {
@@ -1742,7 +1739,7 @@
     "asset": {
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
     },
-    "fileId": "0fJG3oP0VNFZRJjKASSX7w",
+    "fileId": "5bbnoLtd1NLKv2XWy8M6jd",
     "sync": false
   },
   {
@@ -1855,33 +1852,6 @@
     "_id": ""
   },
   {
-    "__type__": "cc.Widget",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 33
-    },
-    "_enabled": true,
-    "alignMode": 1,
-    "_target": null,
-    "_alignFlags": 4,
-    "_left": 0,
-    "_right": 0,
-    "_top": 0,
-    "_bottom": -36.685,
-    "_verticalCenter": 0,
-    "_horizontalCenter": 0,
-    "_isAbsLeft": true,
-    "_isAbsRight": true,
-    "_isAbsTop": true,
-    "_isAbsBottom": true,
-    "_isAbsHorizontalCenter": true,
-    "_isAbsVerticalCenter": true,
-    "_originalWidth": 0,
-    "_originalHeight": 0,
-    "_id": ""
-  },
-  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
@@ -1899,16 +1869,16 @@
     "node": {
       "__id__": 17
     },
-    "_enabled": true,
+    "_enabled": false,
     "alignMode": 1,
     "_target": {
       "__id__": 1
     },
-    "_alignFlags": 4,
+    "_alignFlags": 0,
     "_left": 0,
     "_right": 0,
-    "_top": 0,
-    "_bottom": 36,
+    "_top": 300,
+    "_bottom": 0,
     "_verticalCenter": 0,
     "_horizontalCenter": 0,
     "_isAbsLeft": true,
@@ -1941,20 +1911,20 @@
     },
     "_children": [
       {
-        "__id__": 55
+        "__id__": 54
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 62
+        "__id__": 61
       },
       {
-        "__id__": 64
+        "__id__": 63
       }
     ],
     "_prefab": {
-      "__id__": 65
+      "__id__": 64
     },
     "_opacity": 255,
     "_color": {
@@ -2008,24 +1978,24 @@
     "_name": "Background",
     "_objFlags": 512,
     "_parent": {
-      "__id__": 54
+      "__id__": 53
     },
     "_children": [
       {
-        "__id__": 56
+        "__id__": 55
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 59
+        "__id__": 58
       },
       {
-        "__id__": 60
+        "__id__": 59
       }
     ],
     "_prefab": {
-      "__id__": 61
+      "__id__": 60
     },
     "_opacity": 255,
     "_color": {
@@ -2079,17 +2049,17 @@
     "_name": "Label",
     "_objFlags": 512,
     "_parent": {
-      "__id__": 55
+      "__id__": 54
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 57
+        "__id__": 56
       }
     ],
     "_prefab": {
-      "__id__": 58
+      "__id__": 57
     },
     "_opacity": 255,
     "_color": {
@@ -2143,7 +2113,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 56
+      "__id__": 55
     },
     "_enabled": true,
     "_materials": [
@@ -2187,7 +2157,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 55
+      "__id__": 54
     },
     "_enabled": true,
     "_materials": [
@@ -2219,7 +2189,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 55
+      "__id__": 54
     },
     "_enabled": true,
     "alignMode": 0,
@@ -2257,7 +2227,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 54
+      "__id__": 53
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -2266,7 +2236,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 63
+        "__id__": 62
       }
     ],
     "_N$interactable": true,
@@ -2334,7 +2304,7 @@
       "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
     },
     "_N$target": {
-      "__id__": 55
+      "__id__": 54
     },
     "_id": ""
   },
@@ -2353,7 +2323,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 54
+      "__id__": 53
     },
     "_enabled": true,
     "alignMode": 1,

+ 7 - 4
assets/resources/module/speedUpUI/productReward.prefab

@@ -113,8 +113,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 0,
-      "height": 0
+      "width": 588,
+      "height": 850
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -126,7 +126,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        0,
+        107.523,
         0,
         0,
         0,
@@ -209,7 +209,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        153.583,
+        27.286,
         0,
         0,
         0,
@@ -1683,8 +1683,11 @@
       "__id__": 2
     },
     "open_effect": 1,
+    "isOpenCloseEffect": true,
     "close_effect": 1,
     "close_toPoint": "",
+    "close_uibg": false,
+    "isDelayOneFrame": false,
     "_id": ""
   },
   {

+ 1 - 3
assets/script/before/main/FactoryIcon.ts

@@ -133,9 +133,7 @@ export class FactoryIcon extends cc.Component {
 
             this.getComponent(MoveToCenter).move();
 
-            gData.gameData.leftTimes--;
-            gData.gameData.setProp(GameProp.leftTimes, gData.gameData.leftTimes);
-            gData.gameData.init_leftTimes = true;
+            gData.gameData.changeLeftTimes(-1);
 
             gData.adData.checkPopRed();
 

+ 1 - 3
assets/script/before/main/FarmIcon.ts

@@ -153,9 +153,7 @@ export class FarmIcon extends cc.Component {
             gData.gameData.isProducting = true;
 
             this.plantIcon.node.active = true;
-            gData.gameData.leftTimes--;
-            gData.gameData.setProp(GameProp.leftTimes, gData.gameData.leftTimes);
-            gData.gameData.init_leftTimes = true;
+            gData.gameData.changeLeftTimes(-1);
 
             gData.farmSystem.currSelectFarm = this;
 

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

@@ -191,9 +191,7 @@ export default class PastureIcon extends cc.Component {
             gData.gameData.setPastureDataMap(this.configID, this.data);
             this.eatNode.active = false;
             this.getComponent(MoveToCenter).move();
-            gData.gameData.leftTimes--;
-            gData.gameData.setProp(GameProp.leftTimes, gData.gameData.leftTimes);
-            gData.gameData.init_leftTimes = true;
+            gData.gameData.changeLeftTimes(-1);
 
             gData.gameData.isProducting = false;
         }

+ 11 - 0
assets/script/game/data/AdData.ts

@@ -315,6 +315,17 @@ export class AdData {
     private timeAd = 0;
     /** 定时弹出红包 */
     startPopRed(dt) {
+        if (mk.guide.isGuiding()) {
+            this.timeAd = 0;
+            return;
+        }
+
+        if (gData.gameData.isTouchScreen) {
+            gData.gameData.isTouchScreen = false;
+            this.timeAd = 0;
+            return;
+        }
+
         if (this.TimingRedMoneyArr.indexOf(this.ecpmLevel.toString()) == -1) {
             return;
         }

+ 18 - 4
assets/script/game/data/GameData.ts

@@ -268,10 +268,24 @@ export class GameData {
 
         this.maxTimes = parseInt(this.configs.ServerConfig.ProductionMax);
         this.ProductionRecovery = parseInt(this.configs.ServerConfig.ProductionRecovery);
-        //test
-        this.leftTimes = 100;
-        this.maxTimes = 100;
-        this.ProductionRecovery = 1;
+        // //test
+        // this.leftTimes = 1;
+        // this.maxTimes = 20;
+        // this.ProductionRecovery = 1;
+    }
+
+    /** 增加减少生产次数
+     * @param add 增减变量
+     */
+    public changeLeftTimes(add) {
+        gData.gameData.leftTimes += add;
+        gData.gameData.leftTimes = (gData.gameData.leftTimes > gData.gameData.maxTimes ? gData.gameData.maxTimes : gData.gameData.leftTimes);
+        if (gData.gameData.leftTimes < 0) {
+            gData.gameData.leftTimes = 0;
+        }
+        gData.gameData.setProp(GameProp.leftTimes, gData.gameData.leftTimes);
+
+        gData.gameData.init_leftTimes = true;
     }
 
     //图鉴领取数据

+ 3 - 4
assets/script/game/game/Game.ts

@@ -157,9 +157,7 @@ export default class Game extends cc.Component {
                 let add = Math.floor(pass / this.span);
                 this.lastTimeSpan += (add * this.span);
                 mk.storage.setStorage('lastTimeSpan', this.lastTimeSpan);
-                gData.gameData.leftTimes += add;
-                gData.gameData.leftTimes = (gData.gameData.leftTimes > gData.gameData.maxTimes ? gData.gameData.maxTimes : gData.gameData.leftTimes);
-                gData.gameData.setProp(GameProp.leftTimes, gData.gameData.leftTimes);
+                gData.gameData.changeLeftTimes(add);
 
                 gData.gameData.init_leftTimes = true;
             }
@@ -371,7 +369,8 @@ export default class Game extends cc.Component {
     /** 点击种植 */
     public onClickPlant() {
         if (gData.gameData.leftTimes <= 0) {
-            mk.tip.pop('生产次数不足');
+            // mk.tip.pop('生产次数不足');
+            mk.ui.openPanel('module/speedUpUI/productReward');
             return;
         }
 

+ 30 - 3
assets/script/game/module/guide/Guide.ts

@@ -164,10 +164,36 @@ export default class Guide extends cc.Component {
             if (this.crtGuide.dialog_pos != null && this.crtGuide.dialog_pos.length > 0) {
                 let arr = this.crtGuide.dialog_pos.split(":");
                 let wedgit = this.node_dialog.getComponent(cc.Widget);
-                wedgit.enabled = true;
+
                 for (let i = 0; i < this.widgets.length; i++) {
-                    wedgit[this.widgets[i]] = arr[i] == "" ? null : parseInt(arr[i]);
+                    switch (i) {
+                        case 0:
+                            wedgit.isAlignTop = arr[i] != "";
+                            break;
+                        case 1:
+                            wedgit.isAlignBottom = arr[i] != "";
+                            break;
+                        case 2:
+                            wedgit.isAlignLeft = arr[i] != "";
+                            break;
+                        case 3:
+                            wedgit.isAlignRight = arr[i] != "";
+                            break;
+                        case 4:
+                            wedgit.isAlignVerticalCenter = arr[i] != "";
+                            break;
+                        case 5:
+                            wedgit.isAlignHorizontalCenter = arr[i] != "";
+                            break;
+                    }
+
+                    if (arr[i] != "") {
+                        wedgit[this.widgets[i]] = parseInt(arr[i]);
+                    }
                 }
+
+                wedgit.enabled = true;
+                wedgit.updateAlignment();
             }
             else {//显示区域偏移
                 let arr = this.crtGuide.dialog_pos1.split(",");
@@ -241,7 +267,8 @@ export default class Guide extends cc.Component {
 
     private close() {
         mk.guide.close();
-        this.node.destroy();
+        // this.node.destroy();
+        mk.ui.closePanel(this.node.name);
     }
 
     private clickSkip() {

+ 41 - 46
assets/script/game/module/redBagTask/RedBagTask.ts

@@ -25,15 +25,15 @@ export default class RedBagTask extends cc.Component {
     @property(cc.Animation)
     private node_cash: cc.Animation = null;
 
-    @property({type: cc.Node, displayName: '显示金额节点'})
+    @property({ type: cc.Node, displayName: '显示金额节点' })
     private node_value: cc.Node = null;
-    @property({type: cc.Node, displayName: '任务节点'})
+    @property({ type: cc.Node, displayName: '任务节点' })
     private node_task: cc.Node = null;
-    @property({type: cc.Label, displayName: '动画显示文字'})
+    @property({ type: cc.Label, displayName: '动画显示文字' })
     private lbl_Ani: cc.Label = null;
-    @property({type: cc.Label, displayName: '任务数量'})
+    @property({ type: cc.Label, displayName: '任务数量' })
     private lbl_taskNum: cc.Label = null;
-    @property({type: cc.Label, displayName: '任务描述'})
+    @property({ type: cc.Label, displayName: '任务描述' })
     private lbl_taskDes: cc.Label = null;
 
     private isShowNewTask = false;
@@ -46,14 +46,13 @@ export default class RedBagTask extends cc.Component {
     start() {
         mk.ad.showBanner();
 
-        if(this.isShowNewTask)
-        {
+        if (this.isShowNewTask) {
             this.node_value.active = false;
             this.node_task.active = false;
             this.node_cash.node.active = false;
             this.lbl_Ani.node.active = true;
-            
-        }else{
+
+        } else {
             //this.node_value.active = true;
             //this.node_task.active = true;
             //this.node_cash.node.active = true;
@@ -61,9 +60,9 @@ export default class RedBagTask extends cc.Component {
             this.showChangePart();
         }
 
-       
+
         this.initCashOutStyle(gData.gameData.gameData.redMoney);
-    
+
     }
 
     onEnable() {
@@ -72,6 +71,7 @@ export default class RedBagTask extends cc.Component {
 
     onDisable() {
         mk.ad.destoryBanner();
+        mk.guide.open(2);
     }
 
     update(dt) {
@@ -80,46 +80,41 @@ export default class RedBagTask extends cc.Component {
             this.initCashOutStyle(gData.gameData.gameData.redMoney + gData.reward.add_redbag_value);
         }
 
-        if(this.isShowNewTask)
-        {
-            if(this.delayTime <= 0.6)
-            {
+        if (this.isShowNewTask) {
+            if (this.delayTime <= 0.6) {
                 this.delayTime += dt;
-            }else
-            {
-                this.times +=1;
-                if(this.times == 2)
-                {
+            } else {
+                this.times += 1;
+                if (this.times == 2) {
                     this.times = 0;
-                    this.num +=1;
-                this.lbl_Ani.string = this.num.toString();
-                
-                if(this.num == 14)
-                {              
-                    this.isShowNewTask = false;
-
-                    this.lbl_Ani.node.color = new cc.Color(255, 218, 49);
-                    let clone = cc.instantiate(this.lbl_Ani.node);
-                    clone.parent = this.lbl_Ani.node.parent;
-                    cc.tween(clone).to(1.2, {scale: 4.0, opacity: 0}).call(()=>{
-                        clone.active = false;
-                        let worldPos = this.lbl_taskNum.node.parent.convertToWorldSpaceAR(this.lbl_taskNum.node.position);
-                        let pos = this.lbl_taskNum.node.parent.parent.convertToNodeSpaceAR(worldPos);
-                        cc.tween(this.lbl_Ani).to(0.6, {fontSize: 40}).start();
-                        cc.tween(this.lbl_Ani.node).to(0.6,{position: pos}, cc.easeSineOut()).call(()=>{
-                            this.lbl_Ani.node.active = false;
-                            this.node_task.active = true;         
-                            cc.tween(this.node_task).by(0.16, {y: -6}).by(0.1, {y: 6}).start();            
+                    this.num += 1;
+                    this.lbl_Ani.string = this.num.toString();
+
+                    if (this.num == 14) {
+                        this.isShowNewTask = false;
+
+                        this.lbl_Ani.node.color = new cc.Color(255, 218, 49);
+                        let clone = cc.instantiate(this.lbl_Ani.node);
+                        clone.parent = this.lbl_Ani.node.parent;
+                        cc.tween(clone).to(1.2, { scale: 4.0, opacity: 0 }).call(() => {
+                            clone.active = false;
+                            let worldPos = this.lbl_taskNum.node.parent.convertToWorldSpaceAR(this.lbl_taskNum.node.position);
+                            let pos = this.lbl_taskNum.node.parent.parent.convertToNodeSpaceAR(worldPos);
+                            cc.tween(this.lbl_Ani).to(0.6, { fontSize: 40 }).start();
+                            cc.tween(this.lbl_Ani.node).to(0.6, { position: pos }, cc.easeSineOut()).call(() => {
+                                this.lbl_Ani.node.active = false;
+                                this.node_task.active = true;
+                                cc.tween(this.node_task).by(0.16, { y: -6 }).by(0.1, { y: 6 }).start();
+                            }).start();
+
+                            this.node_value.active = true;
+                            this.node_value.scale = 0;
+                            cc.tween(this.node_value).to(0.76, { scale: 1.3 }, cc.easeSineOut()).to(0.1, { scale: 1 }).start();
                         }).start();
-
-                        this.node_value.active = true;
-                        this.node_value.scale = 0;
-                        cc.tween(this.node_value).to(0.76, {scale: 1.3}, cc.easeSineOut()).to(0.1, {scale: 1}).start();
-                    }).start();
+                    }
                 }
-                }            
             }
-            
+
         }
     }
 

+ 19 - 5
assets/script/game/module/speedUpUI/ProductReward.ts

@@ -4,15 +4,29 @@ const { ccclass, property } = cc._decorator;
 
 @ccclass
 export default class ProductReward extends cc.Component {
+    @property({ type: cc.Label, displayName: "文本" })
+    lbl_times: cc.Label = null;
 
-    
-    private clickVideoBtn()
-    {
+    onEnable() {
+        this.scheduleOnce(() => {
+            mk.guide.open(3);
+        }, 0.5)
+
+        this.lbl_times.string = `生产次数x${gData.gameData.configs.ProductionAd}`;
+    }
+
+    private clickVideoBtn() {
         mk.audio.playEffect("button");
+        mk.ui.closePanel(this.node.name);
+        mk.ad.watchAd((success: boolean) => {
+            if (success) {
+                gData.gameData.changeLeftTimes(parseInt(gData.gameData.configs.ProductionAd));
+            }
+        })
     }
 
-    private clickCloseBtn()
-    {
+    private clickCloseBtn() {
         mk.audio.playEffect("closeButton");
+        mk.ui.closePanel(this.node.name);
     }
 }

+ 3 - 4
assets/script/mk/system/GuideSystem.ts

@@ -11,14 +11,13 @@ export default class GuideSystem {
     public ui: cc.Node;
 
     public open(id) {
-        return;
         this.crtGuideID = gData.gameData.getProp(GameProp.guideID);
         // //测试永远新手引导,永远第一关
         // if (!cc.sys.isNative) {
         //     this.crtGuideID = 1;
         // }
-        //test
-        this.crtGuideID = 0;
+        // //test
+        // this.crtGuideID = 0;
 
         if (this.crtGuideID >= 9999) {
             mk.console.log("新手引导已做完");
@@ -36,7 +35,7 @@ export default class GuideSystem {
 
     /** 开启一个引导后直接默认已完成 */
     private setGuideID(id: number) {
-        if (id == 2) {
+        if (id == 4) {
             id = 9999;
             mk.data.sendXYEvent("guide_end", "新手引导结束");
         }

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