Kaynağa Gözat

抽卡模块 接口对接完结

zhengniehua 5 yıl önce
ebeveyn
işleme
3b284e03e2
25 değiştirilmiş dosya ile 4539 ekleme ve 271 silme
  1. 13 9
      tower_sanguo/assets/resources/module/drawRecruit/drawRecruit.prefab
  2. 1427 13
      tower_sanguo/assets/resources/module/drawRecruit/drawResult.prefab
  3. BIN
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/bg1.png
  4. 36 0
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/bg1.png.meta
  5. BIN
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icn_up.png
  6. 36 0
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icn_up.png.meta
  7. BIN
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icon_hb.png
  8. 36 0
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icon_hb.png.meta
  9. BIN
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icon_yb.png
  10. 36 0
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icon_yb.png.meta
  11. BIN
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/title_ybhd.png
  12. 36 0
      tower_sanguo/assets/resources/module/drawRecruit/texture/panel/title_ybhd.png.meta
  13. 2362 0
      tower_sanguo/assets/resources/module/drawRecruit/yBExchange.prefab
  14. 8 0
      tower_sanguo/assets/resources/module/drawRecruit/yBExchange.prefab.meta
  15. 289 192
      tower_sanguo/assets/scenes/Test_Znh.fire
  16. 22 1
      tower_sanguo/assets/scripts/data/GameData.ts
  17. 3 0
      tower_sanguo/assets/scripts/data/GameDefinition.ts
  18. 54 26
      tower_sanguo/assets/scripts/module/drawRecruit/DrawGeneralUI.ts
  19. 34 4
      tower_sanguo/assets/scripts/module/drawRecruit/DrawRecruitModel.ts
  20. 49 22
      tower_sanguo/assets/scripts/module/drawRecruit/DrawRecruitUI.ts
  21. 13 0
      tower_sanguo/assets/scripts/module/drawRecruit/DrawResultUI.ts
  22. 1 0
      tower_sanguo/assets/scripts/module/drawRecruit/DrawWishUI.ts
  23. 60 0
      tower_sanguo/assets/scripts/module/drawRecruit/YBExchange.ts
  24. 9 0
      tower_sanguo/assets/scripts/module/drawRecruit/YBExchange.ts.meta
  25. 15 4
      tower_sanguo/assets/scripts/net/HttpCommand.ts

+ 13 - 9
tower_sanguo/assets/resources/module/drawRecruit/drawRecruit.prefab

@@ -14,7 +14,7 @@
   {
     "__type__": "cc.Node",
     "_name": "drawRecruit",
-    "_objFlags": 512,
+    "_objFlags": 0,
     "_parent": null,
     "_children": [
       {
@@ -3548,7 +3548,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -4078,7 +4078,9 @@
       "__id__": 94
     },
     "_enabled": true,
-    "_normalMaterial": null,
+    "_normalMaterial": {
+      "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+    },
     "_grayMaterial": null,
     "duration": 0.1,
     "zoomScale": 1.2,
@@ -4089,8 +4091,8 @@
     ],
     "_N$interactable": true,
     "_N$enableAutoGrayEffect": false,
-    "_N$transition": 0,
-    "transition": 0,
+    "_N$transition": 3,
+    "transition": 3,
     "_N$normalColor": {
       "__type__": "cc.Color",
       "r": 255,
@@ -4230,7 +4232,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -5222,7 +5224,9 @@
       "__id__": 113
     },
     "_enabled": true,
-    "_normalMaterial": null,
+    "_normalMaterial": {
+      "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+    },
     "_grayMaterial": null,
     "duration": 0.1,
     "zoomScale": 1.2,
@@ -5233,8 +5237,8 @@
     ],
     "_N$interactable": true,
     "_N$enableAutoGrayEffect": false,
-    "_N$transition": 0,
-    "transition": 0,
+    "_N$transition": 3,
+    "transition": 3,
     "_N$normalColor": {
       "__type__": "cc.Color",
       "r": 255,

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1427 - 13
tower_sanguo/assets/resources/module/drawRecruit/drawResult.prefab


BIN
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/bg1.png


+ 36 - 0
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/bg1.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "20228099-fc88-4285-962f-4d51fc14dc6a",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 611,
+  "height": 235,
+  "platformSettings": {},
+  "subMetas": {
+    "bg1": {
+      "ver": "1.0.4",
+      "uuid": "e649acc7-9c9b-462f-b184-f8d886350fd1",
+      "rawTextureUuid": "20228099-fc88-4285-962f-4d51fc14dc6a",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 611,
+      "height": 235,
+      "rawWidth": 611,
+      "rawHeight": 235,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icn_up.png


+ 36 - 0
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icn_up.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "6fd7d856-23f8-48ad-af93-2c3eeed8095e",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 39,
+  "height": 39,
+  "platformSettings": {},
+  "subMetas": {
+    "icn_up": {
+      "ver": "1.0.4",
+      "uuid": "1a2c9584-dfe0-4b11-8f4e-a86f7915e1a8",
+      "rawTextureUuid": "6fd7d856-23f8-48ad-af93-2c3eeed8095e",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 39,
+      "height": 39,
+      "rawWidth": 39,
+      "rawHeight": 39,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icon_hb.png


+ 36 - 0
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icon_hb.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "67ab8950-84e3-4df3-8111-0d1f6332991c",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 45,
+  "height": 57,
+  "platformSettings": {},
+  "subMetas": {
+    "icon_hb": {
+      "ver": "1.0.4",
+      "uuid": "95e24d04-eb6f-4317-9b07-5b5efa487586",
+      "rawTextureUuid": "67ab8950-84e3-4df3-8111-0d1f6332991c",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 45,
+      "height": 57,
+      "rawWidth": 45,
+      "rawHeight": 57,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icon_yb.png


+ 36 - 0
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/icon_yb.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "ac2a87ae-36b8-4ded-b9cb-25ac38db226f",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 55,
+  "height": 46,
+  "platformSettings": {},
+  "subMetas": {
+    "icon_yb": {
+      "ver": "1.0.4",
+      "uuid": "f4a324c8-bd15-4baf-814e-5ae018bfc489",
+      "rawTextureUuid": "ac2a87ae-36b8-4ded-b9cb-25ac38db226f",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 55,
+      "height": 46,
+      "rawWidth": 55,
+      "rawHeight": 46,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/title_ybhd.png


+ 36 - 0
tower_sanguo/assets/resources/module/drawRecruit/texture/panel/title_ybhd.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "d1b32256-405e-467a-b991-37435773f11e",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 164,
+  "height": 37,
+  "platformSettings": {},
+  "subMetas": {
+    "title_ybhd": {
+      "ver": "1.0.4",
+      "uuid": "8ff0486b-36e1-4355-a72c-585fe7800526",
+      "rawTextureUuid": "d1b32256-405e-467a-b991-37435773f11e",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 164,
+      "height": 37,
+      "rawWidth": 164,
+      "rawHeight": 37,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 2362 - 0
tower_sanguo/assets/resources/module/drawRecruit/yBExchange.prefab

@@ -0,0 +1,2362 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "yBExchange",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 6
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 62
+      },
+      {
+        "__id__": 63
+      }
+    ],
+    "_prefab": {
+      "__id__": 64
+    },
+    "_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": [
+        375,
+        667,
+        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": "bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": {
+      "__id__": 5
+    },
+    "_opacity": 150,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "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__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 100,
+    "_originalHeight": 100,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "9fxgrvZVhOSpicqR/7g2SG",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "panel",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 7
+      },
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 13
+      },
+      {
+        "__id__": 16
+      },
+      {
+        "__id__": 26
+      },
+      {
+        "__id__": 36
+      },
+      {
+        "__id__": 39
+      },
+      {
+        "__id__": 48
+      },
+      {
+        "__id__": 57
+      }
+    ],
+    "_active": true,
+    "_components": [],
+    "_prefab": {
+      "__id__": 61
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_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.Node",
+    "_name": "bg_yb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 698,
+      "height": 605
+    },
+    "_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__": 7
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "74a6f583-038d-425c-805b-364911d003eb"
+    },
+    "_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__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "98I3ZzK5ZO976UfeABl0cY",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "title_ybhd",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": {
+      "__id__": 12
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 164,
+      "height": 37
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        276.489,
+        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__": 10
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "8ff0486b-36e1-4355-a72c-585fe7800526"
+    },
+    "_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__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "1autRxIgxGy6/og5mkEu3l",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 14
+      }
+    ],
+    "_prefab": {
+      "__id__": 15
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 611,
+      "height": 235
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        106.312,
+        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__": 13
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "e649acc7-9c9b-462f-b184-f8d886350fd1"
+    },
+    "_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__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "c8KecENt9CEIRcmSTn7Cq9",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "layout_hb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [
+      {
+        "__id__": 17
+      },
+      {
+        "__id__": 20
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 24
+      }
+    ],
+    "_prefab": {
+      "__id__": 25
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 193.69,
+      "height": 70
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        170.341,
+        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": "icon_hb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 16
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 18
+      }
+    ],
+    "_prefab": {
+      "__id__": 19
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 45,
+      "height": 57
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -74.345,
+        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__": 17
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "95e24d04-eb6f-4317-9b07-5b5efa487586"
+    },
+    "_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__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "25SgZEjYVKs6FqRaIGoDH9",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "txt_num_rb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 16
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 21
+      },
+      {
+        "__id__": 22
+      }
+    ],
+    "_prefab": {
+      "__id__": 23
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 235,
+      "b": 60,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 128.69,
+      "height": 79.6
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        32.5,
+        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.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "1000",
+    "_N$string": "1000",
+    "_fontSize": 60,
+    "_lineHeight": 60,
+    "_enableWrapText": true,
+    "_N$file": {
+      "__uuid__": "2bec5164-bd32-4719-bbbf-97e2c8b3ab1a"
+    },
+    "_isSystemFontUsed": false,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_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__": 20
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 146,
+      "g": 21,
+      "b": 0,
+      "a": 255
+    },
+    "_width": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "cbJAxhK05F26WsCeI7MQND",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Layout",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 16
+    },
+    "_enabled": true,
+    "_layoutSize": {
+      "__type__": "cc.Size",
+      "width": 193.69,
+      "height": 70
+    },
+    "_resize": 1,
+    "_N$layoutType": 1,
+    "_N$cellSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 40
+    },
+    "_N$startAxis": 0,
+    "_N$paddingLeft": 0,
+    "_N$paddingRight": 0,
+    "_N$paddingTop": 0,
+    "_N$paddingBottom": 0,
+    "_N$spacingX": 20,
+    "_N$spacingY": 0,
+    "_N$verticalDirection": 1,
+    "_N$horizontalDirection": 0,
+    "_N$affectedByScale": false,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "0fY0mY8ARBnqDvj9u1E2dU",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "layout_yb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [
+      {
+        "__id__": 27
+      },
+      {
+        "__id__": 30
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 34
+      }
+    ],
+    "_prefab": {
+      "__id__": 35
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 237.91,
+      "height": 70
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        39.867,
+        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": "icon_yb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 26
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 28
+      }
+    ],
+    "_prefab": {
+      "__id__": 29
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 55,
+      "height": 46
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -91.45499999999998,
+        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__": 27
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "f4a324c8-bd15-4baf-814e-5ae018bfc489"
+    },
+    "_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__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "3cdxuvxgBB3ZldgeNI5L9x",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "txt_num_yb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 26
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 31
+      },
+      {
+        "__id__": 32
+      }
+    ],
+    "_prefab": {
+      "__id__": 33
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 235,
+      "b": 60,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 162.91,
+      "height": 79.6
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        37.500000000000014,
+        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.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 30
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "10000",
+    "_N$string": "10000",
+    "_fontSize": 60,
+    "_lineHeight": 60,
+    "_enableWrapText": true,
+    "_N$file": {
+      "__uuid__": "2bec5164-bd32-4719-bbbf-97e2c8b3ab1a"
+    },
+    "_isSystemFontUsed": false,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_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__": 30
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 146,
+      "g": 21,
+      "b": 0,
+      "a": 255
+    },
+    "_width": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "63plB9wWBGWYPuTpAuTX92",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Layout",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 26
+    },
+    "_enabled": true,
+    "_layoutSize": {
+      "__type__": "cc.Size",
+      "width": 237.91,
+      "height": 70
+    },
+    "_resize": 1,
+    "_N$layoutType": 1,
+    "_N$cellSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 40
+    },
+    "_N$startAxis": 0,
+    "_N$paddingLeft": 0,
+    "_N$paddingRight": 0,
+    "_N$paddingTop": 0,
+    "_N$paddingBottom": 0,
+    "_N$spacingX": 20,
+    "_N$spacingY": 0,
+    "_N$verticalDirection": 1,
+    "_N$horizontalDirection": 0,
+    "_N$affectedByScale": false,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "2fIw7ISudOPbDcrfuKW0Jj",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "icn_up",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 37
+      }
+    ],
+    "_prefab": {
+      "__id__": 38
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 39,
+      "height": 39
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        105.104,
+        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__": 36
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "1a2c9584-dfe0-4b11-8f4e-a86f7915e1a8"
+    },
+    "_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__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "deBszKUbdFLbaw/NIy7Wey",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "btn_exchange",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [
+      {
+        "__id__": 40
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 44
+      },
+      {
+        "__id__": 45
+      }
+    ],
+    "_prefab": {
+      "__id__": 47
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 310,
+      "height": 124
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -109.936,
+        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": "txt",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 39
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 41
+      },
+      {
+        "__id__": 42
+      }
+    ],
+    "_prefab": {
+      "__id__": 43
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 94.63,
+      "height": 54.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        5.867,
+        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__": 40
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "兑 换",
+    "_N$string": "兑 换",
+    "_fontSize": 40,
+    "_lineHeight": 40,
+    "_enableWrapText": true,
+    "_N$file": {
+      "__uuid__": "2bec5164-bd32-4719-bbbf-97e2c8b3ab1a"
+    },
+    "_isSystemFontUsed": false,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_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__": 40
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 122,
+      "g": 62,
+      "b": 9,
+      "a": 255
+    },
+    "_width": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "87FTgia95D3pUGCtowD3K2",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 39
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "81132e8a-dbcd-454c-aafa-380e8c13b1d2"
+    },
+    "_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.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 39
+    },
+    "_enabled": true,
+    "_normalMaterial": {
+      "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+    },
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 46
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_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": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "84296No5+pEMZvDgRT7b/Ah",
+    "handler": "click_Exchange",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "6dH2TdtstAQZ9z46rHIxIk",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "layout_times",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [
+      {
+        "__id__": 49
+      },
+      {
+        "__id__": 52
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 55
+      }
+    ],
+    "_prefab": {
+      "__id__": 56
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 196.41,
+      "height": 50
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -202.662,
+        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": "tip",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 48
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 50
+      }
+    ],
+    "_prefab": {
+      "__id__": 51
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 169,
+      "g": 121,
+      "b": 86,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 150,
+      "height": 37.8
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -23.205,
+        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.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 49
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "今日已用:",
+    "_N$string": "今日已用:",
+    "_fontSize": 30,
+    "_lineHeight": 30,
+    "_enableWrapText": true,
+    "_N$file": {
+      "__uuid__": "2bec5164-bd32-4719-bbbf-97e2c8b3ab1a"
+    },
+    "_isSystemFontUsed": false,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "c8N9VQT1dP7Iqlu7BmVmVw",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "txt_num_yb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 48
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 53
+      }
+    ],
+    "_prefab": {
+      "__id__": 54
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 204,
+      "b": 45,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 46.41,
+      "height": 37.8
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        75,
+        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.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 52
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "0/3",
+    "_N$string": "0/3",
+    "_fontSize": 30,
+    "_lineHeight": 30,
+    "_enableWrapText": true,
+    "_N$file": {
+      "__uuid__": "2bec5164-bd32-4719-bbbf-97e2c8b3ab1a"
+    },
+    "_isSystemFontUsed": false,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "9fo5twv8JOv6n5EyZ2Houe",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Layout",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 48
+    },
+    "_enabled": true,
+    "_layoutSize": {
+      "__type__": "cc.Size",
+      "width": 196.41,
+      "height": 50
+    },
+    "_resize": 1,
+    "_N$layoutType": 1,
+    "_N$cellSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 40
+    },
+    "_N$startAxis": 0,
+    "_N$paddingLeft": 0,
+    "_N$paddingRight": 0,
+    "_N$paddingTop": 0,
+    "_N$paddingBottom": 0,
+    "_N$spacingX": 0,
+    "_N$spacingY": 0,
+    "_N$verticalDirection": 1,
+    "_N$horizontalDirection": 0,
+    "_N$affectedByScale": false,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "34Bwa/czpL9YZetBklVRPa",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "btn_close",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 58
+      },
+      {
+        "__id__": 59
+      }
+    ],
+    "_prefab": {
+      "__id__": 60
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 91,
+      "height": 130
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        320.519,
+        232.914,
+        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__": 57
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "69ba35b3-85ac-4ad5-afd8-dc0ac2759345"
+    },
+    "_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.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 57
+    },
+    "_enabled": true,
+    "_normalMaterial": {
+      "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+    },
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_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": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "33SxqArehDHpX4KAHSApqv",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "b0H0uUiKRHrY7HdKjV70b9",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "84296No5+pEMZvDgRT7b/Ah",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "mask_type": 0,
+    "close_node": {
+      "__id__": 57
+    },
+    "design_block_node": {
+      "__id__": 2
+    },
+    "use_modal": true,
+    "use_outside_close": false,
+    "effect_par": null,
+    "open_effect": 0,
+    "close_effect": 0,
+    "close_toPoint": "",
+    "txt_rb": {
+      "__id__": 21
+    },
+    "txt_yb": {
+      "__id__": 31
+    },
+    "txt_times": {
+      "__id__": 53
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "df58c932-c1b9-40dd-a8e2-3eb227221d4d"
+    },
+    "fileId": "03enZVGHBCE5YddA5arY6L",
+    "sync": false
+  }
+]

+ 8 - 0
tower_sanguo/assets/resources/module/drawRecruit/yBExchange.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.7",
+  "uuid": "df58c932-c1b9-40dd-a8e2-3eb227221d4d",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 289 - 192
tower_sanguo/assets/scenes/Test_Znh.fire


+ 22 - 1
tower_sanguo/assets/scripts/data/GameData.ts

@@ -304,7 +304,7 @@ export default class GameData {
         //console.log("skill_data: ", this.skill_data);
 
         turntableModel.Instance.turntable_data = this.turntable_data;
-        
+
         // 任务
         this.initTaskData();
 
@@ -588,6 +588,7 @@ export default class GameData {
         this.player.setProp(PLAYERPROP.USESKILL_TIME, data.skill_coolTime);
         this.player.setProp(PLAYERPROP.TASK_REDBAG_COUNT, data.taskRedBag);
         this.player.setProp(PLAYERPROP.USER_DAILY_ACTIVE_S_INFO, data.dailyTask);
+        this.player.setProp(PLAYERPROP.USER_EXCHANGE_TIMES, data.userExchangeTimes);
 
         // this.player.setProp(PLAYERPROP.GENERAL_TRAIN_TIMES, data.general_train_times);
         // this.player.setProp(PLAYERPROP.INVEST_TIMES, data.invest_times);
@@ -709,6 +710,26 @@ export default class GameData {
         }
         return vo;
     }
+
+
+    /**添加武将或武将碎片
+     * @param type 1 添加武将 2 添加武将碎片
+     * @param id 武将id
+     * @param num type=2 时 武将碎片数量
+    */
+    public addGeneralOrfragment(type: number, id: number, num: number) {
+        let isexist = this.player.generals_bag[id] != null; //true 存在
+        console.log("IsExist: " + isexist);
+        if (isexist) {
+            if (type == 2) {
+                this.player.generals_bag[id].fragment += num;
+            }
+        } else {
+            let vo = this.createGeneralVO(id, type, num);
+            this.player.generals_bag[id] = vo;
+        }
+    }
+
     private updateGeneralsStatus() {
         for (let i in this.player.generals_bag) {
             let vo = this.player.generals_bag[i];

+ 3 - 0
tower_sanguo/assets/scripts/data/GameDefinition.ts

@@ -54,6 +54,9 @@ export enum PLAYERPROP {
      * - 客户端数据,需以服务端为准
     */
     CHECKPOINT_REGBAG_DATA = 33,
+
+    /**剩余红包兑换元宝次数*/
+    USER_EXCHANGE_TIMES = 34,
 }
 
 export enum ITEMTYPE {

+ 54 - 26
tower_sanguo/assets/scripts/module/drawRecruit/DrawGeneralUI.ts

@@ -60,6 +60,10 @@ export default class DrawGeneralUI extends BaseUI {
 
     isCanClick: boolean = true;     //暂时没用
 
+    onLoad() {
+        GameController.gameData.player.addComponent(this, PLAYERPROP.YB);
+    }
+
     start() {
         if (this.ui_data != null) {
             let cfg = GameController.gameData.serverConfig_data;
@@ -143,23 +147,38 @@ export default class DrawGeneralUI extends BaseUI {
         }
     }
 
+
+    updateProp(type: PLAYERPROP, value: number) {
+        switch (type) {
+            case PLAYERPROP.YB:
+                this.txt_num_yb.string = value + "";
+                break;
+        }
+    }
+
+
     click_Open_OneBtn() {
         this.openDraw_One();
     }
 
     click_Draw_OneBtn() {
         this.drawItem_one.init();
-        GameController.http.drawCard((data) => {
-            console.log("--Data DrawCard UI 1: ", data);
-            if (data.data.code == 1) {
-                let generals = data.data.GeneralProp;
-                DrawRecruitModel.Ins.addDrawResultData(generals);
-                this.ui_data = { type: 1, draw_data: generals };
-                this.initPanelOne();
-            } else {
-                GameController.uiM.showToast(data.data.msg);
-            }
-        }, { type: 1 })
+        if (DrawRecruitModel.Ins.isCanDrawGeneral(1)) {
+            GameController.http.drawCard((data) => {
+                console.log("--Data DrawCard UI 1: ", data);
+                if (data.data.code == 1) {
+                    let generals = data.data.GeneralProp;
+                    DrawRecruitModel.Ins.addDrawResultData(generals);
+                    this.ui_data = { type: 1, draw_data: generals };
+                    this.initPanelOne();
+                    GameController.gameData.player.setProp(PLAYERPROP.YB, data.data.Yb);
+                } else {
+                    GameController.uiM.showToast(data.data.msg);
+                }
+            }, { type: 1 })
+        } else {
+            GameController.uiM.showToast("您的元宝不足");
+        }
     }
 
 
@@ -184,21 +203,26 @@ export default class DrawGeneralUI extends BaseUI {
         for (let t of this.drawItem_tens) {
             t.init();
         }
-        this.panelTen_start.active = true;
-        this.panelTen_end.active = false;
-
-        GameController.http.drawCard((data) => {
-            console.log("--Data DrawCard UI 10: ", data);
-            if (data.data.code == 1) {
-                let generals = data.data.GeneralProp;
-                DrawRecruitModel.Ins.addDrawResultData(generals);
-                this.ui_data = { type: 2, draw_data: generals };
-
-                this.openDraw_Ten();
-            } else {
-                GameController.uiM.showToast(data.data.msg);
-            }
-        }, { type: 10 })
+        if (DrawRecruitModel.Ins.isCanDrawGeneral(2)) {
+            GameController.http.drawCard((data) => {
+                console.log("--Data DrawCard UI 10: ", data);
+                if (data.data.code == 1) {
+                    let generals = data.data.GeneralProp;
+                    DrawRecruitModel.Ins.addDrawResultData(generals);
+                    this.ui_data = { type: 2, draw_data: generals };
+
+                    this.openDraw_Ten();
+                    GameController.gameData.player.setProp(PLAYERPROP.YB, data.data.Yb);
+
+                    this.panelTen_start.active = true;
+                    this.panelTen_end.active = false;
+                } else {
+                    GameController.uiM.showToast(data.data.msg);
+                }
+            }, { type: 10 })
+        } else {
+            GameController.uiM.showToast("您的元宝不足");
+        }
     }
 
     click_AddYBBtn() {
@@ -213,4 +237,8 @@ export default class DrawGeneralUI extends BaseUI {
             }
         });
     }
+
+    onDestroy() {
+        GameController.gameData.player.removeComponent(this.node.uuid, PLAYERPROP.YB);
+    }
 }

+ 34 - 4
tower_sanguo/assets/scripts/module/drawRecruit/DrawRecruitModel.ts

@@ -4,6 +4,7 @@
  * @author kaka
  */
 
+import { PLAYERPROP } from "../../data/GameDefinition";
 import GameController from "../../GameController";
 import DrawResultVO from "../../vo/DrawResultVO";
 import GeneralVO from "../../vo/GeneralVO";
@@ -36,9 +37,9 @@ export default class DrawRecruitModel {
     drawResults: DrawResultVO[];
 
     /**单抽数据*/
-    draw_data_one:any;
+    draw_data_one: any;
     /**十连抽数据*/
-    draw_data_ten:any[];
+    draw_data_ten: any[];
 
     /**获取一个有效(status=3)的武将*/
     getAGeneral(): GeneralVO {
@@ -75,7 +76,7 @@ export default class DrawRecruitModel {
                 //碎片
                 let drawdata = this.getDrawResultById(data[i].id, 2);
                 if (drawdata != null) {
-                    drawdata.slice_num+=data[i].num;
+                    drawdata.slice_num += data[i].num;
                 } else {
                     let temp = new DrawResultVO();
                     temp.id = data[i].id;
@@ -86,7 +87,22 @@ export default class DrawRecruitModel {
                 }
             }
         }
-        console.log("--->DrawData: ",this.drawResults);
+        console.log("--->DrawData: ", this.drawResults);
+        this.addLocalGeneralData(data);
+    }
+
+    /**
+     * 添加抽奖结果数据至本地
+     * @param data 数据  [{id:1,type:10,num:1},{id:1,type:11,num:1},...] type: 10 武将 11 碎片 num: 武将碎片数
+    */
+    addLocalGeneralData(data: any[]) {
+        for (let i = 0; i < data.length; i++) {
+            if (data[i].type == 10) {
+                GameController.gameData.addGeneralOrfragment(1, data[i].id, 0)
+            } else {
+                GameController.gameData.addGeneralOrfragment(2, data[i].id, data[i].num)
+            }
+        }
     }
 
     /**获取抽奖结果
@@ -100,4 +116,18 @@ export default class DrawRecruitModel {
                 return this.drawResults[i];
         }
     }
+
+    /**
+     * 是否可以抽卡
+     * @param drawType 抽卡类型 1 单抽 2 十连抽
+    */
+    isCanDrawGeneral(drawType: number) {
+        let cfg = GameController.gameData.serverConfig_data;
+        let cost_one = cfg.invite_cost;
+        if (drawType == 1) {
+            return GameController.gameData.player.getProp(PLAYERPROP.YB) >= cost_one;
+        } else {
+            return GameController.gameData.player.getProp(PLAYERPROP.YB) >= cost_one * 10 * cfg.invite_discount;
+        }
+    }
 }

+ 49 - 22
tower_sanguo/assets/scripts/module/drawRecruit/DrawRecruitUI.ts

@@ -6,6 +6,7 @@ import GeneralVO from "../../vo/GeneralVO";
 import DrawGeneralUI from "./DrawGeneralUI";
 import DrawRecruitModel from "./DrawRecruitModel";
 import DrawWishUI from "./DrawWishUI";
+import YBExchange from "./YBExchange";
 
 const { ccclass, property } = cc._decorator;
 
@@ -46,6 +47,8 @@ export default class DrawRecruitUI extends BaseUI {
 
     onLoad() {
         XXEvent.on("updateWishInfo", this.updateWishInfo, this);
+
+        GameController.gameData.player.addComponent(this, PLAYERPROP.YB);
     }
 
     start() {
@@ -96,6 +99,8 @@ export default class DrawRecruitUI extends BaseUI {
     }
 
     click_WishBtn() {
+        let cfg = GameController.gameData.serverConfig_data;
+        console.log("---Cfg: ", cfg);
         console.log("you click recruitui wish btn");
         GameController.audioM.playEffect(AUDIO_TYPE.button);
         GameController.uiM.openUI(DrawWishUI, null, ViewZorder.UI);
@@ -106,40 +111,62 @@ export default class DrawRecruitUI extends BaseUI {
         //if (GameController.gameData.player.generals_bag != null)
         //    GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 1 });
 
-        GameController.http.drawCard((data) => {
-            console.log("--Data DrawCard 1: ", data);
-            if (data.data.code == 1) {
-                let generals = data.data.GeneralProp;
-                DrawRecruitModel.Ins.addDrawResultData(generals);
-                GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 1,draw_data:generals });
-            } else {
-                GameController.uiM.showToast(data.data.msg);
-            }
-        }, { type: 1 })
+        if (DrawRecruitModel.Ins.isCanDrawGeneral(1)) {
+            GameController.http.drawCard((data) => {
+                console.log("--Data DrawCard 1: ", data);
+                if (data.data.code == 1) {
+                    let generals = data.data.GeneralProp;
+                    DrawRecruitModel.Ins.addDrawResultData(generals);
+                    GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 1, draw_data: generals });
+                    GameController.gameData.player.setProp(PLAYERPROP.YB, data.data.Yb);
+                } else {
+                    GameController.uiM.showToast(data.data.msg);
+                }
+            }, { type: 1 })
+        } else {
+            GameController.uiM.openUI(YBExchange, null, ViewZorder.UI);
+        }
+    }
+
+
+    updateProp(type: PLAYERPROP, value: number) {
+        switch (type) {
+            case PLAYERPROP.YB:
+                console.log("-----Yb: " + value);
+                this.txt_yb.string = value + "";
+                break;
+        }
     }
 
+
     click_DrawTenBtn() {
         GameController.audioM.playEffect(AUDIO_TYPE.button);
         //if (GameController.gameData.player.generals_bag != null)
         //    GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 2 });
-
-        GameController.http.drawCard((data) => {
-            console.log("--Data DrawCard 10: ", data); 
-            if (data.data.code == 1) {
-                let generals = data.data.GeneralProp;
-                DrawRecruitModel.Ins.addDrawResultData(generals);
-                GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 2,draw_data:generals });
-            } else {
-                GameController.uiM.showToast(data.data.msg);
-            }
-        }, { type: 10 })
+        if (DrawRecruitModel.Ins.isCanDrawGeneral(2)) {
+            GameController.http.drawCard((data) => {
+                console.log("--Data DrawCard 10: ", data);
+                if (data.data.code == 1) {
+                    let generals = data.data.GeneralProp;
+                    DrawRecruitModel.Ins.addDrawResultData(generals);
+                    GameController.uiM.openUI(DrawGeneralUI, null, ViewZorder.UI, null, null, { type: 2, draw_data: generals });
+                    GameController.gameData.player.setProp(PLAYERPROP.YB, data.data.Yb);
+                } else {
+                    GameController.uiM.showToast(data.data.msg);
+                }
+            }, { type: 10 })
+        } else {
+            GameController.uiM.openUI(YBExchange, null, ViewZorder.UI);
+        }
     }
 
     click_AddYBBtn() {
-
+        GameController.audioM.playEffect(AUDIO_TYPE.button);
+        GameController.uiM.openUI(YBExchange, null, ViewZorder.UI);
     }
 
     onDestroy() {
         XXEvent.off("updateWishInfo", this.updateWishInfo, this);
+        GameController.gameData.player.removeComponent(this.node.uuid, PLAYERPROP.YB);
     }
 }

+ 13 - 0
tower_sanguo/assets/scripts/module/drawRecruit/DrawResultUI.ts

@@ -10,6 +10,9 @@ export default class DrawResultUI extends BaseUI {
     protected static prefabUrl = "module/drawRecruit/drawResult";
     protected static className = "DrawResultUI";
 
+
+    @property({ type: cc.ScrollView, displayName: '窗口滑动组件' })
+    scrollView: cc.ScrollView = null;
     @property({ type: cc.Node, displayName: 'Content' })
     content: cc.Node = null;
 
@@ -20,6 +23,11 @@ export default class DrawResultUI extends BaseUI {
     start() {
         let data = DrawRecruitModel.Ins.drawResults;
         if (data != null && data.length > 0) {
+            if (data.length <= 3) {
+                this.scrollView.enabled = false;
+                this.content.setPosition(cc.v2(0, 0));
+                console.log("-----");
+            }
             for (let i = 0; i < data.length; i++) {
                 let scr = cc.instantiate(this.drawResultItem.node).getComponent(DrawResultItem);
                 let general = GameController.gameData.getGeneralByID(data[i].id)
@@ -27,6 +35,11 @@ export default class DrawResultUI extends BaseUI {
                 scr.node.active = true;
                 this.content.addChild(scr.node);
             }
+
         }
     }
+
+    onDestroy() {
+        DrawRecruitModel.Ins.drawResults = null;
+    }
 }

+ 1 - 0
tower_sanguo/assets/scripts/module/drawRecruit/DrawWishUI.ts

@@ -96,6 +96,7 @@ export default class DrawWishUI extends BaseUI {
             this.updateWishInfo(1, general);
             this.wishItemMap.get(DrawRecruitModel.Ins.cur_wish_id).updateSelectState(true);
         } else {
+            DrawRecruitModel.Ins.cur_wish_id_temp = -1;
             this.updateWishInfo(2, null);
         }
         this.updateBtnState();

+ 60 - 0
tower_sanguo/assets/scripts/module/drawRecruit/YBExchange.ts

@@ -0,0 +1,60 @@
+import BaseUI from "../../../MOKA/component/BaseUI";
+import { PLAYERPROP } from "../../data/GameDefinition";
+import GameController from "../../GameController";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class YBExchange extends BaseUI {
+
+    protected static prefabUrl = "module/drawRecruit/yBExchange";
+    protected static className = "YBExchange";
+
+
+    @property({ type: cc.Label, displayName: '文本_红包' })
+    txt_rb: cc.Label = null;
+    @property({ type: cc.Label, displayName: '文本_元宝' })
+    txt_yb: cc.Label = null;
+
+    @property({ type: cc.Label, displayName: '文本_已兑换次数' })
+    txt_times: cc.Label = null;
+
+    start() {
+        let rule = GameController.gameData.serverConfig_data.exchange;
+        let rules = rule.split(':')
+        this.txt_rb.string = rules[0];
+        this.txt_yb.string = rules[1];
+        this.updateInfo();
+    }
+
+    updateInfo(){
+        let limit = GameController.gameData.serverConfig_data.exchange_limit;
+        this.txt_times.string = (limit - GameController.gameData.player.getProp(PLAYERPROP.USER_EXCHANGE_TIMES)) + "/" + limit;
+    }
+
+    click_Exchange() {
+        console.log("UIN :" + GameController.commonData.uin);
+
+        let rule = GameController.gameData.serverConfig_data.exchange;
+        let rules = rule.split(':')
+        for (let i = 0; i < rules.length; i++) {
+            rules[i] = parseInt(rules[i]);
+        }
+        if (GameController.gameData.player.getProp(PLAYERPROP.REDBAG) >= rules[0]) {
+            GameController.http.redBagToYb((data) => {
+                console.log("--->YB: "+GameController.gameData.player.getProp(PLAYERPROP.YB));
+                console.log("--->Data RedBagToYb: ", data);
+                if (data.data.code == 1) {
+                    GameController.gameData.player.setProp(PLAYERPROP.REDBAG,data.data.data.RedBag);
+                    GameController.gameData.player.setProp(PLAYERPROP.YB,data.data.data.Yb);
+                    GameController.gameData.player.setProp(PLAYERPROP.USER_EXCHANGE_TIMES,data.data.data.UserExchangeTimes);
+                    this.updateInfo();
+                } else {
+                    GameController.uiM.showToast(data.data.msg);
+                }
+            });
+        } else {
+            GameController.uiM.showToast("红包币不足");
+        }
+    }
+}

+ 9 - 0
tower_sanguo/assets/scripts/module/drawRecruit/YBExchange.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "84296368-e7ea-4431-9bc3-8114fb6ff021",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 15 - 4
tower_sanguo/assets/scripts/net/HttpCommand.ts

@@ -48,7 +48,7 @@ export default class HttpCommand {
     connectTest(callback) {
         GameController.commonData.ranKey = Utils.randomString()
         let data = {
-            "mac": "c1:65:e2:1c:b0:25,f6:60:e4:1a:b7:27",
+            "mac": "c1:65:e2:1c:b0:24,f6:60:e4:1a:b7:27",
             "psk": GameController.commonData.ranKey,
             "appId": GameController.commonData.appid
         }
@@ -350,7 +350,7 @@ export default class HttpCommand {
     /** 移除许愿武将
      * @param callback 回调
     */
-     removePrayGeneral(callback, data) {
+    removePrayGeneral(callback, data) {
         this.sendData(HTTPTYPE.removePrayGeneral, data, callback);
     }
 
@@ -358,10 +358,18 @@ export default class HttpCommand {
      * @param callback 回调
      * @param data {type:1}  type=1 单抽 type=10 十连抽
     */
-     drawCard(callback, data) {
+    drawCard(callback, data) {
         this.sendData(HTTPTYPE.drawCard, data, callback);
     }
 
+    /** 红包币兑换元宝
+     * @param callback 回调
+     * @param data 传参
+    */
+    redBagToYb(callback) {
+        this.sendData(HTTPTYPE.redBagToYb, {}, callback);
+    }
+
 
     //--------------------------ZNH------------------------
 
@@ -474,13 +482,16 @@ export enum HTTPTYPE {
     reduceTimeInvestProject = 'invest/reduceTimeInvestProject',
 
     updateADLog = 'updateADLog',
-    // ZNH
+    //-------ZNH
     /** 武将许愿*/
     prayGeneral = 'general/prayGeneral',
     /** 移除许愿武将*/
     removePrayGeneral = 'general/removePrayGeneral',
     /** 抽卡*/
     drawCard = 'general/drawCard',
+    /** 红包币兑换元宝*/
+    redBagToYb = 'general/redBagToYb',
+    //-------ZNH
 
     updateKeyValueDemo = 'general/updateKeyValueDemo',
 }

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor