Bladeren bron

签到模块客户端逻辑

薛鸿潇 5 jaren geleden
bovenliggende
commit
f1c7b61baf

+ 68 - 269
assets/resources/module/sign/prefab/signIconItem.prefab

@@ -21,29 +21,26 @@
         "__id__": 2
       },
       {
-        "__id__": 20
+        "__id__": 21
       },
       {
-        "__id__": 32
+        "__id__": 29
       },
       {
-        "__id__": 36
+        "__id__": 33
       },
       {
-        "__id__": 39
+        "__id__": 36
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 42
-      },
-      {
-        "__id__": 43
+        "__id__": 39
       }
     ],
     "_prefab": {
-      "__id__": 45
+      "__id__": 40
     },
     "_opacity": 255,
     "_color": {
@@ -110,16 +107,16 @@
         "__id__": 10
       },
       {
-        "__id__": 13
+        "__id__": 14
       },
       {
-        "__id__": 16
+        "__id__": 17
       }
     ],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 19
+      "__id__": 20
     },
     "_opacity": 255,
     "_color": {
@@ -406,7 +403,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "现提示",
+    "_name": "现提示",
     "_objFlags": 0,
     "_parent": {
       "__id__": 2
@@ -416,10 +413,13 @@
     "_components": [
       {
         "__id__": 11
+      },
+      {
+        "__id__": 12
       }
     ],
     "_prefab": {
-      "__id__": 12
+      "__id__": 13
     },
     "_opacity": 255,
     "_color": {
@@ -436,15 +436,15 @@
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
+      "x": 0.6,
+      "y": 0
     },
     "_trs": {
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        -70.406,
-        null,
+        -63.102,
+        -46.064,
         0,
         0,
         0,
@@ -501,6 +501,18 @@
     "_id": ""
   },
   {
+    "__type__": "93753AIt45HwoqU8o6Vee0w",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "angle": 15,
+    "time": 1,
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
@@ -522,11 +534,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 14
+        "__id__": 15
       }
     ],
     "_prefab": {
-      "__id__": 15
+      "__id__": 16
     },
     "_opacity": 255,
     "_color": {
@@ -580,7 +592,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 13
+      "__id__": 14
     },
     "_enabled": true,
     "_materials": [
@@ -629,11 +641,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 17
+        "__id__": 18
       }
     ],
     "_prefab": {
-      "__id__": 18
+      "__id__": 19
     },
     "_opacity": 255,
     "_color": {
@@ -687,7 +699,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 16
+      "__id__": 17
     },
     "_enabled": true,
     "_materials": [
@@ -745,19 +757,16 @@
     },
     "_children": [
       {
-        "__id__": 21
-      },
-      {
-        "__id__": 24
+        "__id__": 22
       },
       {
-        "__id__": 28
+        "__id__": 25
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [],
     "_prefab": {
-      "__id__": 31
+      "__id__": 28
     },
     "_opacity": 255,
     "_color": {
@@ -811,17 +820,17 @@
     "_name": "图标背景",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 20
+      "__id__": 21
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 22
+        "__id__": 23
       }
     ],
     "_prefab": {
-      "__id__": 23
+      "__id__": 24
     },
     "_opacity": 255,
     "_color": {
@@ -875,7 +884,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 21
+      "__id__": 22
     },
     "_enabled": true,
     "_materials": [
@@ -915,18 +924,15 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "背景光",
+    "_name": "图标",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 20
+      "__id__": 21
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 25
-      },
-      {
         "__id__": 26
       }
     ],
@@ -943,132 +949,6 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 161,
-      "height": 150
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        -128,
-        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__": "341bdbc6-3abf-4051-9078-462db09e3bee"
-    },
-    "_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.Animation",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 24
-    },
-    "_enabled": true,
-    "_defaultClip": {
-      "__uuid__": "318eddb4-f316-41b2-976b-5c0cc9dac4d9"
-    },
-    "_clips": [
-      {
-        "__uuid__": "318eddb4-f316-41b2-976b-5c0cc9dac4d9"
-      }
-    ],
-    "playOnLoad": true,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "4f341905-d969-4c23-8917-f136f7f385a1"
-    },
-    "fileId": "47PfiwItBMaoPlcDYCRqjb",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "图标",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 20
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 29
-      }
-    ],
-    "_prefab": {
-      "__id__": 30
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
       "width": 81,
       "height": 102
     },
@@ -1082,7 +962,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        -134.287,
+        -135,
         0,
         0,
         0,
@@ -1111,7 +991,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 28
+      "__id__": 25
     },
     "_enabled": true,
     "_materials": [
@@ -1171,14 +1051,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 33
+        "__id__": 30
       },
       {
-        "__id__": 34
+        "__id__": 31
       }
     ],
     "_prefab": {
-      "__id__": 35
+      "__id__": 32
     },
     "_opacity": 255,
     "_color": {
@@ -1232,7 +1112,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 32
+      "__id__": 29
     },
     "_enabled": true,
     "_materials": [
@@ -1267,7 +1147,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 32
+      "__id__": 29
     },
     "_enabled": true,
     "_color": {
@@ -1299,14 +1179,14 @@
       "__id__": 1
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
-        "__id__": 37
+        "__id__": 34
       }
     ],
     "_prefab": {
-      "__id__": 38
+      "__id__": 35
     },
     "_opacity": 120,
     "_color": {
@@ -1360,7 +1240,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 36
+      "__id__": 33
     },
     "_enabled": true,
     "_materials": [
@@ -1406,14 +1286,14 @@
       "__id__": 1
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
-        "__id__": 40
+        "__id__": 37
       }
     ],
     "_prefab": {
-      "__id__": 41
+      "__id__": 38
     },
     "_opacity": 255,
     "_color": {
@@ -1467,7 +1347,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 39
+      "__id__": 36
     },
     "_enabled": true,
     "_materials": [
@@ -1517,104 +1397,23 @@
       "__id__": 2
     },
     "node_redbag": {
-      "__id__": 20
+      "__id__": 21
+    },
+    "node_money": {
+      "__id__": 10
     },
     "lbl_day": {
-      "__id__": 33
+      "__id__": 30
     },
     "node_mask": {
-      "__id__": 36
+      "__id__": 33
     },
     "node_gou": {
-      "__id__": 39
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Button",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 1
-    },
-    "_enabled": true,
-    "_normalMaterial": null,
-    "_grayMaterial": null,
-    "duration": 0.1,
-    "zoomScale": 1.2,
-    "clickEvents": [
-      {
-        "__id__": 44
-      }
-    ],
-    "_N$interactable": true,
-    "_N$enableAutoGrayEffect": false,
-    "_N$transition": 0,
-    "transition": 0,
-    "_N$normalColor": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_N$pressedColor": {
-      "__type__": "cc.Color",
-      "r": 211,
-      "g": 211,
-      "b": 211,
-      "a": 255
-    },
-    "pressedColor": {
-      "__type__": "cc.Color",
-      "r": 211,
-      "g": 211,
-      "b": 211,
-      "a": 255
-    },
-    "_N$hoverColor": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "hoverColor": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_N$disabledColor": {
-      "__type__": "cc.Color",
-      "r": 124,
-      "g": 124,
-      "b": 124,
-      "a": 255
-    },
-    "_N$normalSprite": null,
-    "_N$pressedSprite": null,
-    "pressedSprite": null,
-    "_N$hoverSprite": null,
-    "hoverSprite": null,
-    "_N$disabledSprite": null,
-    "_N$target": {
-      "__id__": 1
+      "__id__": 36
     },
     "_id": ""
   },
   {
-    "__type__": "cc.ClickEvent",
-    "target": {
-      "__id__": 1
-    },
-    "component": "",
-    "_componentId": "233bfi4S/FHSYKyekkgMW0Z",
-    "handler": "clickReceiveReward",
-    "customEventData": ""
-  },
-  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

+ 108 - 191
assets/resources/module/sign/sign.prefab

@@ -21,29 +21,26 @@
         "__id__": 2
       },
       {
-        "__id__": 5
-      },
-      {
-        "__id__": 42
+        "__id__": 40
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 47
+        "__id__": 45
       },
       {
-        "__id__": 48
+        "__id__": 46
       },
       {
-        "__id__": 49
+        "__id__": 47
       },
       {
-        "__id__": 50
+        "__id__": 48
       }
     ],
     "_prefab": {
-      "__id__": 51
+      "__id__": 49
     },
     "_opacity": 255,
     "_color": {
@@ -94,113 +91,6 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "签到",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": false,
-    "_components": [
-      {
-        "__id__": 3
-      }
-    ],
-    "_prefab": {
-      "__id__": 4
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 750,
-      "height": 1334
-    },
-    "_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__": 2
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "6eeb149c-9754-4af3-8707-fd1f1cff3b00"
-    },
-    "_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__": "336fd143-f8e6-438c-bc88-e4fdf40e9791"
-    },
-    "fileId": "76wS7MV3BIWqbX8g2H2bID",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
     "_name": "动画节点",
     "_objFlags": 0,
     "_parent": {
@@ -208,29 +98,29 @@
     },
     "_children": [
       {
-        "__id__": 6
+        "__id__": 3
       },
       {
-        "__id__": 9
+        "__id__": 6
       },
       {
-        "__id__": 18
+        "__id__": 15
       },
       {
-        "__id__": 24
+        "__id__": 21
       },
       {
-        "__id__": 27
+        "__id__": 24
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 40
+        "__id__": 38
       }
     ],
     "_prefab": {
-      "__id__": 41
+      "__id__": 39
     },
     "_opacity": 255,
     "_color": {
@@ -284,17 +174,17 @@
     "_name": "背景板",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 5
+      "__id__": 2
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 7
+        "__id__": 4
       }
     ],
     "_prefab": {
-      "__id__": 8
+      "__id__": 5
     },
     "_opacity": 255,
     "_color": {
@@ -348,7 +238,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 6
+      "__id__": 3
     },
     "_enabled": true,
     "_materials": [
@@ -391,24 +281,24 @@
     "_name": "滚动视图",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 5
+      "__id__": 2
     },
     "_children": [
       {
-        "__id__": 10
+        "__id__": 7
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 15
+        "__id__": 12
       },
       {
-        "__id__": 16
+        "__id__": 13
       }
     ],
     "_prefab": {
-      "__id__": 17
+      "__id__": 14
     },
     "_opacity": 255,
     "_color": {
@@ -462,21 +352,21 @@
     "_name": "view",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 9
+      "__id__": 6
     },
     "_children": [
       {
-        "__id__": 11
+        "__id__": 8
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 13
+        "__id__": 10
       }
     ],
     "_prefab": {
-      "__id__": 14
+      "__id__": 11
     },
     "_opacity": 255,
     "_color": {
@@ -530,13 +420,13 @@
     "_name": "content",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 10
+      "__id__": 7
     },
     "_children": [],
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 12
+      "__id__": 9
     },
     "_opacity": 255,
     "_color": {
@@ -601,7 +491,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 10
+      "__id__": 7
     },
     "_enabled": true,
     "_materials": [
@@ -632,7 +522,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 9
+      "__id__": 6
     },
     "_enabled": true,
     "horizontal": false,
@@ -644,10 +534,10 @@
     "scrollEvents": [],
     "cancelInnerEvents": false,
     "_N$content": {
-      "__id__": 11
+      "__id__": 8
     },
     "content": {
-      "__id__": 11
+      "__id__": 8
     },
     "_N$horizontalScrollBar": null,
     "_N$verticalScrollBar": null,
@@ -658,7 +548,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 9
+      "__id__": 6
     },
     "_enabled": true,
     "pre_item": [
@@ -688,21 +578,21 @@
     "_name": "标题版",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 5
+      "__id__": 2
     },
     "_children": [
       {
-        "__id__": 19
+        "__id__": 16
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 22
+        "__id__": 19
       }
     ],
     "_prefab": {
-      "__id__": 23
+      "__id__": 20
     },
     "_opacity": 255,
     "_color": {
@@ -756,17 +646,17 @@
     "_name": "标题",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 18
+      "__id__": 15
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 20
+        "__id__": 17
       }
     ],
     "_prefab": {
-      "__id__": 21
+      "__id__": 18
     },
     "_opacity": 255,
     "_color": {
@@ -820,7 +710,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 19
+      "__id__": 16
     },
     "_enabled": true,
     "_materials": [
@@ -863,7 +753,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 18
+      "__id__": 15
     },
     "_enabled": true,
     "_materials": [
@@ -906,17 +796,17 @@
     "_name": "熊猫",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 5
+      "__id__": 2
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 25
+        "__id__": 22
       }
     ],
     "_prefab": {
-      "__id__": 26
+      "__id__": 23
     },
     "_opacity": 255,
     "_color": {
@@ -970,7 +860,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 24
+      "__id__": 21
     },
     "_enabled": true,
     "_materials": [
@@ -1013,30 +903,33 @@
     "_name": "按钮_签到",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 5
+      "__id__": 2
     },
     "_children": [
       {
-        "__id__": 28
+        "__id__": 25
       },
       {
-        "__id__": 31
+        "__id__": 28
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 35
+        "__id__": 32
       },
       {
-        "__id__": 36
+        "__id__": 33
+      },
+      {
+        "__id__": 34
       },
       {
-        "__id__": 37
+        "__id__": 36
       }
     ],
     "_prefab": {
-      "__id__": 39
+      "__id__": 37
     },
     "_opacity": 255,
     "_color": {
@@ -1090,17 +983,17 @@
     "_name": "视频图标",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 27
+      "__id__": 24
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 29
+        "__id__": 26
       }
     ],
     "_prefab": {
-      "__id__": 30
+      "__id__": 27
     },
     "_opacity": 255,
     "_color": {
@@ -1154,7 +1047,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 28
+      "__id__": 25
     },
     "_enabled": true,
     "_materials": [
@@ -1197,20 +1090,20 @@
     "_name": "按钮描述",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 27
+      "__id__": 24
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 32
+        "__id__": 29
       },
       {
-        "__id__": 33
+        "__id__": 30
       }
     ],
     "_prefab": {
-      "__id__": 34
+      "__id__": 31
     },
     "_opacity": 255,
     "_color": {
@@ -1264,7 +1157,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 31
+      "__id__": 28
     },
     "_enabled": true,
     "_materials": [
@@ -1299,7 +1192,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 31
+      "__id__": 28
     },
     "_enabled": true,
     "_color": {
@@ -1328,7 +1221,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 27
+      "__id__": 24
     },
     "_enabled": true,
     "_materials": [
@@ -1360,7 +1253,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 27
+      "__id__": 24
     },
     "_enabled": true,
     "_defaultClip": {
@@ -1379,16 +1272,20 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 27
+      "__id__": 24
     },
     "_enabled": true,
-    "_normalMaterial": null,
-    "_grayMaterial": null,
+    "_normalMaterial": {
+      "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+    },
+    "_grayMaterial": {
+      "__uuid__": "3a7bb79f-32fd-422e-ada2-96f518fed422"
+    },
     "duration": 0.1,
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 38
+        "__id__": 35
       }
     ],
     "_N$interactable": true,
@@ -1444,7 +1341,7 @@
     "hoverSprite": null,
     "_N$disabledSprite": null,
     "_N$target": {
-      "__id__": 27
+      "__id__": 24
     },
     "_id": ""
   },
@@ -1459,6 +1356,23 @@
     "customEventData": ""
   },
   {
+    "__type__": "f67a9SEPlBL8rHHpVX6g1ZW",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 24
+    },
+    "_enabled": true,
+    "normal": {
+      "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+    },
+    "gray": {
+      "__uuid__": "3a7bb79f-32fd-422e-ada2-96f518fed422"
+    },
+    "grayState": false,
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
@@ -1474,7 +1388,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 5
+      "__id__": 2
     },
     "_enabled": true,
     "alignMode": 1,
@@ -1518,17 +1432,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 43
+        "__id__": 41
       },
       {
-        "__id__": 44
+        "__id__": 42
       },
       {
-        "__id__": 45
+        "__id__": 43
       }
     ],
     "_prefab": {
-      "__id__": 46
+      "__id__": 44
     },
     "_opacity": 255,
     "_color": {
@@ -1582,7 +1496,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 42
+      "__id__": 40
     },
     "_enabled": true,
     "_materials": [
@@ -1614,7 +1528,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 42
+      "__id__": 40
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -1682,7 +1596,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 42
+      "__id__": 40
     },
     "_enabled": true,
     "node_panel": {
@@ -1738,7 +1652,10 @@
     },
     "_enabled": true,
     "scroll_view": {
-      "__id__": 15
+      "__id__": 12
+    },
+    "anim_btn": {
+      "__id__": 33
     },
     "_id": ""
   },
@@ -1758,7 +1675,7 @@
       "a": 120
     },
     "design_block_node": {
-      "__id__": 6
+      "__id__": 3
     },
     "bClickClose": true,
     "_id": ""
@@ -1772,7 +1689,7 @@
     },
     "_enabled": true,
     "effect_par": {
-      "__id__": 5
+      "__id__": 2
     },
     "open_effect": 1,
     "close_effect": 1,

BIN
assets/resources/module/sign/签到.png


+ 0 - 36
assets/resources/module/sign/签到.png.meta

@@ -1,36 +0,0 @@
-{
-  "ver": "2.3.5",
-  "uuid": "3077a71a-8686-44d2-83c7-325ff1d9480a",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "genMipmaps": false,
-  "packable": true,
-  "width": 750,
-  "height": 1334,
-  "platformSettings": {},
-  "subMetas": {
-    "签到": {
-      "ver": "1.0.4",
-      "uuid": "6eeb149c-9754-4af3-8707-fd1f1cff3b00",
-      "rawTextureUuid": "3077a71a-8686-44d2-83c7-325ff1d9480a",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 750,
-      "height": 1334,
-      "rawWidth": 750,
-      "rawHeight": 1334,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

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

@@ -56,4 +56,8 @@ export enum GameProp{
 
 
     /** ------------------ 签到数据 ----------------------------- */
+    /** 当前签到第几天 */
+    cur_sign_day = 120,
+    /** 当前能否签到 */
+    can_sign = 121,
 }

+ 48 - 19
assets/script/game/data/module/SignData.ts

@@ -6,13 +6,34 @@ export class SignData {
     /** 标志位:是否需要刷新数据 */
     public init_data: boolean = false;
 
-    /** 获取列表数据 */
+    /** 签到配置 */
+    public c_sign = [];
+
+    // 假数据 当前签到天数
+    private _cur_sign_day = 3;
+    set cur_sign_day(value: number) {
+        this._cur_sign_day = value;
+        this.init_data = true;
+    }
+    get cur_sign_day(): number {
+        return this._cur_sign_day;
+    }
+
+    // 假数据 能够签到
+    private _can_sign = 1;
+    set can_sign(value: number) {
+        this._can_sign = value;
+        this.init_data = true;
+    }
+    get can_sign(): number {
+        return this._can_sign;
+    }
+
+    /** 签到列表数据 */
+    public list_data = [];
+    /** 初始化列表数据 */
     public initListData() {
-        if (!this.c_sign.length) {
-            this.c_sign = this.getSignConfig();
-        } else {
-            this.c_sign = this.c_sign
-        }
+        if (!this.c_sign.length) this.c_sign = this.getSignConfig();
         let list_data = [];
         for (let i = 0; i < 30;) {
             let item_data = [];
@@ -25,18 +46,6 @@ export class SignData {
         }
         this.list_data = list_data;
     }
-    /** 签到列表数据 */
-    public list_data = [];
-
-    /** 签到配置 */
-    private _c_sign = [];
-    set c_sign(value: Array<any>) {
-        this._c_sign = value;
-        this.init_data = true;
-    }
-    get c_sign(): Array<any> {
-        return this._c_sign;
-    }
 
     /** 客户端造的假配置 */
     private getSignConfig() {
@@ -49,9 +58,29 @@ export class SignData {
             data.count = id;
             data.login_day = id;
             data.video_limit = 0;
-            data.state = g.enum.rewardState.lock;
             c_sign.push(data);
         }
         return c_sign;
     }
+    
+    /**
+     * 获取奖励状态
+     * @param login_day 登陆日 
+     * @returns 状态123
+     */
+    public getStateByDay(login_day: number) {
+        let _state = g.enum.rewardState.none;
+        if (login_day < this.cur_sign_day) {
+            _state = g.enum.rewardState.none;
+        } else if (login_day == this.cur_sign_day) {
+            if (!this.can_sign) {
+                _state = g.enum.rewardState.none;
+            } else {
+                _state = g.enum.rewardState.unlock;
+            }
+        } else {
+            _state = g.enum.rewardState.lock;
+        }
+        return _state;
+    }
 }

+ 15 - 7
assets/script/game/module/module/sign/Sign.ts

@@ -9,6 +9,8 @@ export default class Sign extends cc.Component {
 
     @property({ type: cc.ScrollView, displayName: '滚动视图' })
     private scroll_view: cc.ScrollView = null!;
+    @property({ type: cc.Animation, displayName: '按钮_动画' })
+    private anim_btn: cc.Animation = null!;
 
     onLoad() {
 
@@ -16,11 +18,7 @@ export default class Sign extends cc.Component {
 
     start() {
         g.sign.initListData();
-        // 数据刷新测试
-        // this.scheduleOnce(() => {
-        //     g.sign.c_sign[0].login_day = 666
-        //     g.sign.initListData();
-        // }, 5)
+        g.sign.init_data = true;
     }
 
     /**
@@ -29,19 +27,29 @@ export default class Sign extends cc.Component {
     private initScollView() {
         let list_data = g.sign.list_data;
         this.scroll_view.node.emit('srollview-init', list_data)
-        cc.log(list_data)
     }
 
     /**
      * 点击领取按钮
      */
     private clickReceiveReward() {
-
+        g.sign.can_sign = 0;
     }
     update(dt) {
         if (g.sign.init_data) {
             g.sign.init_data = false;
             this.initScollView();
+            this.initBtnStyle();
+        }
+    }
+    private initBtnStyle() {
+        if (g.sign.can_sign) {
+            this.anim_btn.play();
+            this.anim_btn.getComponent('SetGray').setGray(false);
+        } else {
+            this.anim_btn.stop();
+            this.anim_btn.node.scale = 1;
+            this.anim_btn.getComponent('SetGray').setGray(true);
         }
     }
 }

+ 19 - 11
assets/script/game/module/module/sign/SignIconItem.ts

@@ -3,6 +3,9 @@ const { ccclass, property } = cc._decorator;
 /**
  * 签到icon组件
  * @author 薛鸿潇
+ * - 红包icon:用红包样式
+ * - 现金、金猪现金:用提现样式
+ * 签到数据几点刷新?什么方式刷新? 与后端沟通
  */
 @ccclass
 export default class SignIconItem extends cc.Component {
@@ -10,6 +13,9 @@ export default class SignIconItem extends cc.Component {
     private node_cash: cc.Node = null!;
     @property({ displayName: '红包样式', type: cc.Node })
     private node_redbag: cc.Node = null!;
+    @property({ displayName: '现金提示', type: cc.Node })
+    private node_money: cc.Node = null!;
+
     @property({ displayName: '天数', type: cc.Label })
     private lbl_day: cc.Label = null!;
     @property({ type: cc.Node, displayName: '蒙版' })
@@ -24,6 +30,7 @@ export default class SignIconItem extends cc.Component {
         count: 0,
         login_day: 0,
         video_limit: 0,
+        state: g.enum.rewardState.none,
     }
 
     /**
@@ -53,18 +60,19 @@ export default class SignIconItem extends cc.Component {
             this.lbl_day.node.getComponent(cc.LabelOutline).color = cc.color(DayOutLineColor.red_bag);
         }
         this.icon_data = icon_data;
-    }
 
-    /**
-     * 领取奖励
-     * - 检查点击的icon是否是正确的icon
-     * - 是正确的icon,奖励检查类型
-     */
-    private clickReceiveReward() {
-        if (this.icon_data.reward_type) {
-            
-        } else {
-            
+        // 状态样式
+        let state = g.sign.getStateByDay(icon_data.login_day);
+        if (state == g.enum.rewardState.none) {
+            this.node_mask.active = true;
+            this.node_gou.active = true;
+            this.node_money.active = false;
+        } else if (state == g.enum.rewardState.unlock) {
+            this.node_mask.active = false;
+            this.node_gou.active = false;
+        } else if (state == g.enum.rewardState.lock) {
+            this.node_mask.active = false;
+            this.node_gou.active = false;
         }
     }
 }