薛鸿潇 5 лет назад
Родитель
Сommit
e5fd1b331a

+ 287 - 271
assets/resources/module/cashNormal/cashNormal.prefab

@@ -19,25 +19,22 @@
     "_children": [
       {
         "__id__": 2
-      },
-      {
-        "__id__": 42
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 49
-      },
-      {
         "__id__": 50
       },
       {
         "__id__": 51
+      },
+      {
+        "__id__": 52
       }
     ],
     "_prefab": {
-      "__id__": 52
+      "__id__": 53
     },
     "_opacity": 255,
     "_color": {
@@ -104,20 +101,23 @@
         "__id__": 13
       },
       {
-        "__id__": 26
+        "__id__": 33
       },
       {
-        "__id__": 37
+        "__id__": 44
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 40
+        "__id__": 47
+      },
+      {
+        "__id__": 48
       }
     ],
     "_prefab": {
-      "__id__": 41
+      "__id__": 49
     },
     "_opacity": 255,
     "_color": {
@@ -536,19 +536,22 @@
     "_children": [
       {
         "__id__": 14
+      },
+      {
+        "__id__": 23
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 23
+        "__id__": 30
       },
       {
-        "__id__": 24
+        "__id__": 31
       }
     ],
     "_prefab": {
-      "__id__": 25
+      "__id__": 32
     },
     "_opacity": 255,
     "_color": {
@@ -561,19 +564,19 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 750,
-      "height": 140
+      "height": 500
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
       "x": 0.5,
-      "y": 0.5
+      "y": 0
     },
     "_trs": {
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
         0,
-        596.935,
+        526.935,
         0,
         0,
         0,
@@ -644,7 +647,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        0,
+        72,
         0,
         0,
         0,
@@ -932,6 +935,237 @@
     "sync": false
   },
   {
+    "__type__": "cc.Node",
+    "_name": "关闭按钮",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 13
+    },
+    "_children": [
+      {
+        "__id__": 24
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 27
+      },
+      {
+        "__id__": 28
+      }
+    ],
+    "_prefab": {
+      "__id__": 29
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 100
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -325,
+        72,
+        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.Node",
+    "_name": "按钮纹理",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 23
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 25
+      }
+    ],
+    "_prefab": {
+      "__id__": 26
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 22,
+      "height": 36
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        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.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 24
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "96791d9f-b2a7-406c-84c0-d63af62e60ea"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "18ca563c-e8dc-4633-bf04-5fdd65113bb0"
+    },
+    "fileId": "0dlg0I2lZG1qc4IeCj/tO2",
+    "sync": false
+  },
+  {
+    "__type__": "cdc50kCRVVBa5gcp4XXxVO+",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 23
+    },
+    "_enabled": true,
+    "node_panel": {
+      "__id__": 1
+    },
+    "transition_type": 3,
+    "onComplete": [],
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 23
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 8,
+    "_left": 0,
+    "_right": 0,
+    "_top": 18,
+    "_bottom": 0,
+    "_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
+    },
+    "asset": {
+      "__uuid__": "18ca563c-e8dc-4633-bf04-5fdd65113bb0"
+    },
+    "fileId": "2cmqLl4atKsLJuZC2Zq8dq",
+    "sync": false
+  },
+  {
     "__type__": "cc.Sprite",
     "_name": "",
     "_objFlags": 0,
@@ -972,12 +1206,14 @@
     },
     "_enabled": true,
     "alignMode": 1,
-    "_target": null,
+    "_target": {
+      "__id__": 2
+    },
     "_alignFlags": 1,
     "_left": 0,
     "_right": 0,
-    "_top": 0.06500000000005457,
-    "_bottom": 0,
+    "_top": -359.93499999999995,
+    "_bottom": 1193.935,
     "_verticalCenter": 0,
     "_horizontalCenter": 0,
     "_isAbsLeft": true,
@@ -987,7 +1223,7 @@
     "_isAbsHorizontalCenter": true,
     "_isAbsVerticalCenter": true,
     "_originalWidth": 0,
-    "_originalHeight": 0,
+    "_originalHeight": 140,
     "_id": ""
   },
   {
@@ -1010,23 +1246,23 @@
     },
     "_children": [
       {
-        "__id__": 27
+        "__id__": 34
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 33
+        "__id__": 40
       },
       {
-        "__id__": 34
+        "__id__": 41
       },
       {
-        "__id__": 35
+        "__id__": 42
       }
     ],
     "_prefab": {
-      "__id__": 36
+      "__id__": 43
     },
     "_opacity": 255,
     "_color": {
@@ -1080,24 +1316,24 @@
     "_name": "view",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 26
+      "__id__": 33
     },
     "_children": [
       {
-        "__id__": 28
+        "__id__": 35
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 30
+        "__id__": 37
       },
       {
-        "__id__": 31
+        "__id__": 38
       }
     ],
     "_prefab": {
-      "__id__": 32
+      "__id__": 39
     },
     "_opacity": 255,
     "_color": {
@@ -1151,13 +1387,13 @@
     "_name": "content",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 27
+      "__id__": 34
     },
     "_children": [],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 29
+      "__id__": 36
     },
     "_opacity": 255,
     "_color": {
@@ -1222,7 +1458,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 27
+      "__id__": 34
     },
     "_enabled": true,
     "_materials": [
@@ -1242,7 +1478,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 27
+      "__id__": 34
     },
     "_enabled": true,
     "alignMode": 1,
@@ -1282,7 +1518,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 26
+      "__id__": 33
     },
     "_enabled": true,
     "horizontal": false,
@@ -1294,10 +1530,10 @@
     "scrollEvents": [],
     "cancelInnerEvents": false,
     "_N$content": {
-      "__id__": 28
+      "__id__": 35
     },
     "content": {
-      "__id__": 28
+      "__id__": 35
     },
     "_N$horizontalScrollBar": null,
     "_N$verticalScrollBar": null,
@@ -1308,7 +1544,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 26
+      "__id__": 33
     },
     "_enabled": true,
     "pre_item": [
@@ -1327,7 +1563,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 26
+      "__id__": 33
     },
     "_enabled": true,
     "alignMode": 1,
@@ -1373,11 +1609,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 38
+        "__id__": 45
       }
     ],
     "_prefab": {
-      "__id__": 39
+      "__id__": 46
     },
     "_opacity": 255,
     "_color": {
@@ -1431,7 +1667,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 37
+      "__id__": 44
     },
     "_enabled": true,
     "_materials": [
@@ -1500,234 +1736,13 @@
     "_id": ""
   },
   {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "18ca563c-e8dc-4633-bf04-5fdd65113bb0"
-    },
-    "fileId": "94yiGj0RFACpXt5xGEvfHf",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "关闭按钮",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [
-      {
-        "__id__": 43
-      }
-    ],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 46
-      },
-      {
-        "__id__": 47
-      }
-    ],
-    "_prefab": {
-      "__id__": 48
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 100,
-      "height": 100
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        -325,
-        596.033,
-        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.Node",
-    "_name": "按钮纹理",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 42
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 44
-      }
-    ],
-    "_prefab": {
-      "__id__": 45
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 22,
-      "height": 36
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        0,
-        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.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 43
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "96791d9f-b2a7-406c-84c0-d63af62e60ea"
-    },
-    "_type": 0,
-    "_sizeMode": 1,
-    "_fillType": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_atlas": null,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "18ca563c-e8dc-4633-bf04-5fdd65113bb0"
-    },
-    "fileId": "2fogzjyg1Eeb4o3xdTj4nf",
-    "sync": false
-  },
-  {
-    "__type__": "cdc50kCRVVBa5gcp4XXxVO+",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 42
-    },
-    "_enabled": true,
-    "node_panel": {
-      "__id__": 1
-    },
-    "transition_type": 3,
-    "onComplete": [],
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Widget",
+    "__type__": "173866Ll/lFN6TBCxDmQuqC",
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 42
+      "__id__": 2
     },
     "_enabled": true,
-    "alignMode": 1,
-    "_target": null,
-    "_alignFlags": 9,
-    "_left": 0,
-    "_right": 0,
-    "_top": 20.966999999999985,
-    "_bottom": 0,
-    "_verticalCenter": 0,
-    "_horizontalCenter": 0,
-    "_isAbsLeft": true,
-    "_isAbsRight": true,
-    "_isAbsTop": true,
-    "_isAbsBottom": true,
-    "_isAbsHorizontalCenter": true,
-    "_isAbsVerticalCenter": true,
-    "_originalWidth": 0,
-    "_originalHeight": 0,
     "_id": ""
   },
   {
@@ -1738,7 +1753,7 @@
     "asset": {
       "__uuid__": "18ca563c-e8dc-4633-bf04-5fdd65113bb0"
     },
-    "fileId": "c8jvBP2fNFRbU3kLiQJ9Sl",
+    "fileId": "94yiGj0RFACpXt5xGEvfHf",
     "sync": false
   },
   {
@@ -1777,13 +1792,13 @@
     },
     "_enabled": true,
     "scroll_view": {
-      "__id__": 33
+      "__id__": 40
     },
     "lbl_rmb_total": {
       "__id__": 19
     },
     "lbl_none": {
-      "__id__": 38
+      "__id__": 45
     },
     "_id": ""
   },
@@ -1803,9 +1818,10 @@
       "a": 230
     },
     "design_block_node": {
-      "__id__": 37
+      "__id__": 44
     },
     "bClickClose": false,
+    "onComplete": [],
     "_id": ""
   },
   {

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

@@ -53,6 +53,7 @@ export class RewardData extends Data {
         const i_count = gData.reward.data.length;
         for (let i = 0; i < i_count; i++) {
             if (gData.reward.data[i].rewardType === RewardType.rmb) continue;
+            if (gData.reward.data[i].rewardNum == 0) continue;
             let start_node_pos = new cc.Vec2(0, -300);
             mk.fly.PlayCoinAnim(gData.reward.data[i].rewardType, 10, start_node_pos, '', () => {
                 is_add_money && this.addReward();

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

@@ -57,6 +57,30 @@ export default class Game extends cc.Component {
             this.initGuide();
             gData.gameData.setProp(GameProp.newPlayer, 1);
         }
+        // // 测试代码
+        // this.schedule(() => {
+
+        //     let data = {
+        //         videoRedMoney: {
+        //             videoRewardList: [
+        //                 {
+        //                     rewardType: 1,
+        //                     rewardNum: 500
+        //                 },
+        //                 {
+        //                     rewardType: 2,
+        //                     rewardNum: 0
+        //                 },
+        //                 {
+        //                     rewardType: 3,
+        //                     rewardNum: 0
+        //                 }
+        //             ]
+        //         }
+        //     };
+        //     gData.reward.adData = data;
+        //     mk.ui.openPanel('module/reward/reward')
+        // }, 3)
     }
 
     private initGuide() {
@@ -112,8 +136,10 @@ export default class Game extends cc.Component {
         // this.lbl_rmb.node.getComponent('NumberAnim').setValue(gData.gameData.gameData.piggyBank);
 
         const new_count = gData.gameData.gameData.piggyBank / 100;
-        if (this.lbl_rmb.string != new_count.toFixed(2)) {
-            this.lbl_rmb.node.getComponent(NumberAnim).setValue(parseFloat(new_count.toFixed(2)), 2);
+        if (parseInt(this.lbl_rmb.string) != 0 && new_count != 0) {
+            if (this.lbl_rmb.string != new_count.toFixed(2)) {
+                this.lbl_rmb.node.getComponent(NumberAnim).setValue(parseFloat(new_count.toFixed(2)), 2);
+            }
         }
         gData.gameData.init_coin = false;
     }

+ 4 - 0
assets/script/mk/system/FlySystem.ts

@@ -65,6 +65,10 @@ export default class FlySystem extends cc.Component {
                 }
                 else if (type == RewardType.pigRmb) {
                     url = 'Canvas/界面层/game/node_ui/顶部个人信息/金猪币按钮/icon_zb';
+                } else {
+                    // 未知类型
+                    mk.pool.return('game/prefab/coin', target);
+                    return;
                 }
                 end = url;
             }