Ver código fonte

update store

zy_1995 6 meses atrás
pai
commit
76a6e66e03

+ 2 - 2
assets/Module/AgreeMent/Prefab/DiamondPolicy.prefab

@@ -1520,8 +1520,8 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_string": "遊戲商業模式:\n        玩家通過創建房間消耗鑚石玩遊戲,當前版本可通過以下方式免費獲取鑚石,後期版本升級內購模式。\n\n鑚石獲得途徑:\n        1.玩家登入遊戲註冊帳號贈送500顆鑚石。\n        2.玩家每日首次登入遊戲大廳贈送100顆鑚石。\n\n鑚石需求如下:\n       1.創建俱樂部、大聯盟分別需100顆鑚石\n       2.麻将创建房间需钻石如下:\n             8局2人需4顆鑚石\n             8局4人需8顆鑚石\n             12局2人需6顆鑚石\n             12局4人需12顆鑚石\n             16局2人需8顆鑚石\n             16局4人需16顆鑚石",
-    "_N$string": "遊戲商業模式:\n        玩家通過創建房間消耗鑚石玩遊戲,當前版本可通過以下方式免費獲取鑚石,後期版本升級內購模式。\n\n鑚石獲得途徑:\n        1.玩家登入遊戲註冊帳號贈送500顆鑚石。\n        2.玩家每日首次登入遊戲大廳贈送100顆鑚石。\n\n鑚石需求如下:\n       1.創建俱樂部、大聯盟分別需100顆鑚石\n       2.麻将创建房间需钻石如下:\n             8局2人需4顆鑚石\n             8局4人需8顆鑚石\n             12局2人需6顆鑚石\n             12局4人需12顆鑚石\n             16局2人需8顆鑚石\n             16局4人需16顆鑚石",
+    "_string": "遊戲商業模式:\n        玩家通過創建房間消耗鑚石玩遊戲,當前版本可通過以下方式免費獲取鑚石,後期版本升級內購模式。\n\n鑚石獲得途徑:\n        1.玩家登入遊戲註冊帳號贈送500顆鑚石。\n        2.玩家每日首次登入遊戲大廳贈送100顆鑚石。\n\n鑚石需求如下:\n       1.創建俱樂部、大聯盟分別需100顆鑚石\n       2.麻将创建房间需钻石如下:\n             1圈2人需4顆鑚石\n             1圈4人需8顆鑚石\n             2圈2人需6顆鑚石\n             2圈4人需12顆鑚石\n             4圈2人需8顆鑚石\n             4圈4人需16顆鑚石",
+    "_N$string": "遊戲商業模式:\n        玩家通過創建房間消耗鑚石玩遊戲,當前版本可通過以下方式免費獲取鑚石,後期版本升級內購模式。\n\n鑚石獲得途徑:\n        1.玩家登入遊戲註冊帳號贈送500顆鑚石。\n        2.玩家每日首次登入遊戲大廳贈送100顆鑚石。\n\n鑚石需求如下:\n       1.創建俱樂部、大聯盟分別需100顆鑚石\n       2.麻将创建房间需钻石如下:\n             1圈2人需4顆鑚石\n             1圈4人需8顆鑚石\n             2圈2人需6顆鑚石\n             2圈4人需12顆鑚石\n             4圈2人需8顆鑚石\n             4圈4人需16顆鑚石",
     "_fontSize": 36,
     "_lineHeight": 40,
     "_enableWrapText": true,

+ 156 - 70
assets/Module/Store/Prefab/Store.prefab

@@ -30,23 +30,23 @@
         "__id__": 44
       },
       {
-        "__id__": 78
+        "__id__": 79
       },
       {
-        "__id__": 87
+        "__id__": 88
       },
       {
-        "__id__": 94
+        "__id__": 95
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 114
+        "__id__": 115
       }
     ],
     "_prefab": {
-      "__id__": 115
+      "__id__": 116
     },
     "_opacity": 255,
     "_color": {
@@ -1672,11 +1672,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 76
+        "__id__": 77
       }
     ],
     "_prefab": {
-      "__id__": 77
+      "__id__": 78
     },
     "_opacity": 255,
     "_color": {
@@ -1740,14 +1740,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 73
+        "__id__": 74
       },
       {
-        "__id__": 74
+        "__id__": 75
       }
     ],
     "_prefab": {
-      "__id__": 75
+      "__id__": 76
     },
     "_opacity": 255,
     "_color": {
@@ -1811,14 +1811,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 70
+        "__id__": 71
       },
       {
-        "__id__": 71
+        "__id__": 72
       }
     ],
     "_prefab": {
-      "__id__": 72
+      "__id__": 73
     },
     "_opacity": 255,
     "_color": {
@@ -1886,9 +1886,13 @@
       }
     ],
     "_active": true,
-    "_components": [],
+    "_components": [
+      {
+        "__id__": 69
+      }
+    ],
     "_prefab": {
-      "__id__": 69
+      "__id__": 70
     },
     "_opacity": 255,
     "_color": {
@@ -2751,6 +2755,88 @@
     "fileId": "7d6YeS/yJJAZJhNWZivXaa",
     "sync": false
   },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 47
+    },
+    "_enabled": true,
+    "_normalMaterial": null,
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 1,
+    "transition": 1,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 230,
+      "g": 230,
+      "b": 230,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "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": 120,
+      "g": 120,
+      "b": 120,
+      "a": 255
+    },
+    "_N$normalSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "_N$hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$disabledSprite": {
+      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
+    },
+    "_N$target": {
+      "__id__": 62
+    },
+    "_id": ""
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -2936,20 +3022,20 @@
     },
     "_children": [
       {
-        "__id__": 79
+        "__id__": 80
       },
       {
-        "__id__": 82
+        "__id__": 83
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 85
+        "__id__": 86
       }
     ],
     "_prefab": {
-      "__id__": 86
+      "__id__": 87
     },
     "_opacity": 255,
     "_color": {
@@ -3003,17 +3089,17 @@
     "_name": "coin-icon",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 78
+      "__id__": 79
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 80
+        "__id__": 81
       }
     ],
     "_prefab": {
-      "__id__": 81
+      "__id__": 82
     },
     "_opacity": 255,
     "_color": {
@@ -3067,7 +3153,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 79
+      "__id__": 80
     },
     "_enabled": true,
     "_materials": [
@@ -3110,17 +3196,17 @@
     "_name": "coinLab",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 78
+      "__id__": 79
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 83
+        "__id__": 84
       }
     ],
     "_prefab": {
-      "__id__": 84
+      "__id__": 85
     },
     "_opacity": 255,
     "_color": {
@@ -3174,7 +3260,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 82
+      "__id__": 83
     },
     "_enabled": true,
     "_materials": [
@@ -3218,7 +3304,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 78
+      "__id__": 79
     },
     "_enabled": true,
     "_materials": [
@@ -3265,17 +3351,17 @@
     },
     "_children": [
       {
-        "__id__": 88
+        "__id__": 89
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 91
+        "__id__": 92
       }
     ],
     "_prefab": {
-      "__id__": 93
+      "__id__": 94
     },
     "_opacity": 255,
     "_color": {
@@ -3329,17 +3415,17 @@
     "_name": "Background",
     "_objFlags": 512,
     "_parent": {
-      "__id__": 87
+      "__id__": 88
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 89
+        "__id__": 90
       }
     ],
     "_prefab": {
-      "__id__": 90
+      "__id__": 91
     },
     "_opacity": 255,
     "_color": {
@@ -3393,7 +3479,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 88
+      "__id__": 89
     },
     "_enabled": true,
     "_materials": [
@@ -3436,7 +3522,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 87
+      "__id__": 88
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -3445,7 +3531,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 92
+        "__id__": 93
       }
     ],
     "_N$interactable": true,
@@ -3513,7 +3599,7 @@
       "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
     },
     "_N$target": {
-      "__id__": 88
+      "__id__": 89
     },
     "_id": ""
   },
@@ -3547,25 +3633,25 @@
     },
     "_children": [
       {
-        "__id__": 95
+        "__id__": 96
       },
       {
-        "__id__": 99
+        "__id__": 100
       },
       {
-        "__id__": 102
+        "__id__": 103
       },
       {
-        "__id__": 105
+        "__id__": 106
       },
       {
-        "__id__": 108
+        "__id__": 109
       }
     ],
     "_active": false,
     "_components": [],
     "_prefab": {
-      "__id__": 113
+      "__id__": 114
     },
     "_opacity": 255,
     "_color": {
@@ -3619,20 +3705,20 @@
     "_name": "NoClick",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 94
+      "__id__": 95
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 96
+        "__id__": 97
       },
       {
-        "__id__": 97
+        "__id__": 98
       }
     ],
     "_prefab": {
-      "__id__": 98
+      "__id__": 99
     },
     "_opacity": 150,
     "_color": {
@@ -3686,7 +3772,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 95
+      "__id__": 96
     },
     "_enabled": true,
     "_materials": [
@@ -3718,7 +3804,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 95
+      "__id__": 96
     },
     "_enabled": true,
     "_id": ""
@@ -3739,17 +3825,17 @@
     "_name": "dialog-bg",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 94
+      "__id__": 95
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 100
+        "__id__": 101
       }
     ],
     "_prefab": {
-      "__id__": 101
+      "__id__": 102
     },
     "_opacity": 255,
     "_color": {
@@ -3803,7 +3889,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 99
+      "__id__": 100
     },
     "_enabled": true,
     "_materials": [
@@ -3846,17 +3932,17 @@
     "_name": "icon",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 94
+      "__id__": 95
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 103
+        "__id__": 104
       }
     ],
     "_prefab": {
-      "__id__": 104
+      "__id__": 105
     },
     "_opacity": 255,
     "_color": {
@@ -3910,7 +3996,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 102
+      "__id__": 103
     },
     "_enabled": true,
     "_materials": [
@@ -3953,17 +4039,17 @@
     "_name": "descLab",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 94
+      "__id__": 95
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 106
+        "__id__": 107
       }
     ],
     "_prefab": {
-      "__id__": 107
+      "__id__": 108
     },
     "_opacity": 255,
     "_color": {
@@ -4017,7 +4103,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 105
+      "__id__": 106
     },
     "_enabled": true,
     "_fontFamily": "Arial",
@@ -4049,20 +4135,20 @@
     "_name": "btnConfirm",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 94
+      "__id__": 95
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 109
+        "__id__": 110
       },
       {
-        "__id__": 111
+        "__id__": 112
       }
     ],
     "_prefab": {
-      "__id__": 112
+      "__id__": 113
     },
     "_opacity": 255,
     "_color": {
@@ -4116,7 +4202,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 108
+      "__id__": 109
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -4125,7 +4211,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 110
+        "__id__": 111
       }
     ],
     "_N$interactable": true,
@@ -4193,7 +4279,7 @@
       "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
     },
     "_N$target": {
-      "__id__": 108
+      "__id__": 109
     },
     "_id": ""
   },
@@ -4212,7 +4298,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 108
+      "__id__": 109
     },
     "_enabled": true,
     "_materials": [

+ 1 - 0
assets/Module/Store/Script/Store.ts

@@ -104,6 +104,7 @@ export default class Store extends cc.Component {
             let countLab = itemNode.getChildByName("countLab");
             countLab.getComponent(cc.Label).string = "" + curData.num;
             let btnBuy = itemNode.getChildByName("btnBuy");
+            CommonUtility.getInstance().bindNodeHandler(this, itemNode, "onclickBuy", true, `${idx}`, true);
             CommonUtility.getInstance().bindNodeHandler(this, btnBuy, "onclickBuy", true, `${idx}`, true);
             btnBuy.getChildByName("lab").getComponent(cc.Label).string = window["PAY_CURRENCY_SYMBOL"] + curData.price;
             let iconNode = cc.find("bg/icon", itemNode);