Просмотр исходного кода

Merge branch 'master' of http://git.mokasz.com/zouyong/team1_nc

# Conflicts:
#	assets/script/game/game/Game.ts
#	build/jsb-link/assets/resources/config.json
#	build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/caches/build_file_checksums.ser
#	packages-hot-update/cfg.json
kaka 4 лет назад
Родитель
Сommit
3230ea69b4

+ 1 - 1
assets/resources/animation/load.anim

@@ -6,7 +6,7 @@
   "_duration": 1.4833333333333334,
   "sample": 60,
   "speed": 1,
-  "wrapMode": 1,
+  "wrapMode": 2,
   "curveData": {
     "props": {
       "x": [

+ 165 - 187
assets/resources/game/prefab/game.prefab

@@ -27,14 +27,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 311
+        "__id__": 310
       },
       {
-        "__id__": 313
+        "__id__": 312
       }
     ],
     "_prefab": {
-      "__id__": 314
+      "__id__": 313
     },
     "_opacity": 255,
     "_color": {
@@ -4484,7 +4484,7 @@
     "asset": {
       "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
     },
-    "fileId": "7cASg8xkxIvZb8GfiVRn+P",
+    "fileId": "f9NdFIBuxC0pmxUVSXOuZF",
     "sync": false
   },
   {
@@ -4696,7 +4696,7 @@
     "asset": {
       "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
     },
-    "fileId": "4fsOgMoiZHG5Sjw4qUgoau",
+    "fileId": "25cIfO+ydJm7ha4R/GtlM0",
     "sync": false
   },
   {
@@ -4805,7 +4805,7 @@
     "asset": {
       "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
     },
-    "fileId": "91rBECbwVF5LKgOWasQuAG",
+    "fileId": "e1gluYUJdFPLqrN7n3ZGS3",
     "sync": false
   },
   {
@@ -5970,11 +5970,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 309
+        "__id__": 308
       }
     ],
     "_prefab": {
-      "__id__": 310
+      "__id__": 309
     },
     "_opacity": 255,
     "_color": {
@@ -7931,20 +7931,23 @@
         "__id__": 251
       },
       {
-        "__id__": 297
+        "__id__": 292
       },
       {
-        "__id__": 301
+        "__id__": 296
+      },
+      {
+        "__id__": 300
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 307
+        "__id__": 306
       }
     ],
     "_prefab": {
-      "__id__": 308
+      "__id__": 307
     },
     "_opacity": 255,
     "_color": {
@@ -8346,25 +8349,22 @@
       },
       {
         "__id__": 272
-      },
-      {
-        "__id__": 287
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 292
+        "__id__": 287
       },
       {
-        "__id__": 293
+        "__id__": 288
       },
       {
-        "__id__": 295
+        "__id__": 290
       }
     ],
     "_prefab": {
-      "__id__": 296
+      "__id__": 291
     },
     "_opacity": 255,
     "_color": {
@@ -9643,157 +9643,6 @@
     "sync": false
   },
   {
-    "__type__": "cc.Node",
-    "_name": "增加效果文本",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 251
-    },
-    "_children": [],
-    "_active": false,
-    "_components": [
-      {
-        "__id__": 288
-      },
-      {
-        "__id__": 289
-      },
-      {
-        "__id__": 290
-      }
-    ],
-    "_prefab": {
-      "__id__": 291
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 49.61,
-      "height": 67
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        62,
-        0,
-        0,
-        0,
-        0,
-        1,
-        1,
-        1,
-        1
-      ]
-    },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_is3DNode": false,
-    "_groupIndex": 0,
-    "groupIndex": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 287
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_string": "+1",
-    "_N$string": "+1",
-    "_fontSize": 40,
-    "_lineHeight": 50,
-    "_enableWrapText": true,
-    "_N$file": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
-    "_batchAsBitmap": false,
-    "_styleFlags": 1,
-    "_underlineHeight": 0,
-    "_N$horizontalAlign": 1,
-    "_N$verticalAlign": 1,
-    "_N$fontFamily": "Arial",
-    "_N$overflow": 0,
-    "_N$cacheMode": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.LabelOutline",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 287
-    },
-    "_enabled": true,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 139,
-      "g": 69,
-      "b": 19,
-      "a": 255
-    },
-    "_width": 2,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Animation",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 287
-    },
-    "_enabled": true,
-    "_defaultClip": {
-      "__uuid__": "7ed7c68f-a943-47b4-83fe-aa7df7e01c96"
-    },
-    "_clips": [
-      {
-        "__uuid__": "7ed7c68f-a943-47b4-83fe-aa7df7e01c96"
-      }
-    ],
-    "playOnLoad": false,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
-    },
-    "fileId": "26/uS6ZXJDIboD45DDq0fe",
-    "sync": false
-  },
-  {
     "__type__": "cc.Sprite",
     "_name": "",
     "_objFlags": 0,
@@ -9839,7 +9688,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 294
+        "__id__": 289
       }
     ],
     "_N$interactable": true,
@@ -9948,14 +9797,14 @@
     "_active": false,
     "_components": [
       {
-        "__id__": 298
+        "__id__": 293
       },
       {
-        "__id__": 299
+        "__id__": 294
       }
     ],
     "_prefab": {
-      "__id__": 300
+      "__id__": 295
     },
     "_opacity": 255,
     "_color": {
@@ -10009,7 +9858,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 297
+      "__id__": 292
     },
     "_enabled": true,
     "_materials": [
@@ -10041,7 +9890,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 297
+      "__id__": 292
     },
     "_enabled": false,
     "panel_name": "module/farmMap/farmMap",
@@ -10064,6 +9913,135 @@
   },
   {
     "__type__": "cc.Node",
+    "_name": "增加效果文本",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 240
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 297
+      },
+      {
+        "__id__": 298
+      }
+    ],
+    "_prefab": {
+      "__id__": 299
+    },
+    "_opacity": 0,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 209.61,
+      "height": 67
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        86.86,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 296
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "生产次数+1",
+    "_N$string": "生产次数+1",
+    "_fontSize": 40,
+    "_lineHeight": 50,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 1,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 296
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 139,
+      "g": 69,
+      "b": 19,
+      "a": 255
+    },
+    "_width": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
+    },
+    "fileId": "9c4PBdqWhGt4PDLEhDJt0w",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
     "_name": "气泡红包按钮",
     "_objFlags": 0,
     "_parent": {
@@ -10073,17 +10051,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 302
+        "__id__": 301
       },
       {
-        "__id__": 303
+        "__id__": 302
       },
       {
-        "__id__": 304
+        "__id__": 303
       }
     ],
     "_prefab": {
-      "__id__": 306
+      "__id__": 305
     },
     "_opacity": 255,
     "_color": {
@@ -10137,7 +10115,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 301
+      "__id__": 300
     },
     "_enabled": true,
     "_materials": [
@@ -10169,7 +10147,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 301
+      "__id__": 300
     },
     "_enabled": true,
     "_defaultClip": {
@@ -10188,7 +10166,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 301
+      "__id__": 300
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -10197,7 +10175,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 305
+        "__id__": 304
       }
     ],
     "_N$interactable": true,
@@ -10346,7 +10324,7 @@
       "__id__": 246
     },
     "btn8": {
-      "__id__": 301
+      "__id__": 300
     },
     "_id": ""
   },
@@ -10391,7 +10369,7 @@
       "__id__": 3
     },
     "nodeRedPoint": {
-      "__id__": 312
+      "__id__": 311
     },
     "icon_plant": {
       "__id__": 253
@@ -10427,7 +10405,7 @@
       "__id__": 77
     },
     "ani_add2": {
-      "__id__": 290
+      "__id__": 296
     },
     "_id": ""
   },

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

@@ -205,7 +205,7 @@ export default class PastureIcon extends cc.Component {
             if (flyRed) {
                 //mk.audio.playEffect('redmoney');
                 let pos = this.eatNode.parent.convertToWorldSpaceAR(this.eatNode.getPosition());
-                gData.gameData.gameStyle.dpFlyRedAni();
+                gData.gameData.gameStyle.dpFlyRedAni(pos);
             }
         }
     }

+ 38 - 19
assets/script/game/game/Game.ts

@@ -62,15 +62,16 @@ export default class Game extends cc.Component {
     @property({ type: cc.Sprite, displayName: '等级名字' })
     sp_gradeName: cc.Sprite = null;
 
-    @property({ type: cc.Animation, displayName: '增加效果文本2' })
-    ani_add2: cc.Animation = null;
-
+    @property({ type: cc.Node, displayName: '增加效果文本2' })
+    ani_add2: cc.Node = null;
 
+    posY = 0;
     /** 是否开始增加次数倒计时 */
     private lastTimeSpan = 0;
     private span = 0;
 
     onLoad() {
+        this.posY = this.ani_add2.y;
         this.ani_add.node.active = false;
         gData.gameData.gameStyle = this;
         this.span = gData.gameData.ProductionRecovery * 60 * 1000;
@@ -416,7 +417,8 @@ export default class Game extends cc.Component {
     /** 点击种植 */
     public async onClickPlant() {
         mk.audio.playEffect("button");
-        if (gData.gameData.leftTimes <= 0) {
+        if (gData.gameData.leftTimes <= 0) 
+        {
             // mk.tip.pop('生产次数不足');
             mk.ui.openPanel('module/speedUpUI/productReward');
             return;
@@ -439,19 +441,32 @@ export default class Game extends cc.Component {
         }
     }
 
-    public dpFlyRedAni(starPos: cc.Vec2 = null) {
-        if (starPos) {
-            let pos = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
-            mk.fly.PlayCoinAnim(1, 5, starPos, pos, () => {
-                gData.gameData.init_task = true;
-            }, 0.8);
-        } else {
-            let pos = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
-            mk.fly.PlayCoinAnim(1, 5, this.btn_product, pos, () => {
+    public dpFlyRedAni(starPos: cc.Vec2 = null)
+    {
+        if(starPos)
+        {
+            if(this.node_taskHb && this.node_taskHb.parent)
+            {
+                let pos = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
+                mk.fly.PlayCoinAnim(1, 5, starPos, pos, () => {
+                    gData.gameData.init_task = true;
+                }, 0.8);
+            }else{
                 gData.gameData.init_task = true;
-            }, 0.8);
-        }
+            }
+            
+        }else{
 
+            if(this.node_taskHb && this.node_taskHb.parent && this.btn_product)
+            {
+                let pos = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
+                mk.fly.PlayCoinAnim(1, 5, this.btn_product, pos, () => {
+                    gData.gameData.init_task = true;
+                }, 0.8);
+            }else{
+                gData.gameData.init_task = true;
+            }          
+        }       
     }
 
 
@@ -484,10 +499,14 @@ export default class Game extends cc.Component {
             this.ani_add.node.getComponent(cc.Label).string = `+${exp}`;
             this.ani_add.node.active = true;
             this.ani_add.play();
-        } else {
-            this.ani_add2.node.getComponent(cc.Label).string = `+${exp}`;
-            this.ani_add2.node.active = true;
-            this.ani_add2.play();
+        }else{
+
+            this.ani_add2.getComponent(cc.Label).string = `生产次数+${exp}`;      
+            cc.tween(this.ani_add2).delay(1.3).call(()=>{
+                this.ani_add2.opacity = 255;
+            }).by(0.8, {y : 100}).to(0.4, {opacity : 0}).call(()=>{
+                this.ani_add2.y = this.posY;
+            }).start();
         }
 
         // gData.gameData.init_add = false;