Quellcode durchsuchen

Merge branch 'TheHolyFarmer' of http://81.70.224.233:10080/yichael/FragrantTown into TheHolyFarmer

# Conflicts:
#	assets/Prefabs/UI/seed/HolyFarmlandFruit.prefab
#	assets/Script/UI/StoreView.js
#	settings/project.json
slambb vor 3 Jahren
Ursprung
Commit
fcf812f756
84 geänderte Dateien mit 3252 neuen und 2104 gelöschten Zeilen
  1. 162 565
      assets/Prefabs/UI/lease/SalePanel.prefab
  2. 355 208
      assets/Prefabs/UI/seed/HolyFarmlandFruit.prefab
  3. 662 170
      assets/Prefabs/UI/seed/HolyFarmlandSeed.prefab
  4. 237 98
      assets/Prefabs/UI/seed/HolyFarmlandSeedStore.prefab
  5. 434 410
      assets/Script/UI/BuildingView.js
  6. 67 67
      assets/Script/UI/Content_seed.js
  7. 568 469
      assets/Script/UI/StoreView.js
  8. BIN
      assets/UI/NBuilding/Store/ExchangeLogo.png
  9. 6 6
      assets/UI/NBuilding/Store/ExchangeLogo.png.meta
  10. BIN
      assets/UI/NBuilding/Store/ExchangeTitle.png
  11. 4 4
      assets/UI/NBuilding/Store/ExchangeTitle.png.meta
  12. BIN
      assets/UI/NBuilding/Store/ShopBlueLine.png
  13. 8 8
      assets/UI/NBuilding/Store/ShopBlueLine.png.meta
  14. BIN
      assets/UI/NBuilding/Store/ShopCaptionBox.png
  15. 34 0
      assets/UI/NBuilding/Store/ShopCaptionBox.png.meta
  16. BIN
      assets/UI/NBuilding/Store/ShopExchangeBtn.png
  17. 11 11
      assets/UI/NBuilding/Store/ShopExchangeBtn.png.meta
  18. BIN
      assets/UI/NBuilding/Store/ShopGrayBg.png
  19. 34 0
      assets/UI/NBuilding/Store/ShopGrayBg.png.meta
  20. BIN
      assets/UI/NBuilding/Store/ShopPicScroll.png
  21. 34 0
      assets/UI/NBuilding/Store/ShopPicScroll.png.meta
  22. BIN
      assets/UI/NBuilding/Store/ShopShed.png
  23. 34 0
      assets/UI/NBuilding/Store/ShopShed.png.meta
  24. BIN
      assets/UI/NBuilding/Store/ShopTop.png
  25. 34 0
      assets/UI/NBuilding/Store/ShopTop.png.meta
  26. BIN
      assets/UI/NBuilding/Store/ShopVines1.png
  27. 34 0
      assets/UI/NBuilding/Store/ShopVines1.png.meta
  28. BIN
      assets/UI/NBuilding/Store/StoreLineBg.png
  29. 34 0
      assets/UI/NBuilding/Store/StoreLineBg.png.meta
  30. BIN
      assets/UI/NBuilding/Store/StoreTitle.png
  31. 4 4
      assets/UI/NBuilding/Store/StoreTitle.png.meta
  32. BIN
      assets/UI/NBuilding/Store/btn_plant.png
  33. 34 0
      assets/UI/NBuilding/Store/btn_plant.png.meta
  34. BIN
      assets/UI/NBuilding/Store/buy_button.png
  35. 4 4
      assets/UI/NBuilding/Store/buy_button.png.meta
  36. BIN
      assets/UI/NBuilding/Store/equipment_button.jpg
  37. BIN
      assets/UI/NBuilding/Store/equipment_button.png
  38. 7 7
      assets/UI/NBuilding/Store/equipment_button.png.meta
  39. BIN
      assets/UI/NBuilding/Store/equipment_nbutton.jpg
  40. BIN
      assets/UI/NBuilding/Store/equipment_nbutton.png
  41. 34 0
      assets/UI/NBuilding/Store/equipment_nbutton.png.meta
  42. BIN
      assets/UI/NBuilding/Store/exchange_button.png
  43. 4 4
      assets/UI/NBuilding/Store/exchange_button.png.meta
  44. BIN
      assets/UI/NBuilding/Store/exchange_nbutton.png
  45. 8 8
      assets/UI/NBuilding/Store/exchange_nbutton.png.meta
  46. BIN
      assets/UI/NBuilding/Store/snbChangeCnt_btn.png
  47. BIN
      assets/UI/NBuilding/building_text_8.png
  48. 4 4
      assets/UI/NBuilding/building_text_8.png.meta
  49. BIN
      assets/UI/NBuilding/fruit_button.png
  50. 4 4
      assets/UI/NBuilding/fruit_button.png.meta
  51. BIN
      assets/UI/NBuilding/fruit_nbutton.png
  52. 4 4
      assets/UI/NBuilding/fruit_nbutton.png.meta
  53. BIN
      assets/UI/NBuilding/seed_button.png
  54. 4 4
      assets/UI/NBuilding/seed_button.png.meta
  55. BIN
      assets/UI/NBuilding/seed_nbutton.png
  56. 8 8
      assets/UI/NBuilding/seed_nbutton.png.meta
  57. BIN
      assets/UI/NBuilding/seedware_button.png
  58. 34 0
      assets/UI/NBuilding/seedware_button.png.meta
  59. BIN
      assets/UI/NBuilding/seedware_nbutton.png
  60. 34 0
      assets/UI/NBuilding/seedware_nbutton.png.meta
  61. 4 4
      assets/UI/NListInfo/ListGrayBox.png.meta
  62. BIN
      assets/UI/NPublic/BuySeedBG.png
  63. 12 12
      assets/UI/NPublic/BuySeedBG.png.meta
  64. BIN
      assets/UI/NPublic/BuySeedTop.png
  65. 34 0
      assets/UI/NPublic/BuySeedTop.png.meta
  66. BIN
      assets/UI/NPublic/CntBuyBtn.png
  67. 34 0
      assets/UI/NPublic/CntBuyBtn.png.meta
  68. 4 4
      assets/UI/NPublic/DiamondExchangeBg2.png.meta
  69. BIN
      assets/UI/NPublic/PopViewClose.png
  70. 34 0
      assets/UI/NPublic/PopViewClose.png.meta
  71. BIN
      assets/UI/NPublic/PopViewSeedBg.png
  72. 34 0
      assets/UI/NPublic/PopViewSeedBg.png.meta
  73. BIN
      assets/UI/NPublic/SnbBuyBtn.png
  74. 34 0
      assets/UI/NPublic/SnbBuyBtn.png.meta
  75. BIN
      assets/UI/NPublic/WarehouseLine.png
  76. 34 0
      assets/UI/NPublic/WarehouseLine.png.meta
  77. BIN
      assets/UI/NPublic/WarehouseRedLine.png
  78. 34 0
      assets/UI/NPublic/WarehouseRedLine.png.meta
  79. BIN
      assets/UI/NPublic/WarehouseTop.png
  80. 34 0
      assets/UI/NPublic/WarehouseTop.png.meta
  81. BIN
      assets/UI/NScene/Fruits/Sale.png
  82. 4 4
      assets/UI/NScene/Fruits/Sale.png.meta
  83. 13 13
      doc/dapp-host.js
  84. 4 0
      settings/project.json

Datei-Diff unterdrückt, da er zu groß ist
+ 162 - 565
assets/Prefabs/UI/lease/SalePanel.prefab


Datei-Diff unterdrückt, da er zu groß ist
+ 355 - 208
assets/Prefabs/UI/seed/HolyFarmlandFruit.prefab


Datei-Diff unterdrückt, da er zu groß ist
+ 662 - 170
assets/Prefabs/UI/seed/HolyFarmlandSeed.prefab


+ 237 - 98
assets/Prefabs/UI/seed/HolyFarmlandSeedStore.prefab

@@ -27,30 +27,33 @@
         "__id__": 8
       },
       {
-        "__id__": 14
+        "__id__": 11
       },
       {
-        "__id__": 20
+        "__id__": 18
+      },
+      {
+        "__id__": 24
       },
       {
-        "__id__": 31
+        "__id__": 35
       }
     ],
     "_active": true,
     "_level": 1,
     "_components": [
       {
-        "__id__": 39
+        "__id__": 43
       },
       {
-        "__id__": 40
+        "__id__": 45
       },
       {
-        "__id__": 42
+        "__id__": 47
       }
     ],
     "_prefab": {
-      "__id__": 43
+      "__id__": 48
     },
     "_opacity": 255,
     "_color": {
@@ -62,8 +65,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 173,
-      "height": 280
+      "width": 212,
+      "height": 290
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -72,8 +75,8 @@
     },
     "_position": {
       "__type__": "cc.Vec3",
-      "x": -203.5,
-      "y": -127.5,
+      "x": 0,
+      "y": 0,
       "z": 0
     },
     "_scale": {
@@ -122,8 +125,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 173,
-      "height": 215
+      "width": 212,
+      "height": 241
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -133,7 +136,7 @@
     "_position": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 23.034,
+      "y": -5.966,
       "z": 0
     },
     "_scale": {
@@ -170,10 +173,10 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "98c8ea12-e46b-44a1-ba81-d0b5028081e6"
+      "__uuid__": "e0646e8f-1413-4c46-a47c-c9c78a0656b7"
     },
-    "_type": 0,
-    "_sizeMode": 1,
+    "_type": 1,
+    "_sizeMode": 0,
     "_fillType": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
@@ -236,7 +239,7 @@
     "_position": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 45.034,
+      "y": 12,
       "z": 0
     },
     "_scale": {
@@ -300,6 +303,109 @@
     "fileId": "65KxOLcr5MuIonNQNpmieg",
     "sync": false
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "BuySeedTop",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 9
+      }
+    ],
+    "_prefab": {
+      "__id__": 10
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 170,
+      "height": 66
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 102,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 8
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "09cdfc6b-8a3d-4e7a-8d45-137038b52ee8"
+    },
+    "_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.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "c508b4fb-2698-49e5-a33b-8ee851a1e2c2"
+    },
+    "fileId": "97+ahqy3hD2KI6fvqUa0jm",
+    "sync": false
+  },
   {
     "__type__": "cc.Node",
     "_name": "Name",
@@ -309,31 +415,34 @@
     },
     "_children": [
       {
-        "__id__": 9
+        "__id__": 12
       }
     ],
     "_active": true,
     "_level": 3,
     "_components": [
       {
-        "__id__": 12
+        "__id__": 15
+      },
+      {
+        "__id__": 16
       }
     ],
     "_prefab": {
-      "__id__": 13
+      "__id__": 17
     },
     "_opacity": 255,
     "_color": {
       "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
+      "r": 255,
+      "g": 255,
+      "b": 255,
       "a": 255
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 44,
-      "height": 27.72
+      "width": 66,
+      "height": 43.06
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -342,8 +451,8 @@
     },
     "_position": {
       "__type__": "cc.Vec3",
-      "x": -0.203,
-      "y": -56.113,
+      "x": 0,
+      "y": 106.604,
       "z": 0
     },
     "_scale": {
@@ -369,18 +478,18 @@
     "_name": "Num",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 8
+      "__id__": 11
     },
     "_children": [],
     "_active": false,
     "_level": 4,
     "_components": [
       {
-        "__id__": 10
+        "__id__": 13
       }
     ],
     "_prefab": {
-      "__id__": 11
+      "__id__": 14
     },
     "_opacity": 255,
     "_color": {
@@ -429,7 +538,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 9
+      "__id__": 12
     },
     "_enabled": true,
     "_materials": [
@@ -470,7 +579,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 8
+      "__id__": 11
     },
     "_enabled": true,
     "_materials": [
@@ -481,8 +590,8 @@
     "_useOriginalSize": false,
     "_string": "种子",
     "_N$string": "种子",
-    "_fontSize": 22,
-    "_lineHeight": 22,
+    "_fontSize": 31,
+    "_lineHeight": 31,
     "_enableWrapText": true,
     "_N$file": null,
     "_isSystemFontUsed": true,
@@ -495,6 +604,24 @@
     "_N$cacheMode": 0,
     "_id": ""
   },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 11
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 122,
+      "g": 52,
+      "b": 11,
+      "a": 255
+    },
+    "_width": 2,
+    "_id": ""
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -514,21 +641,21 @@
       "__id__": 1
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_level": 3,
     "_components": [
       {
-        "__id__": 15
+        "__id__": 19
       },
       {
-        "__id__": 17
+        "__id__": 21
       },
       {
-        "__id__": 18
+        "__id__": 22
       }
     ],
     "_prefab": {
-      "__id__": 19
+      "__id__": 23
     },
     "_opacity": 255,
     "_color": {
@@ -540,8 +667,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 45,
-      "height": 44
+      "width": 150,
+      "height": 151
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -550,8 +677,8 @@
     },
     "_position": {
       "__type__": "cc.Vec3",
-      "x": 75,
-      "y": 125.034,
+      "x": -3,
+      "y": 13,
       "z": 0
     },
     "_scale": {
@@ -577,14 +704,14 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 14
+      "__id__": 18
     },
     "_enabled": true,
     "duration": 0.1,
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 16
+        "__id__": 20
       }
     ],
     "_N$interactable": true,
@@ -640,7 +767,7 @@
     "hoverSprite": null,
     "_N$disabledSprite": null,
     "_N$target": {
-      "__id__": 14
+      "__id__": 18
     },
     "_id": ""
   },
@@ -659,7 +786,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 14
+      "__id__": 18
     },
     "_enabled": true,
     "_materials": [
@@ -669,9 +796,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "e9998dd3-52a2-429a-b9f4-e4047c03bb33"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_sizeMode": 1,
     "_fillType": 0,
@@ -691,7 +816,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 14
+      "__id__": 18
     },
     "_enabled": true,
     "_id": ""
@@ -716,18 +841,18 @@
     },
     "_children": [
       {
-        "__id__": 21
+        "__id__": 25
       }
     ],
     "_active": true,
     "_level": 2,
     "_components": [
       {
-        "__id__": 28
+        "__id__": 32
       }
     ],
     "_prefab": {
-      "__id__": 30
+      "__id__": 34
     },
     "_opacity": 255,
     "_color": {
@@ -739,8 +864,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 118,
-      "height": 62
+      "width": 172,
+      "height": 67
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -750,13 +875,13 @@
     "_position": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -112.124,
+      "y": -113.124,
       "z": 0
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.7,
-      "y": 0.7,
+      "x": 1,
+      "y": 1,
       "z": 1
     },
     "_eulerAngles": {
@@ -776,25 +901,25 @@
     "_name": "Background",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 20
+      "__id__": 24
     },
     "_children": [
       {
-        "__id__": 22
+        "__id__": 26
       }
     ],
     "_active": true,
     "_level": 2,
     "_components": [
       {
-        "__id__": 25
+        "__id__": 29
       },
       {
-        "__id__": 26
+        "__id__": 30
       }
     ],
     "_prefab": {
-      "__id__": 27
+      "__id__": 31
     },
     "_opacity": 255,
     "_color": {
@@ -806,8 +931,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 118,
-      "height": 62
+      "width": 172,
+      "height": 67
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -843,18 +968,18 @@
     "_name": "Label",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 21
+      "__id__": 25
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_level": 3,
     "_components": [
       {
-        "__id__": 23
+        "__id__": 27
       }
     ],
     "_prefab": {
-      "__id__": 24
+      "__id__": 28
     },
     "_opacity": 255,
     "_color": {
@@ -903,7 +1028,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 22
+      "__id__": 26
     },
     "_enabled": true,
     "_materials": [
@@ -944,7 +1069,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 21
+      "__id__": 25
     },
     "_enabled": true,
     "_materials": [
@@ -976,7 +1101,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 21
+      "__id__": 25
     },
     "_enabled": true,
     "alignMode": 0,
@@ -1014,20 +1139,20 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 20
+      "__id__": 24
     },
     "_enabled": true,
     "duration": 0.1,
-    "zoomScale": 1.2,
+    "zoomScale": 0.8,
     "clickEvents": [
       {
-        "__id__": 29
+        "__id__": 33
       }
     ],
     "_N$interactable": true,
     "_N$enableAutoGrayEffect": false,
-    "_N$transition": 2,
-    "transition": 2,
+    "_N$transition": 3,
+    "transition": 3,
     "_N$normalColor": {
       "__type__": "cc.Color",
       "r": 230,
@@ -1089,7 +1214,7 @@
       "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
     },
     "_N$target": {
-      "__id__": 21
+      "__id__": 25
     },
     "_id": ""
   },
@@ -1123,21 +1248,21 @@
     },
     "_children": [
       {
-        "__id__": 32
+        "__id__": 36
       }
     ],
-    "_active": true,
+    "_active": false,
     "_level": 2,
     "_components": [
       {
-        "__id__": 36
+        "__id__": 40
       },
       {
-        "__id__": 37
+        "__id__": 41
       }
     ],
     "_prefab": {
-      "__id__": 38
+      "__id__": 42
     },
     "_opacity": 120,
     "_color": {
@@ -1160,7 +1285,7 @@
     "_position": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 0,
+      "y": -29,
       "z": 0
     },
     "_scale": {
@@ -1186,21 +1311,21 @@
     "_name": "SellOutlabel",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 31
+      "__id__": 35
     },
     "_children": [],
     "_active": true,
     "_level": 3,
     "_components": [
       {
-        "__id__": 33
+        "__id__": 37
       },
       {
-        "__id__": 34
+        "__id__": 38
       }
     ],
     "_prefab": {
-      "__id__": 35
+      "__id__": 39
     },
     "_opacity": 255,
     "_color": {
@@ -1249,7 +1374,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 32
+      "__id__": 36
     },
     "_enabled": true,
     "_materials": [
@@ -1279,7 +1404,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 32
+      "__id__": 36
     },
     "_enabled": true,
     "_color": {
@@ -1308,7 +1433,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 31
+      "__id__": 35
     },
     "_enabled": true,
     "_materials": [
@@ -1340,7 +1465,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 31
+      "__id__": 35
     },
     "_enabled": true,
     "_id": ""
@@ -1366,7 +1491,11 @@
     "_enabled": true,
     "duration": 0.1,
     "zoomScale": 1.2,
-    "clickEvents": [],
+    "clickEvents": [
+      {
+        "__id__": 44
+      }
+    ],
     "_N$interactable": true,
     "_N$enableAutoGrayEffect": false,
     "_N$transition": 3,
@@ -1436,6 +1565,16 @@
     },
     "_id": ""
   },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "ba198n/JUtJXqII6aiwPODz",
+    "handler": "onMallPressedInfo",
+    "customEventData": ""
+  },
   {
     "__type__": "ba198n/JUtJXqII6aiwPODz",
     "_name": "",
@@ -1456,14 +1595,14 @@
       "__id__": 6
     },
     "NumLabel": {
-      "__id__": 10
+      "__id__": 13
     },
     "NameLabel": {
-      "__id__": 12
+      "__id__": 15
     },
     "clickEvents": [
       {
-        "__id__": 41
+        "__id__": 46
       }
     ],
     "_id": ""

+ 434 - 410
assets/Script/UI/BuildingView.js

@@ -1,423 +1,447 @@
 cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        Env: {
-            default: null,
-            type: cc.Node,
-        },
-        Labour: {
-            default: null,
-            type: cc.Node,
-        },
-        Shop: {
-            default: null,
-            type: cc.Node,
-        },
-        SpeBuilding: {
-            default: null,
-            type: cc.Node,
-        },
-        Seed: {
-            default: null,
-            type: cc.Node,
-        },
-        Fruit: {
-            default: null,
-            type: cc.Node,
-        },
-        EvnBtn: {
-            default: null,
-            type: cc.Node,
-        },
-        LabourBtn: {
-            default: null,
-            type: cc.Node,
-        },
-        ShopBtn: {
-            default: null,
-            type: cc.Node,
-        },
-        SpeBuildingBtn: {
-            default: null,
-            type: cc.Node,
-        },
-        SeedBtn: {
-            default: null,
-            type: cc.Node,
-        },
-        FruitBtn: {
-            default: null,
-            type: cc.Node,
-        },
-
-        SelectedFrame: cc.Node,
-        Building00: cc.Node,
-        Building10: cc.Node,
-        Building20: cc.Node,
-        Building30: cc.Node,
-
-        Building40: cc.Node,
-        Building50: cc.Node,
-        ManageUI: cc.Node,
-
-
-        //四个按钮对应的sprite
-        Normal_Env_Sprite: cc.SpriteFrame,
-        Selecteded_Env_Sprite: cc.SpriteFrame,
-
-        Normal_Labour_Sprite: cc.SpriteFrame,
-        Selecteded_Labour_Sprite: cc.SpriteFrame,
-
-        Normal_Shop_Sprite: cc.SpriteFrame,
-        Selecteded_Shop_Sprite: cc.SpriteFrame,
-
-        Normal_Spe_Sprite: cc.SpriteFrame,
-        Selecteded_Spe_Sprite: cc.SpriteFrame,
-
-
-        Normal_Seed_Sprite: cc.SpriteFrame,
-        Selecteded_Seed_Sprite: cc.SpriteFrame,
-
-        Normal_Fruit_Sprite: cc.SpriteFrame,
-        Selecteded_Fruit_Sprite: cc.SpriteFrame,
-
-        //需要切换节点顺序的父节点
-        container: cc.Node,
-
-        //商城的列表
-        mySeedList: [],
-        myFruitList: [],
-        seedPrefab: cc.Prefab,
-        fruitPrefab: cc.Prefab,
-
-        seedSpriteFrame: {
-            default: [],
-            type: [cc.SpriteFrame]
-        },
-        seedIconSpriteFrame: {
-            default: [],
-            type: [cc.SpriteFrame]
-        },
-        fruitSpriteFrame: {
-            default: [],
-            type: [cc.SpriteFrame]
-        },
+  extends: cc.Component,
+
+  properties: {
+    Env: {
+      default: null,
+      type: cc.Node,
+    },
+    Labour: {
+      default: null,
+      type: cc.Node,
+    },
+    Shop: {
+      default: null,
+      type: cc.Node,
+    },
+    SpeBuilding: {
+      default: null,
+      type: cc.Node,
+    },
+    Seed: {
+      default: null,
+      type: cc.Node,
+    },
+    Fruit: {
+      default: null,
+      type: cc.Node,
+    },
+    EvnBtn: {
+      default: null,
+      type: cc.Node,
+    },
+    LabourBtn: {
+      default: null,
+      type: cc.Node,
     },
-    HiddenAll() {
-
-        if (this.Env.active)
-            this.Env.active = false;
-        if (this.Labour.active)
-            this.Labour.active = false;
-        if (this.Shop.active)
-            this.Shop.active = false;
-        if (this.SpeBuilding.active)
-            this.SpeBuilding.active = false;
-        if (this.Seed.active)
-            this.Seed.active = false;
-        if (this.Fruit.active)
-            this.Fruit.active = false;
+    ShopBtn: {
+      default: null,
+      type: cc.Node,
+    },
+    SpeBuildingBtn: {
+      default: null,
+      type: cc.Node,
+    },
+    SeedBtn: {
+      default: null,
+      type: cc.Node,
+    },
+    FruitBtn: {
+      default: null,
+      type: cc.Node,
     },
-    start() {
-        //默认设置第一个节点为 最上面
-        this.EvnBtn.setSiblingIndex(10);
 
-        this.onUpdateList();
+    SelectedFrame: cc.Node,
+    Building00: cc.Node,
+    Building10: cc.Node,
+    Building20: cc.Node,
+    Building30: cc.Node,
 
-    },
+    Building40: cc.Node,
+    Building50: cc.Node,
+    ManageUI: cc.Node,
 
-    onUpdateList() {
-        //先判断container下面是否存在Seed
-        // this.Seed.destroyAllChildren;
-        // console.log("this.Seed.children:", this.Seed.children);
-        //清除种子的预制
-        let _children = this.Seed.children;
-        for (let i = _children.length - 1; i > 0; i--) {
-            _children[i].destroy();
-        }
-        //清除仓库的预制
-        let _fruitChildren = this.Fruit.children;
-        for (let i = _fruitChildren.length - 1; i > 0; i--) {
-            _fruitChildren[i].destroy();
-        }
-        // console.log("this.Seed.children2:", this.Seed.children);
-
-        //获取种子和果实
-        GlobalD.GameData.getWarehouseSeedAndFruit((vaule) => {
-            this.mySeedList = vaule.data.seed;
-            this.myFruitList = vaule.data.fruit;
-
-            //console.log(this.mySeedList, this.myFruitList);
-            for (let i = 0; i < this.mySeedList.length; i++) {
-                //没有种子数量不显示 todo 看看后续需不需要处理删除
-                if (this.mySeedList[i].amount < 1) continue;
-
-                let _seed = cc.instantiate(this.seedPrefab);
-                _seed.parent = this.Seed;
-
-                //if (this.mySeedList[i].amount == 0)
-                //{
-                //    _seed.getChildByName("SellOut").active = 0;
-                //}
-
-                let _seedScript = _seed.getComponent("Content_Button");
-                _seedScript.Name = this.mySeedList[i].name;
-                _seedScript.Price = 0;
-                _seedScript.SNB = this.mySeedList[i].priceSnb;
-                _seedScript.Synopsis = "成熟期:" + this.mySeedList[i].maturity + "天," + this.mySeedList[i].seedDescribe;
-
-                //设置一个生成点
-                let _spawnScript = _seed.getComponent("Content_seed");
-                _spawnScript.SpawnPoint = cc.find("Canvas/SpawnParent/SpawnPoint");
-                _spawnScript.goodsSeedInfo = this.mySeedList[i];//这里传递一个生成的种子信息过去
-
-                _seedScript.NumLabel.string = this.mySeedList[i].amount;
-                _seedScript.NameLabel.string = this.mySeedList[i].name;
-                switch (this.mySeedList[i].picture) {
-                    case "Cabbage":
-                        _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[0];
-                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[0];
-                        
-                        _spawnScript.seedSpriteFrame = this.seedSpriteFrame[0];
-                        break;
-                    case "Potato":
-                        _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[1];
-                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[1];
-
-                        _spawnScript.seedSpriteFrame = this.seedSpriteFrame[1];
-                        break;
-                    case "Carrot":
-                        _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[2];
-                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[2];
-
-                        _spawnScript.seedSpriteFrame = this.seedSpriteFrame[2];
-                        break;
-                    case "Broccoli":
-                        _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[3];
-                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[3];
-
-                        _spawnScript.seedSpriteFrame = this.seedSpriteFrame[3];
-                        break;
-                    case "Tomato":
-                        _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[4];
-                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[4];
-
-                        _spawnScript.seedSpriteFrame = this.seedSpriteFrame[4];
-                        break;
-                    case "Squash":
-                        _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[5];
-                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[5];
-
-                        _spawnScript.seedSpriteFrame = this.seedSpriteFrame[5];
-                        break;
-                    case "Eggplant":
-                        _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[6];
-                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[6];
-
-                        _spawnScript.seedSpriteFrame = this.seedSpriteFrame[6];
-                        break;
-                    case "Pepper":
-                        _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[7];
-                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[7];
-
-                        _spawnScript.seedSpriteFrame = this.seedSpriteFrame[7];
-                        break;
-                    case "Lentil":
-                        _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[8];
-                        _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[8];
-
-                        _spawnScript.seedSpriteFrame = this.seedSpriteFrame[8];
-                        break;
-                    default:
-                        break;
-                }
-
-
-
-
-            }
-            for (let i = 0; i < this.myFruitList.length; i++) {
-                let _fruit = cc.instantiate(this.fruitPrefab);
-                _fruit.parent = this.Fruit;
-                _fruit.zIndex = 999;
-                let _fruitScript = _fruit.getComponent("Content_Button");
-                _fruitScript.NumLabel.string = Number(this.myFruitList[i].amount + this.myFruitList[i].amountPart).toFixed(3);
-                _fruitScript.NameLabel.string = this.myFruitList[i].name;
-                _fruitScript.Name = this.myFruitList[i].name;
-                _fruitScript.SNB = this.myFruitList[i].priceSnb;
-                _fruitScript.Synopsis = this.myFruitList[i].fruitDescribe;
-
-                //if (this.myFruitList[i].amount == 0)
-                //{
-                //    _fruit.getChildByName("SellOut").active = 0;
-                //}
-
-                //设置果实信息
-                let _contentFruit = _fruit.getComponent("Content_fruit");
-                _contentFruit.fruitInfo = this.myFruitList[i];
-
-                switch (this.myFruitList[i].picture) {
-                    case "Cabbage":
-                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[0];
-                        break;
-                    case "Potato":
-                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[1];
-                        break;
-                    case "Carrot":
-                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[2];
-                        break;
-                    case "Broccoli":
-                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[3];
-                        break;
-                    case "Tomato":
-                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[4];
-                        break;
-                    case "Squash":
-                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[5];
-                        break;
-                    case "Eggplant":
-                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[6];
-                        break;
-                    case "Pepper":
-                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[7];
-                        break;
-                    case "Lentil":
-                        _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[8];
-                        break;
-                    default:
-                        break;
-                }
-
-            }
-        });
-    },
+    //四个按钮对应的sprite
+    Normal_Env_Sprite: cc.SpriteFrame,
+    Selecteded_Env_Sprite: cc.SpriteFrame,
 
-    //切换建筑的面板
-    onSwitchBuildingContent(event, index) {
-
-        this.EvnBtn.setScale(1);
-        this.LabourBtn.setScale(1);
-        this.ShopBtn.setScale(1);
-        this.SpeBuildingBtn.setScale(1);
-        this.SeedBtn.setScale(1);
-        this.FruitBtn.setScale(1);
-
-        this.EvnBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Env_Sprite;
-        this.LabourBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Labour_Sprite;
-        this.ShopBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Shop_Sprite;
-        this.SpeBuildingBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Spe_Sprite;
-        this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Seed_Sprite;
-        this.FruitBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Fruit_Sprite;
-
-        this.EvnBtn.setContentSize(100, 54);
-        this.LabourBtn.setContentSize(100, 54);
-        this.ShopBtn.setContentSize(100, 54);
-        this.SpeBuildingBtn.setContentSize(100, 54);
-        this.SeedBtn.setContentSize(100, 54);
-        this.FruitBtn.setContentSize(100, 54);
-
-        this.EvnBtn.y = -5;
-        this.LabourBtn.y = -5;
-        this.ShopBtn.y = -5;
-        this.SpeBuildingBtn.y = -5;
-        this.SeedBtn.y = -5;
-        this.FruitBtn.y = -5;
-
-        this.HiddenAll();
-        //面板设置index
-        //环境
-        if ('0' == index) {
-            this.EvnBtn.y = -20;
-            this.EvnBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Env_Sprite;
-            this.Env.active = true;
-            // this.SelectedFrame.parent = this.Building00;
-            this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building00.getComponent('Content_Button').Name, this.Building00.getComponent('Content_Button').Price, this.Building00.getComponent('Content_Button').Synopsis);
-
-            //设置节点顺序
-            this.EvnBtn.setSiblingIndex(10);
-            this.EvnBtn.setContentSize(110, 100);
-        }
-        //劳动 
-        else if ('1' == index) {
-            this.LabourBtn.y = -20;
-            this.LabourBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Labour_Sprite;
-            this.Labour.active = true;
-            // this.SelectedFrame.parent = this.Building10;
-            this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building10.getComponent('Content_Button').Name, this.Building10.getComponent('Content_Button').Price, this.Building10.getComponent('Content_Button').Synopsis);
-
-            this.LabourBtn.setSiblingIndex(10);
-            // this.LabourBtn.setContentSize(86, 88);
-            this.LabourBtn.setContentSize(110, 100);
-        }
-        //商铺
-        else if ('2' == index) {
-            this.ShopBtn.y = -20;
-            this.ShopBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Shop_Sprite;
-            this.Shop.active = true;
-            // this.SelectedFrame.parent = this.Building20;
-            this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building20.getComponent('Content_Button').Name, this.Building20.getComponent('Content_Button').Price, this.Building20.getComponent('Content_Button').Synopsis);
+    Normal_Labour_Sprite: cc.SpriteFrame,
+    Selecteded_Labour_Sprite: cc.SpriteFrame,
 
-            this.ShopBtn.setSiblingIndex(10);
-            this.ShopBtn.setContentSize(110, 100);
+    Normal_Shop_Sprite: cc.SpriteFrame,
+    Selecteded_Shop_Sprite: cc.SpriteFrame,
 
-        }
-        //特殊
-        else if ('3' == index) {
-            this.SpeBuildingBtn.y = -20;
-            this.SpeBuildingBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Spe_Sprite;
-            this.SpeBuilding.active = true;
-            // this.SelectedFrame.parent = this.Building30;
-            this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building30.getComponent('Content_Button').Name, this.Building30.getComponent('Content_Button').Price, this.Building30.getComponent('Content_Button').Synopsis);
-
-            this.SpeBuildingBtn.setSiblingIndex(10);
-            this.SpeBuildingBtn.setContentSize(110, 100);
-        }
-        //种子
-        else if ('4' == index) {
-            this.SeedBtn.y = -20;
-            this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Seed_Sprite;
-            this.Seed.active = true;
-            // this.SelectedFrame.parent = this.Building40;
-
-            if (this.mySeedList.length > 0) {
-                let Synopsis = "成熟期:" + this.mySeedList[0].maturity + "天," + this.mySeedList[0].seedDescribe;
-                this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.mySeedList[0].name, 0, Synopsis);
-            }
-
-            this.SeedBtn.setSiblingIndex(10);
-            this.SeedBtn.setContentSize(110, 100);
-        }
-        //果实
-        else if ('5' == index) {
-            this.FruitBtn.y = -20;
-            this.FruitBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Fruit_Sprite;
-            this.Fruit.active = true;
-            // this.SelectedFrame.parent = this.Building50;
-
-            if (this.myFruitList.length > 0) {
-                let Synopsis = this.myFruitList[0].fruitDescribe;
-                // "出售价格:" + this.SNB + " SNB";
-                this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.myFruitList[0].name, "出售价格:" + this.myFruitList[0].priceSnb + " SNB", Synopsis);
-            }
-
-            this.FruitBtn.setSiblingIndex(10);
-            this.FruitBtn.setContentSize(110, 100);
-        }
+    Normal_Spe_Sprite: cc.SpriteFrame,
+    Selecteded_Spe_Sprite: cc.SpriteFrame,
 
+    Normal_Seed_Sprite: cc.SpriteFrame,
+    Selecteded_Seed_Sprite: cc.SpriteFrame,
 
-        //切换节点顺序
-        // this.switch();
-    },
+    Normal_Fruit_Sprite: cc.SpriteFrame,
+    Selecteded_Fruit_Sprite: cc.SpriteFrame,
 
-    switch: function () {
-        var children = this.container.children;
-        var length = children.length;
-        if (length > 1) {
-            var src = Math.floor(Math.random() * length);
-            var node = children[src];
-            var dst = src === length - 1 ? 0 : src + 1;
-            node.setSiblingIndex(dst);
-        }
+    //需要切换节点顺序的父节点
+    container: cc.Node,
+
+    //商城的列表
+    mySeedList: [],
+    myFruitList: [],
+    seedPrefab: cc.Prefab,
+    fruitPrefab: cc.Prefab,
+
+    seedSpriteFrame: {
+      default: [],
+      type: [cc.SpriteFrame],
+    },
+    seedIconSpriteFrame: {
+      default: [],
+      type: [cc.SpriteFrame],
     },
-});
+    fruitSpriteFrame: {
+      default: [],
+      type: [cc.SpriteFrame],
+    },
+  },
+  HiddenAll() {
+    if (this.Env.active) this.Env.active = false
+    if (this.Labour.active) this.Labour.active = false
+    if (this.Shop.active) this.Shop.active = false
+    if (this.SpeBuilding.active) this.SpeBuilding.active = false
+    if (this.Seed.active) this.Seed.active = false
+    if (this.Fruit.active) this.Fruit.active = false
+  },
+  start() {
+    //默认设置第一个节点为 最上面
+    this.EvnBtn.setSiblingIndex(10)
+
+    this.onUpdateList()
+  },
+
+  onUpdateList() {
+    //先判断container下面是否存在Seed
+    // this.Seed.destroyAllChildren;
+    // console.log("this.Seed.children:", this.Seed.children);
+    //清除种子的预制
+    let _children = this.Seed.children
+    for (let i = _children.length - 1; i > 0; i--) {
+      _children[i].destroy()
+    }
+    //清除仓库的预制
+    let _fruitChildren = this.Fruit.children
+    for (let i = _fruitChildren.length - 1; i > 0; i--) {
+      _fruitChildren[i].destroy()
+    }
+    // console.log("this.Seed.children2:", this.Seed.children);
+
+    //获取种子和果实
+    GlobalD.GameData.getWarehouseSeedAndFruit((vaule) => {
+      this.mySeedList = vaule.data.seed
+      this.myFruitList = vaule.data.fruit
+
+      //console.log(this.mySeedList, this.myFruitList);
+      for (let i = 0; i < this.mySeedList.length; i++) {
+        //没有种子数量不显示 todo 看看后续需不需要处理删除
+        if (this.mySeedList[i].amount < 1) continue
+
+        let _seed = cc.instantiate(this.seedPrefab)
+        _seed.parent = this.Seed
+
+        //if (this.mySeedList[i].amount == 0)
+        //{
+        //    _seed.getChildByName("SellOut").active = 0;
+        //}
+
+        let _seedScript = _seed.getComponent('Content_Button')
+        _seedScript.Name = this.mySeedList[i].name
+        _seedScript.Price = 0
+        _seedScript.SNB = this.mySeedList[i].priceSnb
+        _seedScript.Synopsis =
+          '成熟期:' +
+          this.mySeedList[i].maturity +
+          '天,' +
+          this.mySeedList[i].seedDescribe
+
+        //设置一个生成点
+        let _spawnScript = _seed.getComponent('Content_seed')
+        _spawnScript.SpawnPoint = cc.find('Canvas/SpawnParent/SpawnPoint')
+        _spawnScript.goodsSeedInfo = this.mySeedList[i] //这里传递一个生成的种子信息过去
+
+        _seedScript.NumLabel.string = this.mySeedList[i].amount
+        _seedScript.NameLabel.string = this.mySeedList[i].name
+        switch (this.mySeedList[i].picture) {
+          case 'Cabbage':
+            _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[0]
+            _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[0]
+
+            _spawnScript.seedSpriteFrame = this.seedSpriteFrame[0]
+            break
+          case 'Potato':
+            _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[1]
+            _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[1]
+
+            _spawnScript.seedSpriteFrame = this.seedSpriteFrame[1]
+            break
+          case 'Carrot':
+            _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[2]
+            _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[2]
+
+            _spawnScript.seedSpriteFrame = this.seedSpriteFrame[2]
+            break
+          case 'Broccoli':
+            _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[3]
+            _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[3]
+
+            _spawnScript.seedSpriteFrame = this.seedSpriteFrame[3]
+            break
+          case 'Tomato':
+            _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[4]
+            _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[4]
+
+            _spawnScript.seedSpriteFrame = this.seedSpriteFrame[4]
+            break
+          case 'Squash':
+            _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[5]
+            _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[5]
+
+            _spawnScript.seedSpriteFrame = this.seedSpriteFrame[5]
+            break
+          case 'Eggplant':
+            _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[6]
+            _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[6]
+
+            _spawnScript.seedSpriteFrame = this.seedSpriteFrame[6]
+            break
+          case 'Pepper':
+            _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[7]
+            _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[7]
+
+            _spawnScript.seedSpriteFrame = this.seedSpriteFrame[7]
+            break
+          case 'Lentil':
+            _seedScript.bgSprite.spriteFrame = this.seedIconSpriteFrame[8]
+            _spawnScript.fruitSpriteFrame = this.fruitSpriteFrame[8]
+
+            _spawnScript.seedSpriteFrame = this.seedSpriteFrame[8]
+            break
+          default:
+            break
+        }
+      }
+      for (let i = 0; i < this.myFruitList.length; i++) {
+        let _fruit = cc.instantiate(this.fruitPrefab)
+        _fruit.parent = this.Fruit
+        _fruit.zIndex = 999
+        let _fruitScript = _fruit.getComponent('Content_Button')
+        _fruitScript.NumLabel.string = Number(
+          this.myFruitList[i].amount + this.myFruitList[i].amountPart
+        ).toFixed(3)
+        _fruitScript.NameLabel.string = this.myFruitList[i].name
+        _fruitScript.Name = this.myFruitList[i].name
+        _fruitScript.SNB = this.myFruitList[i].priceSnb
+        _fruitScript.Synopsis = this.myFruitList[i].fruitDescribe
+
+        //if (this.myFruitList[i].amount == 0)
+        //{
+        //    _fruit.getChildByName("SellOut").active = 0;
+        //}
+
+        //设置果实信息
+        let _contentFruit = _fruit.getComponent('Content_fruit')
+        _contentFruit.fruitInfo = this.myFruitList[i]
+
+        switch (this.myFruitList[i].picture) {
+          case 'Cabbage':
+            _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[0]
+            break
+          case 'Potato':
+            _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[1]
+            break
+          case 'Carrot':
+            _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[2]
+            break
+          case 'Broccoli':
+            _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[3]
+            break
+          case 'Tomato':
+            _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[4]
+            break
+          case 'Squash':
+            _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[5]
+            break
+          case 'Eggplant':
+            _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[6]
+            break
+          case 'Pepper':
+            _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[7]
+            break
+          case 'Lentil':
+            _fruitScript.bgSprite.spriteFrame = this.fruitSpriteFrame[8]
+            break
+          default:
+            break
+        }
+      }
+    })
+  },
+
+  //切换建筑的面板
+  onSwitchBuildingContent(event, index) {
+    this.EvnBtn.setScale(1)
+    this.LabourBtn.setScale(1)
+    this.ShopBtn.setScale(1)
+    this.SpeBuildingBtn.setScale(1)
+    this.SeedBtn.setScale(1)
+    this.FruitBtn.setScale(1)
+
+    this.EvnBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Env_Sprite
+    this.LabourBtn.getComponent(cc.Sprite).spriteFrame =
+      this.Normal_Labour_Sprite
+    this.ShopBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Shop_Sprite
+    this.SpeBuildingBtn.getComponent(cc.Sprite).spriteFrame =
+      this.Normal_Spe_Sprite
+    this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Seed_Sprite
+    this.FruitBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Fruit_Sprite
+
+    this.EvnBtn.setContentSize(100, 54)
+    this.LabourBtn.setContentSize(100, 54)
+    this.ShopBtn.setContentSize(100, 54)
+    this.SpeBuildingBtn.setContentSize(100, 54)
+    // this.SeedBtn.setContentSize(100, 54);
+    // this.FruitBtn.setContentSize(100, 54);
+
+    this.EvnBtn.y = -5
+    this.LabourBtn.y = -5
+    this.ShopBtn.y = -5
+    this.SpeBuildingBtn.y = -5
+    // this.SeedBtn.y = -5
+    // this.FruitBtn.y = -5
+
+    this.HiddenAll()
+    //面板设置index
+    //环境
+    if ('0' == index) {
+      this.EvnBtn.y = -20
+      this.EvnBtn.getComponent(cc.Sprite).spriteFrame =
+        this.Selecteded_Env_Sprite
+      this.Env.active = true
+      // this.SelectedFrame.parent = this.Building00;
+      this.ManageUI.getComponent('ManageUI').onSetButtonInfo(
+        this.Building00.getComponent('Content_Button').Name,
+        this.Building00.getComponent('Content_Button').Price,
+        this.Building00.getComponent('Content_Button').Synopsis
+      )
+
+      //设置节点顺序
+      this.EvnBtn.setSiblingIndex(10)
+      this.EvnBtn.setContentSize(110, 100)
+    }
+    //劳动
+    else if ('1' == index) {
+      this.LabourBtn.y = -20
+      this.LabourBtn.getComponent(cc.Sprite).spriteFrame =
+        this.Selecteded_Labour_Sprite
+      this.Labour.active = true
+      // this.SelectedFrame.parent = this.Building10;
+      this.ManageUI.getComponent('ManageUI').onSetButtonInfo(
+        this.Building10.getComponent('Content_Button').Name,
+        this.Building10.getComponent('Content_Button').Price,
+        this.Building10.getComponent('Content_Button').Synopsis
+      )
+
+      this.LabourBtn.setSiblingIndex(10)
+      // this.LabourBtn.setContentSize(86, 88);
+      this.LabourBtn.setContentSize(110, 100)
+    }
+    //商铺
+    else if ('2' == index) {
+      this.ShopBtn.y = -20
+      this.ShopBtn.getComponent(cc.Sprite).spriteFrame =
+        this.Selecteded_Shop_Sprite
+      this.Shop.active = true
+      // this.SelectedFrame.parent = this.Building20;
+      this.ManageUI.getComponent('ManageUI').onSetButtonInfo(
+        this.Building20.getComponent('Content_Button').Name,
+        this.Building20.getComponent('Content_Button').Price,
+        this.Building20.getComponent('Content_Button').Synopsis
+      )
+
+      this.ShopBtn.setSiblingIndex(10)
+      this.ShopBtn.setContentSize(110, 100)
+    }
+    //特殊
+    else if ('3' == index) {
+      this.SpeBuildingBtn.y = -20
+      this.SpeBuildingBtn.getComponent(cc.Sprite).spriteFrame =
+        this.Selecteded_Spe_Sprite
+      this.SpeBuilding.active = true
+      // this.SelectedFrame.parent = this.Building30;
+      this.ManageUI.getComponent('ManageUI').onSetButtonInfo(
+        this.Building30.getComponent('Content_Button').Name,
+        this.Building30.getComponent('Content_Button').Price,
+        this.Building30.getComponent('Content_Button').Synopsis
+      )
+
+      this.SpeBuildingBtn.setSiblingIndex(10)
+      this.SpeBuildingBtn.setContentSize(110, 100)
+    }
+    //种子
+    else if ('4' == index) {
+      //   this.SeedBtn.y = -20
+      this.SeedBtn.getComponent(cc.Sprite).spriteFrame =
+        this.Selecteded_Seed_Sprite
+      this.Seed.active = true
+      // this.SelectedFrame.parent = this.Building40;
+
+      if (this.mySeedList.length > 0) {
+        let Synopsis =
+          '成熟期:' +
+          this.mySeedList[0].maturity +
+          '天,' +
+          this.mySeedList[0].seedDescribe
+        this.ManageUI.getComponent('ManageUI').onSetButtonInfo(
+          this.mySeedList[0].name,
+          0,
+          Synopsis
+        )
+      }
+
+      this.SeedBtn.setSiblingIndex(10)
+      //   this.SeedBtn.setContentSize(110, 100)
+    }
+    //果实
+    else if ('5' == index) {
+      //   this.FruitBtn.y = -20
+      this.FruitBtn.getComponent(cc.Sprite).spriteFrame =
+        this.Selecteded_Fruit_Sprite
+      this.Fruit.active = true
+      // this.SelectedFrame.parent = this.Building50;
+
+      if (this.myFruitList.length > 0) {
+        let Synopsis = this.myFruitList[0].fruitDescribe
+        // "出售价格:" + this.SNB + " SNB";
+        this.ManageUI.getComponent('ManageUI').onSetButtonInfo(
+          this.myFruitList[0].name,
+          '出售价格:' + this.myFruitList[0].priceSnb + ' SNB',
+          Synopsis
+        )
+      }
+
+      this.FruitBtn.setSiblingIndex(10)
+      //   this.FruitBtn.setContentSize(110, 100)
+    }
+
+    //切换节点顺序
+    // this.switch();
+  },
+
+  switch: function () {
+    var children = this.container.children
+    var length = children.length
+    if (length > 1) {
+      var src = Math.floor(Math.random() * length)
+      var node = children[src]
+      var dst = src === length - 1 ? 0 : src + 1
+      node.setSiblingIndex(dst)
+    }
+  },
+})

+ 67 - 67
assets/Script/UI/Content_seed.js

@@ -1,74 +1,74 @@
-var reGameStates = require('GameStates');
+var reGameStates = require('GameStates')
 
 cc.Class({
-    extends: cc.Component,
+  extends: cc.Component,
 
-    properties: {
-        Name: {
-            default: '种子',
-            tooltip: '种子名字,这里和Content_button差不多。主要用于种子',
-        },
-        SeedPrefab: {
-            default: null,
-            type: cc.Prefab,
-        },
-        SpawnPoint: {
-            default: null,
-            type: cc.Node,
-        },
-        seedType: {
-            default: reGameStates.SeedType.Normal,
-            type: cc.Enum(reGameStates.SeedType),
-            serializable: true,
-        },
-        goodsSeedInfo:{
-            default: null,
-            tooltip: '设定一个背包种子信息',
-        },
-        seedSpriteFrame:{
-            default:null,
-            type:cc.SpriteFrame,
-            tooltip:"当前生出工具的提示"
-        },
-        fruitSpriteFrame:{
-            default:null,
-            type:cc.SpriteFrame,
-            tooltip:"当前生出工具的提示"
-        },
-        myIndex:-1
+  properties: {
+    Name: {
+      default: '种子',
+      tooltip: '种子名字,这里和Content_button差不多。主要用于种子',
     },
-   start()
-   {
-       this.StoreViewScp = this.node.parent.parent.parent.parent.parent.getComponent("StoreView");
-      // console.log('11111111111=',this.StoreViewScp);
-   },
-    onCreateSeed() {
-        let seedTemp = cc.instantiate(this.SeedPrefab);
-        // console.log(seedTemp);
-        //获取对应的信息,设置不同的种子
-        let _ManageSeedNode = seedTemp.getComponent("ManageSeedNode");
-        _ManageSeedNode.seedName = this.Name;
-        _ManageSeedNode.seedType = this.seedType;
-        _ManageSeedNode.goodsSeedInfo = this.goodsSeedInfo;
-        _ManageSeedNode.seedSprite.spriteFrame = this.seedSpriteFrame;
-        _ManageSeedNode.fruitSpriteFrame = this.fruitSpriteFrame;
+    SeedPrefab: {
+      default: null,
+      type: cc.Prefab,
+    },
+    SpawnPoint: {
+      default: null,
+      type: cc.Node,
+    },
+    seedType: {
+      default: reGameStates.SeedType.Normal,
+      type: cc.Enum(reGameStates.SeedType),
+      serializable: true,
+    },
+    goodsSeedInfo: {
+      default: null,
+      tooltip: '设定一个背包种子信息',
+    },
+    seedSpriteFrame: {
+      default: null,
+      type: cc.SpriteFrame,
+      tooltip: '当前生出工具的提示',
+    },
+    fruitSpriteFrame: {
+      default: null,
+      type: cc.SpriteFrame,
+      tooltip: '当前生出工具的提示',
+    },
+    myIndex: -1,
+  },
+  start() {
+    this.StoreViewScp =
+      this.node.parent.parent.parent.parent.parent.getComponent('StoreView')
+    // console.log('11111111111=',this.StoreViewScp);
+  },
+  onCreateSeed() {
+    let seedTemp = cc.instantiate(this.SeedPrefab)
+    // console.log(seedTemp);
+    //获取对应的信息,设置不同的种子
+    let _ManageSeedNode = seedTemp.getComponent('ManageSeedNode')
+    _ManageSeedNode.seedName = this.Name
+    _ManageSeedNode.seedType = this.seedType
+    _ManageSeedNode.goodsSeedInfo = this.goodsSeedInfo
+    _ManageSeedNode.seedSprite.spriteFrame = this.seedSpriteFrame
+    _ManageSeedNode.fruitSpriteFrame = this.fruitSpriteFrame
 
-        _ManageSeedNode.upTarget = this.node;
+    _ManageSeedNode.upTarget = this.node
 
-        let tempPos = this.SpawnPoint.convertToNodeSpace(GlobalD.game.MainCamera.node);
-        let CanvasPos = GlobalD.game.Canvas.position;
+    let tempPos = this.SpawnPoint.convertToNodeSpace(
+      GlobalD.game.MainCamera.node
+    )
+    let CanvasPos = GlobalD.game.Canvas.position
 
-        seedTemp.setPosition(tempPos.x + CanvasPos.x, tempPos.y + CanvasPos.y);
-        seedTemp.parent = this.SpawnPoint;
-        //收起菜单
-        GlobalD.game._ManageUIScript.onButtonEvent_Building_Close();
-    },
-    onPayCNTPopView()
-    {
-        this.StoreViewScp.onPayCNTPopView(this.myIndex);
-    },
-    onPaySNBPopView()
-    {
-        this.StoreViewScp.onPaySNBPopView(this.myIndex);
-    }
-});
+    seedTemp.setPosition(tempPos.x + CanvasPos.x, tempPos.y + CanvasPos.y)
+    seedTemp.parent = this.SpawnPoint
+    //收起菜单
+    GlobalD.game._ManageUIScript.onButtonEvent_Building_Close()
+  },
+  onPayCNTPopView() {
+    this.StoreViewScp.onPayCNTPopView(this.myIndex)
+  },
+  onPaySNBPopView() {
+    this.StoreViewScp.onPaySNBPopView(this.myIndex)
+  },
+})

+ 568 - 469
assets/Script/UI/StoreView.js

@@ -1,271 +1,24 @@
 cc.Class({
-    extends: cc.Component,
-
-    properties: {
-
-        Seed: {
-            default: null,
-            type: cc.Node,
-        },
-        Exchange: {
-            default: null,
-            type: cc.Node,
-        },
-        SeedBtn: {
-            default: null,
-            type: cc.Node,
-        },
-        ExchangeBtn: {
-            default: null,
-            type: cc.Node,
-        },
-
-        SelectedFrame: cc.Node,
-
-        //Building40: cc.Node,
-        ManageUI: cc.Node,
-        //四个按钮对应的sprite
-        Normal_Seed_Sprite: cc.SpriteFrame,
-        Selecteded_Seed_Sprite: cc.SpriteFrame,
-
-        Normal_Exchange_Sprite: cc.SpriteFrame,
-        Selecteded_Exchange_Sprite: cc.SpriteFrame,
-
-        //需要切换节点顺序的父节点
-        container: cc.Node,
-
-        //商城的列表
-        mySeedList: [],
-
-
-        seedPrefab: cc.Prefab,
-
-        seedSpriteFrame: {
-            default: [],
-            type: [cc.SpriteFrame]
-        },
-
-        //商城的图标列表
-        mySeedIconList:{
-            default: [],
-            type: [cc.SpriteFrame]
-        },
-
-        seedNodeArry: {
-            default: [],
-            type: [cc.Node],
-            serializable: false,
-            visible:false
-        },
-        snbAmount: 0,
-        cntAmount: 0,
-        ExchangePopView: {
-            default: null,
-            type: cc.Node,
-        },
-        PayCNTPopView: {
-            default: null,
-            type: cc.Node,
-        },
-        PaySNBPopView: {
-            default: null,
-            type: cc.Node,
-        },
-        buySeedIndex: -1,
-
-        snbAmountLabel: {
-            default: [],
-            type: [cc.Label]
-        },
-        //拿到仓库列表的节点
-        buildingView: {
-            default: null,
-            type: cc.Node,
-        },
-        myWareHouseSeedList: null,
-        //轮询种子列表状态
-        AutoGetSeedsData: null,
-
-        bottomLabel: {
-            default: null,
-            type: cc.Node,
-        },
-        seedBottomLabel: {
-            default: null,
-            type: cc.Node,
-        },
-
-        scrollViewNode: {
-            default: null,
-            type: cc.Node,
-        },
-
-        //购买种类数值
-        toggleInputValue: {
-            default: '1',
-            visible: false
-        },
-        PayCNTPopViewNameLabel: {
-            default: null,
-            type: cc.Label,
-        },
-        PayCNTPopViewPriceLabel: {
-            default: null,
-            type: cc.Label,
-        },
-        PayCNTPopViewMutureDurLabel: {
-            default: null,
-            type: cc.Label,
-        },
-
-        isPlaying: false,
-    },
-    HiddenAll() {
-        if (this.Seed.active)
-            this.Seed.active = false;
-        if (this.Exchange.active)
-            this.Exchange.active = false;
+  extends: cc.Component,
+
+  properties: {
+    Seed: {
+      default: null,
+      type: cc.Node,
     },
-    start() {
-        //获取到仓库列表的脚本
-        this.buildingViewScript = this.buildingView.getComponent("BuildingView");
-        //默认设置第一个节点为 最上面
-        this.SeedBtn.setSiblingIndex(10);
-        // console.log('SNB=======', GlobalD.GameData.SNB)
-        this.snbAmountLabel.string = GlobalD.GameData.SNB;
-        //这里也初始化获取一个数据
-        GlobalD.GameData.getWarehouseSeedAndFruit((vaule) => {
-            this.myWareHouseSeedList = vaule.data.seed;
-        });
-        //获取种子和果实
-        GlobalD.GameData.getMallSeed((vaule) => {
-            this.mySeedList = vaule.data;
-            // console.log('this.mySeedList[i]=', this.mySeedList);
-            for (let i = 0; i < this.mySeedList.length; i++) {
-                //没有种子数量不显示 todo 看看后续需不需要处理删除
-                //if (this.mySeedList[i].amount < 1) continue;
-                let _seed = cc.instantiate(this.seedPrefab);
-                //if (this.mySeedList[i].amount < 1)
-                if (this.mySeedList[i].amount < 1) {
-                    //_seed.getChildByName("SellOut").active = true;
-                }
-                else {
-                    _seed.getChildByName("SellOut").active = false;
-                }
-                // _seed.getChildByName("buy_button").active = true;
-                // _seed.getChildByName("Name").active = false;
-                // _seed.getChildByName("Name").getChildByName("Num").getComponent(cc.Label).strng = '';//'x'+this.mySeedList[i].amount;
-
-                this.seedNodeArry.push(_seed);
-                _seed.parent = this.Seed;
-                let _seedScript = _seed.getComponent("Content_Button");
-                _seedScript.Name = this.mySeedList[i].name;
-                _seedScript.Price = '';
-                _seedScript.CNT = this.mySeedList[i].priceCnt;
-                _seedScript.SNB = this.mySeedList[i].priceSnb;
-                _seedScript.Mature = this.mySeedList[i].maturity + "天";
-                _seedScript.Synopsis = this.mySeedList[i].seedDescribe;
-
-                //设置一个生成点
-                let _spawnScript = _seed.getComponent("Content_seed");
-                _spawnScript.myIndex = i;
-                _spawnScript.SpawnPoint = cc.find("Canvas/SpawnParent/SpawnPoint");
-                _seedScript.NumLabel.string = this.mySeedList[i].amount;
-                _seedScript.NameLabel.string = this.mySeedList[i].name;
-                switch (this.mySeedList[i].picture) {
-                    case "Cabbage":
-                        _seedScript.bgSprite.spriteFrame =  this.mySeedIconList[0];//this.seedSpriteFrame[0];
-                        break;
-                    case "Potato":
-                        _seedScript.bgSprite.spriteFrame = this.mySeedIconList[1];//this.seedSpriteFrame[1];
-                        break;
-                    case "Carrot":
-                        _seedScript.bgSprite.spriteFrame = this.mySeedIconList[2];//this.seedSpriteFrame[2];
-                        break;
-                    case "Broccoli":
-                        _seedScript.bgSprite.spriteFrame = this.mySeedIconList[3];//this.seedSpriteFrame[3];
-                        break;
-                    case "Tomato":
-                        _seedScript.bgSprite.spriteFrame = this.mySeedIconList[4];//this.seedSpriteFrame[4];
-                        break;
-                    case "Squash":
-                        _seedScript.bgSprite.spriteFrame = this.mySeedIconList[5];//this.seedSpriteFrame[5];
-                        break;
-                    case "Eggplant":
-                        _seedScript.bgSprite.spriteFrame = this.mySeedIconList[6];//this.seedSpriteFrame[6];
-                        break;
-                    case "Pepper":
-                        _seedScript.bgSprite.spriteFrame = this.mySeedIconList[7];//this.seedSpriteFrame[7];
-                        break;
-                    case "Lentil":
-                        _seedScript.bgSprite.spriteFrame = this.mySeedIconList[8];//this.seedSpriteFrame[8];
-                        break;
-                    default:
-                        break;
-                }
-            }
-        });
+    Exchange: {
+      default: null,
+      type: cc.Node,
     },
-    //切换建筑的面板
-    onSwitchBuildingContent(event, index) {
-
-        this.SeedBtn.setScale(1);
-        this.ExchangeBtn.setScale(1);
-
-        this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Seed_Sprite;
-        this.ExchangeBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Exchange_Sprite;
-
-        this.SeedBtn.setContentSize(100, 54);
-        this.ExchangeBtn.setContentSize(100, 54);
-
-        this.SeedBtn.y = -5;
-        this.ExchangeBtn.y = -5;
-
-        this.HiddenAll();
-        //面板设置index
-
-        //种子
-        if ('0' == index) {
-            this.SeedBtn.y = -20;
-            this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Seed_Sprite;
-            this.Seed.active = true;
-            if (this.seedNodeArry.length != 0) {
-                this.SelectedFrame.parent = this.seedNodeArry[0];
-            }
-            this.SeedBtn.zIndex = 10;
-            this.SeedBtn.setContentSize(110, 100);
-            this.ExchangeBtn.zIndex = 1;
-            // this.ExchangeBtn.setContentSize(86, 88);
-            this.bottomLabel.active = false;
-            this.scrollViewNode.active = true;
-            this.seedBottomLabel.active = true;
-        }
-        //兑换
-        else if ('1' == index) {
-            this.ExchangeBtn.y = -20;
-            this.ExchangeBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Exchange_Sprite;
-            this.Exchange.active = true;
-
-            this.ExchangeBtn.zIndex = 10;
-            this.ExchangeBtn.setContentSize(110, 100);
-            this.SeedBtn.zIndex = 1;
-            // this.SeedBtn.setContentSize(86, 88);
-
-            this.bottomLabel.active = true;
-            this.scrollViewNode.active = false;
-            this.seedBottomLabel.active = false;
-        }
+    SeedBtn: {
+      default: null,
+      type: cc.Node,
     },
-    switch: function () {
-        var children = this.container.children;
-        var length = children.length;
-        if (length > 1) {
-            var src = Math.floor(Math.random() * length);
-            var node = children[src];
-            var dst = src === length - 1 ? 0 : src + 1;
-            node.setSiblingIndex(dst);
-        }
+    ExchangeBtn: {
+      default: null,
+      type: cc.Node,
     },
+<<<<<<< HEAD
     OpentSNBExchangeToCNT() {
         GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "转换CNT通道关闭!", 1);
         return;
@@ -277,231 +30,577 @@ cc.Class({
         //更新数据
         this.snbAmountLabel.string = GlobalD.GameData.SNB;
         this.ExchangePopView.active = true;
+=======
+    EquipmentBtn: {
+      default: null,
+      type: cc.Node,
+>>>>>>> cba7e039f9979c7af0832b36f193289324b80096
     },
-    SNBExchangeToCNT() {
-        //限制相关人员交易
-        if (1 === GlobalD.UserInfo.limitTran) {
-            GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "转换CNT通道关闭,请联系相关管理人员!", 1);
-            return;
-        }
-        if (0 === Number(this.snbAmount) || 0 != Number(this.snbAmount) % 5) {
-            GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "请输入5的倍数兑换!", 1);
-            return;
-        }
-        console.log("发起兑换:" + Number(this.snbAmount));
-        GlobalD.GameData.onSnbToCnt(Number(this.snbAmount), (data) => {
-            //更新数据
-            this.snbAmountLabel.string = GlobalD.GameData.SNB;
-            this.ExchangePopView.active = false;
-            console.log('data=', data)
-            // console.log('res=', res)
-        });
+
+    SelectedFrame: cc.Node,
+
+    //Building40: cc.Node,
+    ManageUI: cc.Node,
+    //四个按钮对应的sprite
+    Normal_Seed_Sprite: cc.SpriteFrame,
+    Selecteded_Seed_Sprite: cc.SpriteFrame,
+
+    Normal_Exchange_Sprite: cc.SpriteFrame,
+    Selecteded_Exchange_Sprite: cc.SpriteFrame,
+
+    //需要切换节点顺序的父节点
+    container: cc.Node,
+
+    //商城的列表
+    mySeedList: [],
+
+    seedPrefab: cc.Prefab,
+
+    seedSpriteFrame: {
+      default: [],
+      type: [cc.SpriteFrame],
     },
-    onPayCNTPopView(myIndex) {
-        this.buySeedIndex = myIndex;
-        this.PayCNTPopView.active = true;
-        // console.log('this.mySeedList[this.buySeedIndex] =',this.mySeedList[this.buySeedIndex])
-        // this.PayCNTPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("NameLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].name;
-        // this.PayCNTPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("PriceLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].priceCnt + ' CNT';
-        // this.PayCNTPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("MutureDurLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].maturity;
-        this._updatePrice();
-        // this.PayCNTPopViewNameLabel.string = this.mySeedList[this.buySeedIndex].name;
-        // this.PayCNTPopViewPriceLabel.string = this.mySeedList[this.buySeedIndex].priceCnt + ' CNT';
-        // this.PayCNTPopViewMutureDurLabel.string = this.mySeedList[this.buySeedIndex].maturity;
 
+    //商城的图标列表
+    mySeedIconList: {
+      default: [],
+      type: [cc.SpriteFrame],
     },
-    onPaySNBPopView(myIndex) {
-        this.buySeedIndex = myIndex;
-        this.PaySNBPopView.active = true;
-        // console.log('this.mySeedList[this.buySeedIndex] =',this.mySeedList[this.buySeedIndex])
-        this.PaySNBPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("NameLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].name;
-        this.PaySNBPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("PriceLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].priceCnt + ' SNB';
-        this.PaySNBPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("MutureDurLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].maturity;
 
+    seedNodeArry: {
+      default: [],
+      type: [cc.Node],
+      serializable: false,
+      visible: false,
+    },
+    snbAmount: 0,
+    cntAmount: 0,
+    ExchangePopView: {
+      default: null,
+      type: cc.Node,
     },
-    PayCNT() {
-        console.log('this.cntAmount=', this.cntAmount)
-        console.log('this.cntAmount price=', this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceCnt))
+    PayCNTPopView: {
+      default: null,
+      type: cc.Node,
+    },
+    PaySNBPopView: {
+      default: null,
+      type: cc.Node,
+    },
+    buySeedIndex: -1,
 
-        //购买种子也要使用轮询
+    snbAmountLabel: {
+      default: [],
+      type: [cc.Label],
+    },
+    //拿到仓库列表的节点
+    buildingView: {
+      default: null,
+      type: cc.Node,
+    },
+    myWareHouseSeedList: null,
+    //轮询种子列表状态
+    AutoGetSeedsData: null,
 
-        let currentAmount = 0;
+    bottomLabel: {
+      default: null,
+      type: cc.Node,
+    },
+    seedsView: {
+      default: null,
+      type: cc.Node,
+    },
+    // ExchangeView: {
+    //   default: null,
+    //   type: cc.Node,
+    // },
+    seedBottomLabel: {
+      default: null,
+      type: cc.Node,
+    },
 
-        for (let i = 0; i < this.myWareHouseSeedList.length; i++) {
-            if (this.myWareHouseSeedList[i].id == this.mySeedList[this.buySeedIndex].id) {
-                currentAmount = this.myWareHouseSeedList[i].amount;
-            }
-        }
-        //当前背包的数量
-        console.log("currentAmount:", {
-            seedId: this.mySeedList[this.buySeedIndex].id,
-            currentAmount: currentAmount //把当前背包的数据传进去
-        });
-        let playAmount = this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceCnt);
-        if (0 === playAmount) {
-            GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "请输入购买数量", 1);
-            return;
-        }
-        // if (this.isPlaying) {
-        //     GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "购买过快!", 1);
-        //     return;
-        // }
-        // this.isPlaying = true;
-        // GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "区块确认中,请耐心等待!", 120);
-        GlobalD.GameData.payCNT(playAmount, 4, this.mySeedList[this.buySeedIndex].id + "", (data) => {
-            const [err, tx] = data;
-            // this.isPlaying = false;
-            if (err === null) {
-                // TODO 成功, 支付为链上操作,需要提供回调接口给这边服务端确认交易成功后修改购买订单结果
-                console.log(tx) // 交易hash,唯一标识符
-                //todo 种子
-                if (this.AutoGetSeedsData) {
-                    this.unschedule(this.AutoGetSeedsData);
-                    this.AutoGetSeedsData = null;
-                }
-                this.AutoGetSeedsData = () => {
-                    // getSeedCount ++;
-                    GlobalD.GameData.onGetSeedState(
-                        {
-                            seedId: this.mySeedList[this.buySeedIndex].id,
-                            currentAmount: currentAmount //把当前背包的数据传进去
-                        },
-                        (value) => {
-                            console.log("轮询种子:" + JSON.stringify(value));
-                            if (0 === value.code) {
-                                this.unschedule(this.AutoGetSeedsData);
-                                console.log("轮询种子购买成功");
-                                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "种子购买成功!", 1);
-
-                                // this.PayCNTPopView.active = false;
-
-                                //直接重新初始化一下列表,
-                                this.buildingViewScript.onUpdateList();
-                            }
-                        });
-                };
-                this.schedule(this.AutoGetSeedsData, 5);
-            } else {
-                console.log(err)
-                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), err, 2);
-            }
-
-        });
+    scrollViewNode: {
+      default: null,
+      type: cc.Node,
     },
-    PaySNB() {
-        console.log('this.snbAmount=', this.cntAmount)
-        console.log('priceSnb price=', this.mySeedList[this.buySeedIndex].priceSnb)
-        console.log('this.snbAmount price=', this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceSnb))
-        console.log("支付价格:" + this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceSnb));
-        let playAmount = this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceSnb);
-        if (0 === playAmount) {
-            GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "请输入购买数量", 1);
-            return;
-        }
 
-        if (this.isPlaying) {
-            GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "购买过快!", 1);
-            return;
-        }
-        GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "支付处理中...", 10);
-
-        this.isPlaying = true;
-        GlobalD.GameData.onBuySeedsWithSNB(playAmount, this.mySeedList[this.buySeedIndex].id, (flag, value) => {
-            // console.log("SNB购买后", value);
-            this.isPlaying = false;
-            if (flag && 0 === value.code) {
-                //todo 种子
-                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "种子购买成功!", 1);
-                // this.PayCNTPopView.active = false;
-
-                //重新获取一下snb,会自动更新到面板
-                GlobalD.GameData.onGetUserSnb();
-
-                //直接重新初始化一下列表,
-                this.buildingViewScript.onUpdateList();
-
-                //更新日志数据
-                cc.find("GameNode/ManageDapp").getComponent("ManageDapp").onUpdateSnbList();
-            } else {
-                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 2);
-            }
-        });
+    //购买种类数值
+    toggleInputValue: {
+      default: '1',
+      visible: false,
     },
-    onTextChanged1: function (text, editbox, customEventData) {
-        // 这里的 text 表示 修改完后的 EditBox 的文本内容
-        // 这里 editbox 是一个 cc.EditBox 对象
-        // 这里的 customEventData 参数就等于你之前设置的 "foobar"
-        this.cntAmount = parseInt(text);
+    PayCNTPopViewNameLabel: {
+      default: null,
+      type: cc.Label,
     },
-    // 假设这个回调是给 textChanged 事件的
-    onTextChanged2: function (text, editbox, customEventData) {
-        // 这里的 text 表示 修改完后的 EditBox 的文本内容
-        // 这里 editbox 是一个 cc.EditBox 对象
-        // 这里的 customEventData 参数就等于你之前设置的 "foobar"
-        // this.snbAmount = parseInt(text);
-        var numberTemp = new RegExp("^[A-Za-z0-9]+$");
-        if (numberTemp.test(text)) {
-            if (Number(text) >= 1) {
-                this.snbAmount = Number(text);
-            } else {
-                this.snbAmount = 0;
-                editbox.string = this.snbAmount;
-            }
-        } else {
-            this.snbAmount = 0;
-            editbox.string = this.snbAmount;
-            console.log("请输入5的倍数", this.snbAmount);
-        }
+    PayCNTPopViewPriceLabel: {
+      default: null,
+      type: cc.Label,
     },
-
-    onToggleInput(value, evnentData) {
-        this.toggleInputValue = evnentData;
-        this._updatePrice();
+    PayCNTPopViewMutureDurLabel: {
+      default: null,
+      type: cc.Label,
     },
 
-    _updatePrice() {
-        switch (this.toggleInputValue) {
-            case "1":
-                // this.totalPriceValue = 700 * this.inputInviteValue;
-                // this.totalPriceLabel.string = this.totalPriceValue + "CNT";
-                this.PayCNTPopViewNameLabel.string = this.mySeedList[this.buySeedIndex].name;
-                this.PayCNTPopViewPriceLabel.string = this.mySeedList[this.buySeedIndex].priceCnt + ' CNT';
-                this.PayCNTPopViewMutureDurLabel.string = this.mySeedList[this.buySeedIndex].maturity;
-                break;
-            case "2":
-                // this.totalPriceValue = 2500 * this.inputInviteValue;
-                // this.totalPriceLabel.string = this.totalPriceValue + "CNT";
-                this.PayCNTPopViewNameLabel.string = this.mySeedList[this.buySeedIndex].name;
-                this.PayCNTPopViewPriceLabel.string = this.mySeedList[this.buySeedIndex].priceSnb + ' SNB';
-                this.PayCNTPopViewMutureDurLabel.string = this.mySeedList[this.buySeedIndex].maturity;
-                break;
-            default:
-                console.error("this.toggleInputValue 不是1 2 3!", this.toggleInputValue);
-                break;
+    isPlaying: false,
+  },
+  HiddenAll() {
+    if (this.Seed.active) this.Seed.active = false
+    if (this.Exchange.active) this.Exchange.active = false
+  },
+  start() {
+    //获取到仓库列表的脚本
+    this.buildingViewScript = this.buildingView.getComponent('BuildingView')
+    //默认设置第一个节点为 最上面
+    this.SeedBtn.setSiblingIndex(10)
+    // console.log('SNB=======', GlobalD.GameData.SNB)
+    this.snbAmountLabel.string = GlobalD.GameData.SNB
+    //这里也初始化获取一个数据
+    GlobalD.GameData.getWarehouseSeedAndFruit((vaule) => {
+      this.myWareHouseSeedList = vaule.data.seed
+    })
+    //获取种子和果实
+    GlobalD.GameData.getMallSeed((vaule) => {
+      this.mySeedList = vaule.data
+      // console.log('this.mySeedList[i]=', this.mySeedList);
+      for (let i = 0; i < this.mySeedList.length; i++) {
+        //没有种子数量不显示 todo 看看后续需不需要处理删除
+        //if (this.mySeedList[i].amount < 1) continue;
+        let _seed = cc.instantiate(this.seedPrefab)
+        //if (this.mySeedList[i].amount < 1)
+        if (this.mySeedList[i].amount < 1) {
+          //_seed.getChildByName("SellOut").active = true;
+        } else {
+          _seed.getChildByName('SellOut').active = false
         }
-
-    },
-    //根据状态吊起不同支付
-    onSwitchPlayType() {
-        switch (this.toggleInputValue) {
-            case "1"://cnt 支付
-                this.PayCNT();
-                break;
-            case "2": //snb 支付
-                this.PaySNB();
-                break;
-            default:
-                console.error("状态吊起错误", this.toggleInputValue);
-                GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "请先选择支付方式", 1);
-                break;
+        // _seed.getChildByName("buy_button").active = true;
+        // _seed.getChildByName("Name").active = false;
+        // _seed.getChildByName("Name").getChildByName("Num").getComponent(cc.Label).strng = '';//'x'+this.mySeedList[i].amount;
+
+        this.seedNodeArry.push(_seed)
+        _seed.parent = this.Seed
+        let _seedScript = _seed.getComponent('Content_Button')
+        _seedScript.Name = this.mySeedList[i].name
+        _seedScript.Price = ''
+        _seedScript.CNT = this.mySeedList[i].priceCnt
+        _seedScript.SNB = this.mySeedList[i].priceSnb
+        _seedScript.Mature = this.mySeedList[i].maturity + '天'
+        _seedScript.Synopsis = this.mySeedList[i].seedDescribe
+
+        //设置一个生成点
+        let _spawnScript = _seed.getComponent('Content_seed')
+        _spawnScript.myIndex = i
+        _spawnScript.SpawnPoint = cc.find('Canvas/SpawnParent/SpawnPoint')
+        _seedScript.NumLabel.string = this.mySeedList[i].amount
+        _seedScript.NameLabel.string = this.mySeedList[i].name
+        switch (this.mySeedList[i].picture) {
+          case 'Cabbage':
+            _seedScript.bgSprite.spriteFrame = this.mySeedIconList[0] //this.seedSpriteFrame[0];
+            break
+          case 'Potato':
+            _seedScript.bgSprite.spriteFrame = this.mySeedIconList[1] //this.seedSpriteFrame[1];
+            break
+          case 'Carrot':
+            _seedScript.bgSprite.spriteFrame = this.mySeedIconList[2] //this.seedSpriteFrame[2];
+            break
+          case 'Broccoli':
+            _seedScript.bgSprite.spriteFrame = this.mySeedIconList[3] //this.seedSpriteFrame[3];
+            break
+          case 'Tomato':
+            _seedScript.bgSprite.spriteFrame = this.mySeedIconList[4] //this.seedSpriteFrame[4];
+            break
+          case 'Squash':
+            _seedScript.bgSprite.spriteFrame = this.mySeedIconList[5] //this.seedSpriteFrame[5];
+            break
+          case 'Eggplant':
+            _seedScript.bgSprite.spriteFrame = this.mySeedIconList[6] //this.seedSpriteFrame[6];
+            break
+          case 'Pepper':
+            _seedScript.bgSprite.spriteFrame = this.mySeedIconList[7] //this.seedSpriteFrame[7];
+            break
+          case 'Lentil':
+            _seedScript.bgSprite.spriteFrame = this.mySeedIconList[8] //this.seedSpriteFrame[8];
+            break
+          default:
+            break
         }
-    },
+      }
+    })
+  },
+  //切换建筑的面板
+  onSwitchBuildingContent(event, index) {
+    // this.SeedBtn.setScale(1)
+    // this.ExchangeBtn.setScale(1)
+
+    this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Seed_Sprite
+    this.ExchangeBtn.getComponent(cc.Sprite).spriteFrame =
+      this.Normal_Exchange_Sprite
+
+    // this.SeedBtn.setContentSize(100, 54)
+    // this.ExchangeBtn.setContentSize(100, 54)
+
+    // this.SeedBtn.y = -5
+    // this.ExchangeBtn.y = -5
+
+    this.HiddenAll()
+    //面板设置index
+
+    //种子
+    if ('0' == index) {
+      //   this.SeedBtn.y = -20
+      this.SeedBtn.getComponent(cc.Sprite).spriteFrame =
+        this.Selecteded_Seed_Sprite
+      this.Seed.active = true
+      if (this.seedNodeArry.length != 0) {
+        this.SelectedFrame.parent = this.seedNodeArry[0]
+      }
+      //   this.SeedBtn.zIndex = 10
+      //   this.SeedBtn.setContentSize(110, 100)
+      //   this.ExchangeBtn.zIndex = 1
+      // this.ExchangeBtn.setContentSize(86, 88);
+      this.bottomLabel.active = false
+      this.scrollViewNode.active = true
+      this.seedBottomLabel.active = true
+      this.seedsView.active = true
+      this.Exchange.active = false
+    }
+    //兑换
+    else if ('1' == index) {
+      //   this.ExchangeBtn.y = -20
+      this.ExchangeBtn.getComponent(cc.Sprite).spriteFrame =
+        this.Selecteded_Exchange_Sprite
+
+      //   this.ExchangeBtn.zIndex = 10
+      //   this.ExchangeBtn.setContentSize(110, 100)
+      //   this.SeedBtn.zIndex = 1
+      // this.SeedBtn.setContentSize(86, 88);
+
+      this.bottomLabel.active = true
+      this.scrollViewNode.active = false
+      this.seedBottomLabel.active = false
+      this.seedsView.active = false
+      this.Exchange.active = true
+    }
+  },
+  switch: function () {
+    var children = this.container.children
+    var length = children.length
+    if (length > 1) {
+      var src = Math.floor(Math.random() * length)
+      var node = children[src]
+      var dst = src === length - 1 ? 0 : src + 1
+      node.setSiblingIndex(dst)
+    }
+  },
+  OpentSNBExchangeToCNT() {
+    //限制相关人员交易
+    if (1 === GlobalD.UserInfo.limitTran) {
+      GlobalD.GameData.showToast(
+        cc.find('Canvas/UICamera'),
+        '转换CNT通道关闭,请联系相关管理人员!',
+        1
+      )
+      return
+    }
+    //更新数据
+    this.snbAmountLabel.string = GlobalD.GameData.SNB
+    this.ExchangePopView.active = true
+  },
+  SNBExchangeToCNT() {
+    //限制相关人员交易
+    if (1 === GlobalD.UserInfo.limitTran) {
+      GlobalD.GameData.showToast(
+        cc.find('Canvas/UICamera'),
+        '转换CNT通道关闭,请联系相关管理人员!',
+        1
+      )
+      return
+    }
+    if (0 === Number(this.snbAmount) || 0 != Number(this.snbAmount) % 5) {
+      GlobalD.GameData.showToast(
+        cc.find('Canvas/UICamera'),
+        '请输入5的倍数兑换!',
+        1
+      )
+      return
+    }
+    console.log('发起兑换:' + Number(this.snbAmount))
+    GlobalD.GameData.onSnbToCnt(Number(this.snbAmount), (data) => {
+      //更新数据
+      this.snbAmountLabel.string = GlobalD.GameData.SNB
+      this.ExchangePopView.active = false
+      console.log('data=', data)
+      // console.log('res=', res)
+    })
+  },
+  onPayCNTPopView(myIndex) {
+    this.buySeedIndex = myIndex
+    this.PayCNTPopView.active = true
+    // console.log('this.mySeedList[this.buySeedIndex] =',this.mySeedList[this.buySeedIndex])
+    // this.PayCNTPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("NameLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].name;
+    // this.PayCNTPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("PriceLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].priceCnt + ' CNT';
+    // this.PayCNTPopView.getChildByName("BG").getChildByName("BG1_sprite_splash").getChildByName("MutureDurLabel").getChildByName("label").getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].maturity;
+    this._updatePrice()
+    // this.PayCNTPopViewNameLabel.string = this.mySeedList[this.buySeedIndex].name;
+    // this.PayCNTPopViewPriceLabel.string = this.mySeedList[this.buySeedIndex].priceCnt + ' CNT';
+    // this.PayCNTPopViewMutureDurLabel.string = this.mySeedList[this.buySeedIndex].maturity;
+  },
+  onPaySNBPopView(myIndex) {
+    this.buySeedIndex = myIndex
+    this.PaySNBPopView.active = true
+    // console.log('this.mySeedList[this.buySeedIndex] =',this.mySeedList[this.buySeedIndex])
+    this.PaySNBPopView.getChildByName('BG')
+      .getChildByName('BG1_sprite_splash')
+      .getChildByName('NameLabel')
+      .getChildByName('label')
+      .getComponent(cc.Label).string = this.mySeedList[this.buySeedIndex].name
+    this.PaySNBPopView.getChildByName('BG')
+      .getChildByName('BG1_sprite_splash')
+      .getChildByName('PriceLabel')
+      .getChildByName('label')
+      .getComponent(cc.Label).string =
+      this.mySeedList[this.buySeedIndex].priceCnt + ' SNB'
+    this.PaySNBPopView.getChildByName('BG')
+      .getChildByName('BG1_sprite_splash')
+      .getChildByName('MutureDurLabel')
+      .getChildByName('label')
+      .getComponent(cc.Label).string =
+      this.mySeedList[this.buySeedIndex].maturity
+  },
+  PayCNT() {
+    console.log('this.cntAmount=', this.cntAmount)
+    console.log(
+      'this.cntAmount price=',
+      this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceCnt)
+    )
+
+    //购买种子也要使用轮询
+
+    let currentAmount = 0
+
+    for (let i = 0; i < this.myWareHouseSeedList.length; i++) {
+      if (
+        this.myWareHouseSeedList[i].id == this.mySeedList[this.buySeedIndex].id
+      ) {
+        currentAmount = this.myWareHouseSeedList[i].amount
+      }
+    }
+    //当前背包的数量
+    console.log('currentAmount:', {
+      seedId: this.mySeedList[this.buySeedIndex].id,
+      currentAmount: currentAmount, //把当前背包的数据传进去
+    })
+    let playAmount =
+      this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceCnt)
+    if (0 === playAmount) {
+      GlobalD.GameData.showToast(
+        cc.find('Canvas/UICamera'),
+        '请输入购买数量',
+        1
+      )
+      return
+    }
+    // if (this.isPlaying) {
+    //     GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "购买过快!", 1);
+    //     return;
+    // }
+    // this.isPlaying = true;
+    // GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "区块确认中,请耐心等待!", 120);
+    GlobalD.GameData.payCNT(
+      playAmount,
+      4,
+      this.mySeedList[this.buySeedIndex].id + '',
+      (data) => {
+        const [err, tx] = data
+        // this.isPlaying = false;
+        if (err === null) {
+          // TODO 成功, 支付为链上操作,需要提供回调接口给这边服务端确认交易成功后修改购买订单结果
+          console.log(tx) // 交易hash,唯一标识符
+          //todo 种子
+          if (this.AutoGetSeedsData) {
+            this.unschedule(this.AutoGetSeedsData)
+            this.AutoGetSeedsData = null
+          }
+          this.AutoGetSeedsData = () => {
+            // getSeedCount ++;
+            GlobalD.GameData.onGetSeedState(
+              {
+                seedId: this.mySeedList[this.buySeedIndex].id,
+                currentAmount: currentAmount, //把当前背包的数据传进去
+              },
+              (value) => {
+                console.log('轮询种子:' + JSON.stringify(value))
+                if (0 === value.code) {
+                  this.unschedule(this.AutoGetSeedsData)
+                  console.log('轮询种子购买成功')
+                  GlobalD.GameData.showToast(
+                    cc.find('Canvas/UICamera'),
+                    '种子购买成功!',
+                    1
+                  )
+
+                  // this.PayCNTPopView.active = false;
+
+                  //直接重新初始化一下列表,
+                  this.buildingViewScript.onUpdateList()
+                }
+              }
+            )
+          }
+          this.schedule(this.AutoGetSeedsData, 5)
+        } else {
+          console.log(err)
+          GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), err, 2)
+        }
+      }
+    )
+  },
+  PaySNB() {
+    console.log('this.snbAmount=', this.cntAmount)
+    console.log('priceSnb price=', this.mySeedList[this.buySeedIndex].priceSnb)
+    console.log(
+      'this.snbAmount price=',
+      this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceSnb)
+    )
+    console.log(
+      '支付价格:' +
+        this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceSnb)
+    )
+    let playAmount =
+      this.cntAmount * parseInt(this.mySeedList[this.buySeedIndex].priceSnb)
+    if (0 === playAmount) {
+      GlobalD.GameData.showToast(
+        cc.find('Canvas/UICamera'),
+        '请输入购买数量',
+        1
+      )
+      return
+    }
 
-    onDestory() {
-        if (this.AutoGetSeedsData) {
-            this.unschedule(this.AutoGetSeedsData);
-            this.AutoGetSeedsData = null;
+    if (this.isPlaying) {
+      GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), '购买过快!', 1)
+      return
+    }
+    GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), '支付处理中...', 10)
+
+    this.isPlaying = true
+    GlobalD.GameData.onBuySeedsWithSNB(
+      playAmount,
+      this.mySeedList[this.buySeedIndex].id,
+      (flag, value) => {
+        // console.log("SNB购买后", value);
+        this.isPlaying = false
+        if (flag && 0 === value.code) {
+          //todo 种子
+          GlobalD.GameData.showToast(
+            cc.find('Canvas/UICamera'),
+            '种子购买成功!',
+            1
+          )
+          // this.PayCNTPopView.active = false;
+
+          //重新获取一下snb,会自动更新到面板
+          GlobalD.GameData.onGetUserSnb()
+
+          //直接重新初始化一下列表,
+          this.buildingViewScript.onUpdateList()
+
+          //更新日志数据
+          cc.find('GameNode/ManageDapp')
+            .getComponent('ManageDapp')
+            .onUpdateSnbList()
+        } else {
+          GlobalD.GameData.showToast(cc.find('Canvas/UICamera'), value.msg, 2)
         }
+      }
+    )
+  },
+  onTextChanged1: function (text, editbox, customEventData) {
+    // 这里的 text 表示 修改完后的 EditBox 的文本内容
+    // 这里 editbox 是一个 cc.EditBox 对象
+    // 这里的 customEventData 参数就等于你之前设置的 "foobar"
+    this.cntAmount = parseInt(text)
+  },
+  // 假设这个回调是给 textChanged 事件的
+  onTextChanged2: function (text, editbox, customEventData) {
+    // 这里的 text 表示 修改完后的 EditBox 的文本内容
+    // 这里 editbox 是一个 cc.EditBox 对象
+    // 这里的 customEventData 参数就等于你之前设置的 "foobar"
+    // this.snbAmount = parseInt(text);
+    var numberTemp = new RegExp('^[A-Za-z0-9]+$')
+    if (numberTemp.test(text)) {
+      if (Number(text) >= 1) {
+        this.snbAmount = Number(text)
+      } else {
+        this.snbAmount = 0
+        editbox.string = this.snbAmount
+      }
+    } else {
+      this.snbAmount = 0
+      editbox.string = this.snbAmount
+      console.log('请输入5的倍数', this.snbAmount)
     }
+  },
+
+  _updatePrice() {
+    switch (this.toggleInputValue) {
+      case '1':
+        // this.totalPriceValue = 700 * this.inputInviteValue;
+        // this.totalPriceLabel.string = this.totalPriceValue + "CNT";
+        this.PayCNTPopViewNameLabel.string =
+          this.mySeedList[this.buySeedIndex].name
+        this.PayCNTPopViewPriceLabel.string =
+          this.mySeedList[this.buySeedIndex].priceCnt + ' CNT'
+        this.PayCNTPopViewMutureDurLabel.string =
+          this.mySeedList[this.buySeedIndex].maturity
+        break
+      case '2':
+        // this.totalPriceValue = 2500 * this.inputInviteValue;
+        // this.totalPriceLabel.string = this.totalPriceValue + "CNT";
+        this.PayCNTPopViewNameLabel.string =
+          this.mySeedList[this.buySeedIndex].name
+        this.PayCNTPopViewPriceLabel.string =
+          this.mySeedList[this.buySeedIndex].priceSnb + ' SNB'
+        this.PayCNTPopViewMutureDurLabel.string =
+          this.mySeedList[this.buySeedIndex].maturity
+        break
+      default:
+        console.error(
+          'this.toggleInputValue 不是1 2 3!',
+          this.toggleInputValue
+        )
+        break
+    }
+  },
+  //根据状态吊起不同支付
+  onSwitchPlayType() {
+    switch (this.toggleInputValue) {
+      case '1': //cnt 支付
+        this.PayCNT()
+        break
+      case '2': //snb 支付
+        this.PaySNB()
+        break
+      default:
+        console.error('状态吊起错误', this.toggleInputValue)
+        GlobalD.GameData.showToast(
+          cc.find('Canvas/UICamera'),
+          '请先选择支付方式',
+          1
+        )
+        break
+    }
+  },
 
-});
+  onToggleInput(value, evnentData) {
+    this.toggleInputValue = evnentData
+    this._updatePrice()
+  },
+
+  onDestory() {
+    if (this.AutoGetSeedsData) {
+      this.unschedule(this.AutoGetSeedsData)
+      this.AutoGetSeedsData = null
+    }
+  },
+})

BIN
assets/UI/NBuilding/Store/ExchangeLogo.png


+ 6 - 6
assets/UI/NBuilding/Store/ExchangeLogo.png.meta

@@ -18,12 +18,12 @@
       "rotated": false,
       "offsetX": 0,
       "offsetY": 0,
-      "trimX": 3,
-      "trimY": 3,
-      "width": 71,
-      "height": 62,
-      "rawWidth": 77,
-      "rawHeight": 68,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 74,
+      "height": 60,
+      "rawWidth": 74,
+      "rawHeight": 60,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/Store/ExchangeTitle.png


+ 4 - 4
assets/UI/NBuilding/Store/ExchangeTitle.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 255,
-      "height": 105,
-      "rawWidth": 255,
-      "rawHeight": 105,
+      "width": 308,
+      "height": 56,
+      "rawWidth": 308,
+      "rawHeight": 56,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/Store/ShopBlueLine.png


+ 8 - 8
assets/UI/NBuilding/Store/equipment_nbutton.jpg.meta → assets/UI/NBuilding/Store/ShopBlueLine.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.3",
-  "uuid": "3f900b84-4e73-4e55-9734-3a6ea3fbe3cd",
+  "uuid": "82b2497d-8427-4977-b129-3549e8330e1d",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -9,20 +9,20 @@
   "packable": true,
   "platformSettings": {},
   "subMetas": {
-    "equipment_nbutton": {
+    "ShopBlueLine": {
       "ver": "1.0.4",
-      "uuid": "c591679a-6660-4793-8b2c-3bbfdd2973cc",
-      "rawTextureUuid": "3f900b84-4e73-4e55-9734-3a6ea3fbe3cd",
+      "uuid": "447b8d46-afde-47e2-a5db-17141f0f3aec",
+      "rawTextureUuid": "82b2497d-8427-4977-b129-3549e8330e1d",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
       "offsetX": 0,
-      "offsetY": 0,
+      "offsetY": 0.5,
       "trimX": 0,
       "trimY": 0,
-      "width": 200,
-      "height": 84,
-      "rawWidth": 200,
+      "width": 338,
+      "height": 83,
+      "rawWidth": 338,
       "rawHeight": 84,
       "borderTop": 0,
       "borderBottom": 0,

BIN
assets/UI/NBuilding/Store/ShopCaptionBox.png


+ 34 - 0
assets/UI/NBuilding/Store/ShopCaptionBox.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "9dc7d18c-6c5e-4393-8ab5-432a68504ec2",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "ShopCaptionBox": {
+      "ver": "1.0.4",
+      "uuid": "166b0b02-683f-41d7-b9ea-bdb0f24c8f17",
+      "rawTextureUuid": "9dc7d18c-6c5e-4393-8ab5-432a68504ec2",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 50,
+      "height": 50,
+      "rawWidth": 50,
+      "rawHeight": 50,
+      "borderTop": 21,
+      "borderBottom": 21,
+      "borderLeft": 21,
+      "borderRight": 21,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/Store/ShopExchangeBtn.png


+ 11 - 11
assets/UI/NBuilding/Store/snbChangeCnt_btn.png.meta → assets/UI/NBuilding/Store/ShopExchangeBtn.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.3",
-  "uuid": "4edaa7d2-7be1-44bc-85d6-3e7d64f896c4",
+  "uuid": "fcadd702-ecb1-4cc3-9235-bfec35da2ed6",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -9,21 +9,21 @@
   "packable": true,
   "platformSettings": {},
   "subMetas": {
-    "snbChangeCnt_btn": {
+    "ShopExchangeBtn": {
       "ver": "1.0.4",
-      "uuid": "730b4693-f4aa-49bf-bc3a-25b4ed037fb3",
-      "rawTextureUuid": "4edaa7d2-7be1-44bc-85d6-3e7d64f896c4",
+      "uuid": "bf583da9-976a-4a96-ab50-5dd2b17b2baf",
+      "rawTextureUuid": "fcadd702-ecb1-4cc3-9235-bfec35da2ed6",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
       "offsetX": 0,
-      "offsetY": -1,
-      "trimX": 2,
-      "trimY": 2,
-      "width": 160,
-      "height": 64,
-      "rawWidth": 164,
-      "rawHeight": 66,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 166,
+      "height": 79,
+      "rawWidth": 166,
+      "rawHeight": 79,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/Store/ShopGrayBg.png


+ 34 - 0
assets/UI/NBuilding/Store/ShopGrayBg.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "246c2db1-0fe1-47e8-80e1-b334b9a87f12",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "ShopGrayBg": {
+      "ver": "1.0.4",
+      "uuid": "304018ef-13e6-451c-aed9-16c423c91d84",
+      "rawTextureUuid": "246c2db1-0fe1-47e8-80e1-b334b9a87f12",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 553,
+      "height": 692,
+      "rawWidth": 553,
+      "rawHeight": 692,
+      "borderTop": 290,
+      "borderBottom": 290,
+      "borderLeft": 204,
+      "borderRight": 215,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/Store/ShopPicScroll.png


+ 34 - 0
assets/UI/NBuilding/Store/ShopPicScroll.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "9fe48f04-8d2c-498c-aa9b-ad4b99d10b61",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "ShopPicScroll": {
+      "ver": "1.0.4",
+      "uuid": "a661f980-71b7-44c8-8419-3abcb47ea85d",
+      "rawTextureUuid": "9fe48f04-8d2c-498c-aa9b-ad4b99d10b61",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 560,
+      "height": 231,
+      "rawWidth": 560,
+      "rawHeight": 231,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/Store/ShopShed.png


+ 34 - 0
assets/UI/NBuilding/Store/ShopShed.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "bbad0373-4b91-448a-b175-eb1e268c6bd4",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "ShopShed": {
+      "ver": "1.0.4",
+      "uuid": "b3b50223-55ea-458e-9421-ac5f493f8142",
+      "rawTextureUuid": "bbad0373-4b91-448a-b175-eb1e268c6bd4",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": -0.5,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 725,
+      "height": 164,
+      "rawWidth": 726,
+      "rawHeight": 164,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/Store/ShopTop.png


+ 34 - 0
assets/UI/NBuilding/Store/ShopTop.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "ab25ebed-6a2b-49ee-90dc-65028f8d017d",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "ShopTop": {
+      "ver": "1.0.4",
+      "uuid": "ce67fc26-93b8-40eb-a060-315637b1e27c",
+      "rawTextureUuid": "ab25ebed-6a2b-49ee-90dc-65028f8d017d",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 1,
+      "trimY": 0,
+      "width": 352,
+      "height": 141,
+      "rawWidth": 354,
+      "rawHeight": 141,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/Store/ShopVines1.png


+ 34 - 0
assets/UI/NBuilding/Store/ShopVines1.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "cd13cf12-6f1d-4f9b-9762-7399c18a3b2d",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "ShopVines1": {
+      "ver": "1.0.4",
+      "uuid": "3bd65bcd-0d03-4902-9c9a-93078ee422e9",
+      "rawTextureUuid": "cd13cf12-6f1d-4f9b-9762-7399c18a3b2d",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 100,
+      "height": 1581,
+      "rawWidth": 100,
+      "rawHeight": 1581,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/Store/StoreLineBg.png


+ 34 - 0
assets/UI/NBuilding/Store/StoreLineBg.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "5219588a-a03b-4184-8177-7c3d71a04522",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "StoreLineBg": {
+      "ver": "1.0.4",
+      "uuid": "3654fa66-c08f-4ce1-951c-e01b45bc4a8f",
+      "rawTextureUuid": "5219588a-a03b-4184-8177-7c3d71a04522",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 246,
+      "height": 102,
+      "rawWidth": 246,
+      "rawHeight": 102,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 109,
+      "borderRight": 112,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/Store/StoreTitle.png


+ 4 - 4
assets/UI/NBuilding/Store/StoreTitle.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 293,
-      "height": 121,
-      "rawWidth": 293,
-      "rawHeight": 121,
+      "width": 123,
+      "height": 63,
+      "rawWidth": 123,
+      "rawHeight": 63,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/Store/btn_plant.png


+ 34 - 0
assets/UI/NBuilding/Store/btn_plant.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "2068a4dc-88aa-40ab-858a-aeda410e9293",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "btn_plant": {
+      "ver": "1.0.4",
+      "uuid": "01b67bad-775e-4e51-a516-b4c697663b0f",
+      "rawTextureUuid": "2068a4dc-88aa-40ab-858a-aeda410e9293",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 279,
+      "height": 109,
+      "rawWidth": 279,
+      "rawHeight": 109,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/Store/buy_button.png


+ 4 - 4
assets/UI/NBuilding/Store/buy_button.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 116,
-      "height": 62,
-      "rawWidth": 116,
-      "rawHeight": 62,
+      "width": 186,
+      "height": 73,
+      "rawWidth": 186,
+      "rawHeight": 73,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/Store/equipment_button.jpg


BIN
assets/UI/NBuilding/Store/equipment_button.png


+ 7 - 7
assets/UI/NBuilding/Store/equipment_button.jpg.meta → assets/UI/NBuilding/Store/equipment_button.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.3",
-  "uuid": "95c3e7af-45f2-46f5-9c43-0b2b4f568a96",
+  "uuid": "eca1a5e7-57b1-493d-8ed9-06b3c50aa358",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -11,8 +11,8 @@
   "subMetas": {
     "equipment_button": {
       "ver": "1.0.4",
-      "uuid": "9cc0d357-f119-4760-86ea-8655b57ab8e1",
-      "rawTextureUuid": "95c3e7af-45f2-46f5-9c43-0b2b4f568a96",
+      "uuid": "ab8bf18b-1cf4-4834-bd5e-5332ecc6dd7a",
+      "rawTextureUuid": "eca1a5e7-57b1-493d-8ed9-06b3c50aa358",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 194,
-      "height": 156,
-      "rawWidth": 194,
-      "rawHeight": 156,
+      "width": 107,
+      "height": 177,
+      "rawWidth": 107,
+      "rawHeight": 177,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/Store/equipment_nbutton.jpg


BIN
assets/UI/NBuilding/Store/equipment_nbutton.png


+ 34 - 0
assets/UI/NBuilding/Store/equipment_nbutton.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "2ec4220b-c529-44f6-bf7c-8fc8e3c8a827",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "equipment_nbutton": {
+      "ver": "1.0.4",
+      "uuid": "a45708be-19dd-4dd2-9429-b00e53da1604",
+      "rawTextureUuid": "2ec4220b-c529-44f6-bf7c-8fc8e3c8a827",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": -2,
+      "offsetY": 2,
+      "trimX": 8,
+      "trimY": 10,
+      "width": 87,
+      "height": 146,
+      "rawWidth": 107,
+      "rawHeight": 170,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/Store/exchange_button.png


+ 4 - 4
assets/UI/NBuilding/Store/exchange_button.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 129,
-      "height": 104,
-      "rawWidth": 129,
-      "rawHeight": 104,
+      "width": 107,
+      "height": 177,
+      "rawWidth": 107,
+      "rawHeight": 177,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/Store/exchange_nbutton.png


+ 8 - 8
assets/UI/NBuilding/Store/exchange_nbutton.png.meta

@@ -16,14 +16,14 @@
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 133,
-      "height": 56,
-      "rawWidth": 133,
-      "rawHeight": 56,
+      "offsetX": -2,
+      "offsetY": 2,
+      "trimX": 8,
+      "trimY": 10,
+      "width": 87,
+      "height": 145,
+      "rawWidth": 107,
+      "rawHeight": 169,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/Store/snbChangeCnt_btn.png


BIN
assets/UI/NBuilding/building_text_8.png


+ 4 - 4
assets/UI/NBuilding/building_text_8.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 117,
-      "height": 67,
-      "rawWidth": 117,
-      "rawHeight": 67,
+      "width": 126,
+      "height": 68,
+      "rawWidth": 126,
+      "rawHeight": 68,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/fruit_button.png


+ 4 - 4
assets/UI/NBuilding/fruit_button.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 129,
-      "height": 104,
-      "rawWidth": 129,
-      "rawHeight": 104,
+      "width": 157,
+      "height": 307,
+      "rawWidth": 157,
+      "rawHeight": 307,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/fruit_nbutton.png


+ 4 - 4
assets/UI/NBuilding/fruit_nbutton.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 133,
-      "height": 56,
-      "rawWidth": 133,
-      "rawHeight": 56,
+      "width": 157,
+      "height": 307,
+      "rawWidth": 157,
+      "rawHeight": 307,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/seed_button.png


+ 4 - 4
assets/UI/NBuilding/seed_button.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 129,
-      "height": 104,
-      "rawWidth": 129,
-      "rawHeight": 104,
+      "width": 107,
+      "height": 177,
+      "rawWidth": 107,
+      "rawHeight": 177,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/seed_nbutton.png


+ 8 - 8
assets/UI/NBuilding/seed_nbutton.png.meta

@@ -16,14 +16,14 @@
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 133,
-      "height": 56,
-      "rawWidth": 133,
-      "rawHeight": 56,
+      "offsetX": -2,
+      "offsetY": 2,
+      "trimX": 8,
+      "trimY": 10,
+      "width": 87,
+      "height": 145,
+      "rawWidth": 107,
+      "rawHeight": 169,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/UI/NBuilding/seedware_button.png


+ 34 - 0
assets/UI/NBuilding/seedware_button.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "5d4e092d-dc35-4a05-9f95-4f3bfec67eaf",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "seedware_button": {
+      "ver": "1.0.4",
+      "uuid": "a3a61688-b5bb-4698-8883-7d3e8bec28a1",
+      "rawTextureUuid": "5d4e092d-dc35-4a05-9f95-4f3bfec67eaf",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 157,
+      "height": 307,
+      "rawWidth": 157,
+      "rawHeight": 307,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/seedware_nbutton.png


+ 34 - 0
assets/UI/NBuilding/seedware_nbutton.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "c229168e-edd9-423c-8660-30f5014334f0",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "seedware_nbutton": {
+      "ver": "1.0.4",
+      "uuid": "70cf8835-b317-473e-9146-24bce449cd79",
+      "rawTextureUuid": "c229168e-edd9-423c-8660-30f5014334f0",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 157,
+      "height": 307,
+      "rawWidth": 157,
+      "rawHeight": 307,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 4 - 4
assets/UI/NListInfo/ListGrayBox.png.meta

@@ -24,10 +24,10 @@
       "height": 495,
       "rawWidth": 910,
       "rawHeight": 495,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
+      "borderTop": 181,
+      "borderBottom": 175,
+      "borderLeft": 390,
+      "borderRight": 381,
       "subMetas": {}
     }
   }

BIN
assets/UI/NPublic/BuySeedBG.png


+ 12 - 12
assets/UI/NPublic/BuySeedBG.png.meta

@@ -16,18 +16,18 @@
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
-      "offsetX": -0.5,
-      "offsetY": 0.5,
-      "trimX": 2,
-      "trimY": 2,
-      "width": 594,
-      "height": 596,
-      "rawWidth": 599,
-      "rawHeight": 601,
-      "borderTop": 227,
-      "borderBottom": 255,
-      "borderLeft": 0,
-      "borderRight": 0,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 230,
+      "height": 261,
+      "rawWidth": 230,
+      "rawHeight": 261,
+      "borderTop": 85,
+      "borderBottom": 155,
+      "borderLeft": 145,
+      "borderRight": 74,
       "subMetas": {}
     }
   }

BIN
assets/UI/NPublic/BuySeedTop.png


+ 34 - 0
assets/UI/NPublic/BuySeedTop.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "56b3154f-2e81-41b3-bfb3-2718a682fd03",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "BuySeedTop": {
+      "ver": "1.0.4",
+      "uuid": "09cdfc6b-8a3d-4e7a-8d45-137038b52ee8",
+      "rawTextureUuid": "56b3154f-2e81-41b3-bfb3-2718a682fd03",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 185,
+      "height": 72,
+      "rawWidth": 185,
+      "rawHeight": 72,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NPublic/CntBuyBtn.png


+ 34 - 0
assets/UI/NPublic/CntBuyBtn.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "9c2e24a8-1784-4f18-a90f-fbbda4190071",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "CntBuyBtn": {
+      "ver": "1.0.4",
+      "uuid": "c8bca08d-95aa-4137-bf9f-f2872b31b644",
+      "rawTextureUuid": "9c2e24a8-1784-4f18-a90f-fbbda4190071",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 233,
+      "height": 62,
+      "rawWidth": 233,
+      "rawHeight": 62,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 4 - 4
assets/UI/NPublic/DiamondExchangeBg2.png.meta

@@ -24,10 +24,10 @@
       "height": 339,
       "rawWidth": 558,
       "rawHeight": 339,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
+      "borderTop": 96,
+      "borderBottom": 205,
+      "borderLeft": 223,
+      "borderRight": 229,
       "subMetas": {}
     }
   }

BIN
assets/UI/NPublic/PopViewClose.png


+ 34 - 0
assets/UI/NPublic/PopViewClose.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "5e5c6baa-05df-4671-9c7a-9d667989e892",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "PopViewClose": {
+      "ver": "1.0.4",
+      "uuid": "bfd7980a-4103-4052-bea2-17a80cc7d683",
+      "rawTextureUuid": "5e5c6baa-05df-4671-9c7a-9d667989e892",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 75,
+      "height": 72,
+      "rawWidth": 75,
+      "rawHeight": 72,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NPublic/PopViewSeedBg.png


+ 34 - 0
assets/UI/NPublic/PopViewSeedBg.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "3a2ffb78-f289-4071-8f0d-caef8d783545",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "PopViewSeedBg": {
+      "ver": "1.0.4",
+      "uuid": "e55aaaa4-d461-4fe1-a9fb-1ab98afe4124",
+      "rawTextureUuid": "3a2ffb78-f289-4071-8f0d-caef8d783545",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 255,
+      "height": 265,
+      "rawWidth": 255,
+      "rawHeight": 265,
+      "borderTop": 93,
+      "borderBottom": 96,
+      "borderLeft": 84,
+      "borderRight": 92,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NPublic/SnbBuyBtn.png


+ 34 - 0
assets/UI/NPublic/SnbBuyBtn.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "230532e2-fa85-48f4-936b-cace69872b3b",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "SnbBuyBtn": {
+      "ver": "1.0.4",
+      "uuid": "5a80bff4-9121-411f-8a61-9a87a3ade288",
+      "rawTextureUuid": "230532e2-fa85-48f4-936b-cace69872b3b",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 233,
+      "height": 62,
+      "rawWidth": 233,
+      "rawHeight": 62,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NPublic/WarehouseLine.png


+ 34 - 0
assets/UI/NPublic/WarehouseLine.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "68f68796-559e-4a15-8f0e-acd8f0676602",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "WarehouseLine": {
+      "ver": "1.0.4",
+      "uuid": "77bc460f-53fd-4b35-8bb0-ddb5b611cacc",
+      "rawTextureUuid": "68f68796-559e-4a15-8f0e-acd8f0676602",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 57,
+      "height": 338,
+      "rawWidth": 57,
+      "rawHeight": 338,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NPublic/WarehouseRedLine.png


+ 34 - 0
assets/UI/NPublic/WarehouseRedLine.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "c7339034-8479-4997-becf-341998eef548",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "WarehouseRedLine": {
+      "ver": "1.0.4",
+      "uuid": "9e01fb1d-d789-4449-9604-6e2e145ffd42",
+      "rawTextureUuid": "c7339034-8479-4997-becf-341998eef548",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 246,
+      "height": 102,
+      "rawWidth": 246,
+      "rawHeight": 102,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NPublic/WarehouseTop.png


+ 34 - 0
assets/UI/NPublic/WarehouseTop.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "a81c203c-716e-44a0-bb01-fd6295dfd874",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "WarehouseTop": {
+      "ver": "1.0.4",
+      "uuid": "25a01f75-7222-491b-ab0e-55aeef2034a8",
+      "rawTextureUuid": "a81c203c-716e-44a0-bb01-fd6295dfd874",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 710,
+      "height": 200,
+      "rawWidth": 710,
+      "rawHeight": 200,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NScene/Fruits/Sale.png


+ 4 - 4
assets/UI/NScene/Fruits/Sale.png.meta

@@ -20,10 +20,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 80,
-      "height": 43,
-      "rawWidth": 80,
-      "rawHeight": 43,
+      "width": 186,
+      "height": 73,
+      "rawWidth": 186,
+      "rawHeight": 73,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

+ 13 - 13
doc/dapp-host.js

@@ -1,13 +1,13 @@
- //window.dappHost 全局的域名前缀,本地就直接用本地ip加端口,需要本地运行服务器文件
- //window.dappWss 此处连接websocket,目前可以不用配置
- //window.isTestNet 运行DApp时候,dapp-plugin.min 初始化的环境,true就是测试网,false就是正式网络
- //window.dappHost = "http://192.168.0.109:26001";
- //window.dappWss = "ws://192.168.0.109:26001/api_dapp/game_websocket/play_back/";
- window.isTestNet = true;
- window.dappHost = "https://www.9527fun.cn";
- window.dappWss = "wss://www.9527fun.cn/api_dapp/game_websocket/play_back/";
- 
- /**这里就是线上服务器配置,走线上流程时候,这里开发注释*/
- //window.dappHost = "https://cnt.landownership.live";
- //window.dappWss = "wss://cnt.landownership.live/api_dapp/game_websocket/play_back/";
- //window.isTestNet = false;
+//window.dappHost 全局的域名前缀,本地就直接用本地ip加端口,需要本地运行服务器文件
+//window.dappWss 此处连接websocket,目前可以不用配置
+//window.isTestNet 运行DApp时候,dapp-plugin.min 初始化的环境,true就是测试网,false就是正式网络
+//window.dappHost = "http://192.168.0.109:26001";
+//window.dappWss = "ws://192.168.0.109:26001/api_dapp/game_websocket/play_back/";
+window.isTestNet = true
+window.dappHost = 'http://81.69.16.183:26002'
+window.dappWss = 'wss://www.9527fun.cn/api_dapp/game_websocket/play_back/'
+
+/**这里就是线上服务器配置,走线上流程时候,这里开发注释*/
+//window.dappHost = "https://cnt.landownership.live";
+//window.dappWss = "wss://cnt.landownership.live/api_dapp/game_websocket/play_back/";
+//window.isTestNet = false;

+ 4 - 0
settings/project.json

@@ -39,7 +39,11 @@
     "default",
     "GameUI"
   ],
+<<<<<<< HEAD
   "last-module-event-record-time": 1645215058788,
+=======
+  "last-module-event-record-time": 1645746642523,
+>>>>>>> cba7e039f9979c7af0832b36f193289324b80096
   "simulator-orientation": false,
   "simulator-resolution": {
     "height": 640,

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.