瀏覽代碼

1.修改,修复种子列表,果实列表等

slambb 3 年之前
父節點
當前提交
7ddde4e22e

+ 7 - 0
assets/Prefabs/UI/seed.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "976a14c2-c9a4-4b02-9d14-37bca7af89b3",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 776 - 0
assets/Prefabs/UI/seed/HolyFarmlandFruit.prefab

@@ -0,0 +1,776 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "HolyFarmlandSeed",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 11
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 17
+      },
+      {
+        "__id__": 18
+      },
+      {
+        "__id__": 20
+      }
+    ],
+    "_prefab": {
+      "__id__": 22
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 173,
+      "height": 215
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -203.5,
+      "y": -127.5,
+      "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.Node",
+    "_name": "picture",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 3
+      }
+    ],
+    "_prefab": {
+      "__id__": 4
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 108,
+      "height": 135
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 22,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 0.7,
+      "y": 0.7,
+      "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__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "301b3d49-5ffd-4773-87b9-3a0c6cc064d3"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "b056e9fe-07e9-4094-ba81-0b13bafda1aa"
+    },
+    "fileId": "65KxOLcr5MuIonNQNpmieg",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Name",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 6
+      }
+    ],
+    "_active": true,
+    "_level": 3,
+    "_components": [
+      {
+        "__id__": 9
+      }
+    ],
+    "_prefab": {
+      "__id__": 10
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 44,
+      "height": 27.72
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -13,
+      "y": -80,
+      "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.Node",
+    "_name": "Num",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 4,
+    "_components": [
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": {
+      "__id__": 8
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 26.4,
+      "height": 31.5
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 68.162,
+      "y": 0,
+      "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.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "x1",
+    "_N$string": "x1",
+    "_fontSize": 25,
+    "_lineHeight": 25,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "b056e9fe-07e9-4094-ba81-0b13bafda1aa"
+    },
+    "fileId": "e3rr13PDNGVb9kPwsbpqwD",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "种子",
+    "_N$string": "种子",
+    "_fontSize": 22,
+    "_lineHeight": 22,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "b056e9fe-07e9-4094-ba81-0b13bafda1aa"
+    },
+    "fileId": "909EqhOPJPo5PQuNC0hGuC",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Info",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 3,
+    "_components": [
+      {
+        "__id__": 12
+      },
+      {
+        "__id__": 14
+      },
+      {
+        "__id__": 15
+      }
+    ],
+    "_prefab": {
+      "__id__": 16
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 45,
+      "height": 44
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 75,
+      "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.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 11
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 13
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": {
+      "__id__": 11
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "ba198n/JUtJXqII6aiwPODz",
+    "handler": "onPressedInfo",
+    "customEventData": "1"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 11
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "e9998dd3-52a2-429a-b9f4-e4047c03bb33"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.BlockInputEvents",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 11
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "b056e9fe-07e9-4094-ba81-0b13bafda1aa"
+    },
+    "fileId": "b35wX+cyxNAIMdi4MRfJMA",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "98c8ea12-e46b-44a1-ba81-d0b5028081e6"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 19
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$normalSprite": {
+      "__uuid__": "c2cf153e-3d65-4448-b043-65628c8457ba"
+    },
+    "_N$pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "_N$hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$disabledSprite": {
+      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
+    },
+    "_N$target": {
+      "__id__": 1
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "ba198n/JUtJXqII6aiwPODz",
+    "handler": "onPressed",
+    "customEventData": ""
+  },
+  {
+    "__type__": "ba198n/JUtJXqII6aiwPODz",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "Name": "种子",
+    "Price": "50",
+    "DiamondPrice": 1,
+    "CNT": "",
+    "SNB": "",
+    "Synopsis": "可在神农农田播种",
+    "consumeType": 2,
+    "bgSprite": {
+      "__id__": 3
+    },
+    "NumLabel": {
+      "__id__": 7
+    },
+    "NameLabel": {
+      "__id__": 9
+    },
+    "clickEvents": [
+      {
+        "__id__": 21
+      }
+    ],
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "ba198n/JUtJXqII6aiwPODz",
+    "handler": "onPressedInfo",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "b056e9fe-07e9-4094-ba81-0b13bafda1aa"
+    },
+    "fileId": "8eKV86OF9K5phmjtbZ2sts",
+    "sync": false
+  }
+]

+ 8 - 0
assets/Prefabs/UI/seed/HolyFarmlandFruit.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.1",
+  "uuid": "b056e9fe-07e9-4094-ba81-0b13bafda1aa",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 795 - 0
assets/Prefabs/UI/seed/HolyFarmlandSeed.prefab

@@ -0,0 +1,795 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "HolyFarmlandSeed",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 11
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 17
+      },
+      {
+        "__id__": 18
+      },
+      {
+        "__id__": 20
+      },
+      {
+        "__id__": 22
+      }
+    ],
+    "_prefab": {
+      "__id__": 23
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 173,
+      "height": 215
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -203.5,
+      "y": -127.5,
+      "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.Node",
+    "_name": "picture",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 3
+      }
+    ],
+    "_prefab": {
+      "__id__": 4
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 108,
+      "height": 135
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 22,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 0.7,
+      "y": 0.7,
+      "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__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "301b3d49-5ffd-4773-87b9-3a0c6cc064d3"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "bb950ba5-2167-4f1e-b274-07765f8ddbc3"
+    },
+    "fileId": "65KxOLcr5MuIonNQNpmieg",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Name",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 6
+      }
+    ],
+    "_active": true,
+    "_level": 3,
+    "_components": [
+      {
+        "__id__": 9
+      }
+    ],
+    "_prefab": {
+      "__id__": 10
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 44,
+      "height": 27.72
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -13,
+      "y": -80,
+      "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.Node",
+    "_name": "Num",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 4,
+    "_components": [
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": {
+      "__id__": 8
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 26.4,
+      "height": 31.5
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 68.162,
+      "y": 0,
+      "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.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "x1",
+    "_N$string": "x1",
+    "_fontSize": 25,
+    "_lineHeight": 25,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "bb950ba5-2167-4f1e-b274-07765f8ddbc3"
+    },
+    "fileId": "e3rr13PDNGVb9kPwsbpqwD",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "种子",
+    "_N$string": "种子",
+    "_fontSize": 22,
+    "_lineHeight": 22,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "bb950ba5-2167-4f1e-b274-07765f8ddbc3"
+    },
+    "fileId": "909EqhOPJPo5PQuNC0hGuC",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Info",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 3,
+    "_components": [
+      {
+        "__id__": 12
+      },
+      {
+        "__id__": 14
+      },
+      {
+        "__id__": 15
+      }
+    ],
+    "_prefab": {
+      "__id__": 16
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 45,
+      "height": 44
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 75,
+      "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.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 11
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 13
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": {
+      "__id__": 11
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "ba198n/JUtJXqII6aiwPODz",
+    "handler": "onPressedInfo",
+    "customEventData": "1"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 11
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "e9998dd3-52a2-429a-b9f4-e4047c03bb33"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.BlockInputEvents",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 11
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "bb950ba5-2167-4f1e-b274-07765f8ddbc3"
+    },
+    "fileId": "b35wX+cyxNAIMdi4MRfJMA",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "98c8ea12-e46b-44a1-ba81-d0b5028081e6"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 19
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$normalSprite": {
+      "__uuid__": "c2cf153e-3d65-4448-b043-65628c8457ba"
+    },
+    "_N$pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "_N$hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$disabledSprite": {
+      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
+    },
+    "_N$target": {
+      "__id__": 1
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "ba198n/JUtJXqII6aiwPODz",
+    "handler": "onPressed",
+    "customEventData": ""
+  },
+  {
+    "__type__": "ba198n/JUtJXqII6aiwPODz",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "Name": "种子",
+    "Price": "50",
+    "DiamondPrice": 1,
+    "CNT": "",
+    "SNB": "",
+    "Synopsis": "可在神农农田播种",
+    "consumeType": 0,
+    "bgSprite": {
+      "__id__": 3
+    },
+    "NumLabel": {
+      "__id__": 7
+    },
+    "NameLabel": {
+      "__id__": 9
+    },
+    "clickEvents": [
+      {
+        "__id__": 21
+      }
+    ],
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "22ed83kVv5KeZS7uv2u6vw7",
+    "handler": "onCreateSeed",
+    "customEventData": ""
+  },
+  {
+    "__type__": "22ed83kVv5KeZS7uv2u6vw7",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "Name": "种子",
+    "SeedPrefab": {
+      "__uuid__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "SpawnPoint": null,
+    "seedType": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "bb950ba5-2167-4f1e-b274-07765f8ddbc3"
+    },
+    "fileId": "8eKV86OF9K5phmjtbZ2sts",
+    "sync": false
+  }
+]

+ 8 - 0
assets/Prefabs/UI/seed/HolyFarmlandSeed.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.1",
+  "uuid": "bb950ba5-2167-4f1e-b274-07765f8ddbc3",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

文件差異過大導致無法顯示
+ 243 - 54
assets/Scene/MyCityScene - 004.fire


+ 1 - 1
assets/Scene/MyCityScene - 004.fire.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.2.1",
-  "uuid": "90df887c-3982-4d12-aa3b-29fe99f66653",
+  "uuid": "fa358137-208a-4b0f-94eb-b73bfaf5c3d0",
   "asyncLoadAssets": false,
   "autoReleaseAssets": false,
   "subMetas": {}

+ 135 - 60
assets/Script/UI/BuildingView.js

@@ -83,7 +83,22 @@ cc.Class({
         Selecteded_Fruit_Sprite: cc.SpriteFrame,
 
         //需要切换节点顺序的父节点
-        container: cc.Node
+        container: cc.Node,
+
+        //商城的列表
+        mySeedList: [],
+        myFruitList: [],
+        seedPrefab: cc.Prefab,
+        fruitPrefab: cc.Prefab,
+
+        seedSpriteFrame: {
+            default: [],
+            type: [cc.SpriteFrame]
+        },
+        fruitSpriteFrame: {
+            default: [],
+            type: [cc.SpriteFrame]
+        },
     },
     HiddenAll() {
 
@@ -100,9 +115,99 @@ cc.Class({
         if (this.Fruit.active)
             this.Fruit.active = false;
     },
-    start(){
+    start() {
         //默认设置第一个节点为 最上面
         this.EvnBtn.setSiblingIndex(10);
+
+
+        //获取种子和果实
+        GlobalD.GameData.getWarehouseSeedAndFruit((res, 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;
+                let _seedScript = _seed.getComponent("Content_Button");
+                //设置一个生成点
+                let _spawnScript = _seed.getComponent("Content_seed");
+                _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.seedSpriteFrame[0];
+                        break;
+                    case "Potato":
+                        _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[1];
+                        break;
+                    case "Carrot":
+                        _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[2];
+                        break;
+                    case "Broccoli":
+                        _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[3];
+                        break;
+                    case "Tomato":
+                        _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[4];
+                        break;
+                    case "Squash":
+                        _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[5];
+                        break;
+                    case "Eggplant":
+                        _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[6];
+                        break;
+                    case "Pepper":
+                        _seedScript.bgSprite.spriteFrame = this.seedSpriteFrame[7];
+                        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 = 1;
+                _fruitScript.NameLabel.string = this.myFruitList[i].name;
+                _fruitScript.Name = this.myFruitList[i].name;
+                _fruitScript.SNB = this.myFruitList[i].priceSnb;
+                _fruitScript.Synopsis = "出售SNB";
+
+                switch (this.myFruitList[i].picture) {
+                    case "Cabbage":
+                        _fruitScript.bgSprite.spriteFrame = this.seedSpriteFrame[0];
+                        break;
+                    case "Potato":
+                        _fruitScript.bgSprite.spriteFrame = this.seedSpriteFrame[1];
+                        break;
+                    case "Carrot":
+                        _fruitScript.bgSprite.spriteFrame = this.seedSpriteFrame[2];
+                        break;
+                    case "Broccoli":
+                        _fruitScript.bgSprite.spriteFrame = this.seedSpriteFrame[3];
+                        break;
+                    case "Tomato":
+                        _fruitScript.bgSprite.spriteFrame = this.seedSpriteFrame[4];
+                        break;
+                    case "Squash":
+                        _fruitScript.bgSprite.spriteFrame = this.seedSpriteFrame[5];
+                        break;
+                    case "Eggplant":
+                        _fruitScript.bgSprite.spriteFrame = this.seedSpriteFrame[6];
+                        break;
+                    case "Pepper":
+                        _fruitScript.bgSprite.spriteFrame = this.seedSpriteFrame[7];
+                        break;
+                    default:
+                        break;
+                }
+            }
+        });
     },
     //切换建筑的面板
     onSwitchBuildingContent(event, index) {
@@ -121,12 +226,12 @@ cc.Class({
         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.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;
@@ -144,10 +249,10 @@ cc.Class({
             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(86,88);
+            this.EvnBtn.setContentSize(86, 88);
         }
         //劳动 
         else if ('1' == index) {
@@ -156,9 +261,9 @@ cc.Class({
             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(86, 88);
         }
         //商铺
         else if ('2' == index) {
@@ -169,9 +274,9 @@ cc.Class({
             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(86,88);
+            this.ShopBtn.setContentSize(86, 88);
 
-        } 
+        }
         //特殊
         else if ('3' == index) {
             this.SpeBuildingBtn.y = -20;
@@ -181,8 +286,8 @@ cc.Class({
             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(86,88);
-        } 
+            this.SpeBuildingBtn.setContentSize(86, 88);
+        }
         //种子
         else if ('4' == index) {
             this.SeedBtn.y = -20;
@@ -190,31 +295,14 @@ cc.Class({
             this.Seed.active = true;
             this.SelectedFrame.parent = this.Building40;
 
-            GlobalD.GameData.getMallSeed(function(res, vaule)
-            {
-                let Synopsis = "成熟期:"+maturity;
-                this.ManageUI.getComponent('ManageUI').onSetButtonInfo(vaule.data[0].name, vaule.data[0].price, Synopsis);
-            });
-
-            //         "id": 1,
-            //         "mallType": "0",
-            //         "picture": null,
-            //         "name": "白菜种子",
-            //         "maturity": 100,
-            //         "planting": 100,
-            //         "harvestQuantity": 2500,
-            //         "harvestCount": 2500,
-            //         "harvestName": "大白菜",
-            //         "price": 99,
-            //         "amount": 0,
-            //         "withered": 200,
-            //         "createTime": "2022-01-10 16:45:18",
-            //         "updateTime": "2022-01-10 16:45:26"
-            //     },
-           
+            if (this.mySeedList.length > 0) {
+                let Synopsis = "成熟期:" + this.mySeedList[0].maturity;
+                this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.mySeedList[0].name, this.mySeedList[0].priceSnb, Synopsis);
+            }
+
             this.SeedBtn.setSiblingIndex(10);
-            this.SeedBtn.setContentSize(86,88);
-        } 
+            this.SeedBtn.setContentSize(86, 88);
+        }
         //果实
         else if ('5' == index) {
             this.FruitBtn.y = -20;
@@ -222,28 +310,15 @@ cc.Class({
             this.Fruit.active = true;
             this.SelectedFrame.parent = this.Building50;
 
-            //         {
-        //             "id": 1,
-        //             "picture": null,
-        //             "name": "白菜",
-        //             "priceSnb": 99,
-        //             "priceCnt": 9.9,
-        //             "createTime": "2022-01-10 16:45:18",
-        //             "updateTime": "2022-01-10 16:45:26"
-        //         }
-
-            GlobalD.GameData.getMallSeed(function(res, vaule)
-            {
-                let Price = 'Snb:'+vaule.data[0].priceSnb+' Cnt:'+vaule.data[0].priceCnt;
-                let Synopsis = "成熟期:"+maturity;
-                this.ManageUI.getComponent('ManageUI').onSetButtonInfo(vaule.data[0].name, Price, Synopsis);
-
-            });
-            
+            if (this.myFruitList.length > 0) {
+                let Synopsis = "这是个" + this.myFruitList[0].name + "果实!";
+                this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.myFruitList[0].name, this.myFruitList[0].priceSnb, Synopsis);
+            }
+
             this.FruitBtn.setSiblingIndex(10);
-            this.FruitBtn.setContentSize(86,88);
+            this.FruitBtn.setContentSize(86, 88);
         }
-    
+
 
         //切换节点顺序
         // this.switch();

+ 12 - 0
assets/Script/UI/Content_Button.js

@@ -48,7 +48,19 @@ cc.Class({
             tooltip: '需要消耗的货币类型',
         },
 
+        bgSprite:{
+            default:null,
+            type:cc.Sprite,
+        },
 
+        NumLabel:{
+            default:null,
+            type:cc.Label,
+        },
+        NameLabel:{
+            default:null,
+            type:cc.Label,
+        },
 
         clickEvents: {
             default: [],

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

@@ -25,7 +25,7 @@ cc.Class({
             type: cc.Enum(reGameStates.SeedType),
             serializable: true,
         },
-
+        
     },
 
 

+ 22 - 21
assets/Script/public/GameData.js

@@ -1035,31 +1035,32 @@ cc.Class({
         // "data": {
         //     "seed": [
         //         {
-        //             "id": 1,
-        //             "mallType": "0",
-        //             "picture": null,
-        //             "name": "白菜种子",
-        //             "maturity": 100,
-        //             "planting": 100,
-        //             "harvestQuantity": 2500,
-        //             "harvestCount": 2500,
-        //             "harvestName": "大白菜",
-        //             "price": 99,
-        //             "amount": 0,
-        //             "withered": 200,
-        //             "createTime": "2022-01-10 16:45:18",
-        //             "updateTime": "2022-01-10 16:45:26"
+                        // amount: 0
+                        // createTime: "2022-01-10 16:45:18"
+                        // harvestCount: 2500
+                        // harvestName: "大白菜"
+                        // harvestQuantity: 2500
+                        // id: 1
+                        // mallType: "0"
+                        // maturity: 100
+                        // name: "白菜种子"
+                        // picture: null
+                        // planting: 100
+                        // priceCnt: 99.99
+                        // priceSnb: 495.99
+                        // updateTime: "2022-01-10 16:45:26"
+                        // withered: 200
         //         }
         //     ],
         //     "fruit": [
         //         {
-        //             "id": 1,
-        //             "picture": null,
-        //             "name": "白菜",
-        //             "priceSnb": 99,
-        //             "priceCnt": 9.9,
-        //             "createTime": "2022-01-10 16:45:18",
-        //             "updateTime": "2022-01-10 16:45:26"
+                        // createTime: "2022-01-10 16:45:18"
+                        // id: 1
+                        // name: "白菜"
+                        // picture: null
+                        // priceCnt: 9.99
+                        // priceSnb: 99
+                        // updateTime: "2022-01-10 16:45:26"
         //         }
         //     ]
         // },

+ 9 - 0
assets/Script/public/GameStates.js

@@ -69,6 +69,15 @@ var BuildType = cc.Enum({
 var SeedType =  cc.Enum({
     //Normal -- 默认对应 DragonTownFarmland
     Normal:0,
+    Cabbage:1,
+    Potato:2,
+    Carrot:3,
+    Broccoli:4,
+    Tomato:5,
+    Squash:6,
+    Eggplant:7,
+    Pepper:8
+
 });
 
 

部分文件因文件數量過多而無法顯示