浏览代码

适配DApp平台

slambb 4 年之前
父节点
当前提交
fdb81b1f57
共有 63 个文件被更改,包括 4849 次插入755 次删除
  1. 653 0
      assets/Prefabs/NBuildings/Labour/Labour_205_Holy_Farmland.prefab
  2. 8 0
      assets/Prefabs/NBuildings/Labour/Labour_205_Holy_Farmland.prefab.meta
  3. 1141 0
      assets/Prefabs/UI/DragonFarmlandSeedNode.prefab
  4. 8 0
      assets/Prefabs/UI/DragonFarmlandSeedNode.prefab.meta
  5. 45 239
      assets/Scene/Login.fire
  6. 285 258
      assets/Scene/MyCityScene - 004.fire
  7. 14 33
      assets/Script/Config.js
  8. 75 7
      assets/Script/Login/Login.js
  9. 88 0
      assets/Script/Login/dapp.js
  10. 9 0
      assets/Script/Login/dapp.js.meta
  11. 7 0
      assets/Script/Network.meta
  12. 7 0
      assets/Script/Network/Comming.meta
  13. 4 0
      assets/Script/Network/Comming/NotificationCenter.ts
  14. 9 0
      assets/Script/Network/Comming/NotificationCenter.ts.meta
  15. 36 0
      assets/Script/Network/GameNet.ts
  16. 9 0
      assets/Script/Network/GameNet.ts.meta
  17. 213 0
      assets/Script/Network/netUtils.ts
  18. 9 0
      assets/Script/Network/netUtils.ts.meta
  19. 754 0
      assets/Script/Network/runtime.js
  20. 9 0
      assets/Script/Network/runtime.js.meta
  21. 5 4
      assets/Script/UI/BuildingView.js
  22. 73 11
      assets/Script/UI/Content_Button.js
  23. 49 0
      assets/Script/UI/Content_seed.js
  24. 9 0
      assets/Script/UI/Content_seed.js.meta
  25. 19 1
      assets/Script/UI/ManageBuildings.js
  26. 156 0
      assets/Script/UI/ManageSeedNode.js
  27. 9 0
      assets/Script/UI/ManageSeedNode.js.meta
  28. 7 0
      assets/Script/adpp.meta
  29. 99 0
      assets/Script/adpp/inviteInfo.js
  30. 9 0
      assets/Script/adpp/inviteInfo.js.meta
  31. 290 152
      assets/Script/public/GameData.js
  32. 14 1
      assets/Script/public/GameStates.js
  33. 9 0
      assets/Script/public/Globals.js
  34. 6 1
      assets/Script/public/ManageGame.js
  35. 13 0
      assets/Script/public/ManageGolden.js
  36. 16 5
      assets/Script/public/ManageTask.js
  37. 21 1
      assets/Script/public/ManageUI.js
  38. 二进制
      assets/Texture/Labour_205_0.png
  39. 34 0
      assets/Texture/Labour_205_0.png.meta
  40. 二进制
      assets/Texture/Labour_205_1.png
  41. 34 0
      assets/Texture/Labour_205_1.png.meta
  42. 二进制
      assets/Texture/Labour_205_2.png
  43. 34 0
      assets/Texture/Labour_205_2.png.meta
  44. 二进制
      assets/UI/NOther/EveryDaySign/CNT.png
  45. 34 0
      assets/UI/NOther/EveryDaySign/CNT.png.meta
  46. 二进制
      assets/UI/NOther/EveryDaySign/SNB.png
  47. 34 0
      assets/UI/NOther/EveryDaySign/SNB.png.meta
  48. 二进制
      assets/UI/NScene/Labour_Holy_Farmland.png
  49. 34 0
      assets/UI/NScene/Labour_Holy_Farmland.png.meta
  50. 二进制
      assets/UI/NScene/Labour_Holy_Farmland_Seed.png
  51. 34 0
      assets/UI/NScene/Labour_Holy_Farmland_Seed.png.meta
  52. 7 0
      assets/migration.meta
  53. 15 0
      assets/migration/use_v2.1.x_cc.Action.js
  54. 9 0
      assets/migration/use_v2.1.x_cc.Action.js.meta
  55. 二进制
      assets/resources/login/shennongStartBg.jpg
  56. 34 0
      assets/resources/login/shennongStartBg.jpg.meta
  57. 7 0
      assets/resources/prefab/login.meta
  58. 34 28
      assets/resources/prefab/login.prefab
  59. 300 0
      assets/resources/prefab/login/playButton.prefab
  60. 8 0
      assets/resources/prefab/login/playButton.prefab.meta
  61. 1 1
      settings/builder.json
  62. 3 13
      settings/project.json
  63. 6 0
      settings/services.json

+ 653 - 0
assets/Prefabs/NBuildings/Labour/Labour_205_Holy_Farmland.prefab

@@ -0,0 +1,653 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Labour_205_Holy_Farmland",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 4
+      },
+      {
+        "__id__": 7
+      },
+      {
+        "__id__": 10
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 13
+      },
+      {
+        "__id__": 17
+      },
+      {
+        "__id__": 18
+      },
+      {
+        "__id__": 19
+      },
+      {
+        "__id__": 20
+      }
+    ],
+    "_prefab": {
+      "__id__": 21
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 241,
+      "height": 142
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.2
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 175.3,
+      "y": -915.1,
+      "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": "Draw",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 4,
+    "_components": [],
+    "_prefab": {
+      "__id__": 3
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0.1,
+      "y": 48,
+      "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.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "4456b7c3-3442-48da-aad3-369482e0172a"
+    },
+    "fileId": "56R88JVqxLXZjH7xd+4Mg7",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Env_03_0",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 4,
+    "_components": [
+      {
+        "__id__": 5
+      }
+    ],
+    "_prefab": {
+      "__id__": 6
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 273,
+      "height": 168
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": -39,
+      "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__": 4
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "19f8dc86-b387-45de-9faf-289bed54b139"
+    },
+    "_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__": "4456b7c3-3442-48da-aad3-369482e0172a"
+    },
+    "fileId": "ecTqlJzgxJBoB3La5d8bzj",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Title",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 4,
+    "_components": [
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 97.87,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -16,
+      "y": 315,
+      "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__": 7
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "Label",
+    "_N$string": "Label",
+    "_fontSize": 40,
+    "_lineHeight": 40,
+    "_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__": "4456b7c3-3442-48da-aad3-369482e0172a"
+    },
+    "fileId": "8cqUJPPeJG05bM/Sts7tQE",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "opWorkingAni",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": false,
+    "_level": 5,
+    "_components": [
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": {
+      "__id__": 12
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -2,
+      "y": 80,
+      "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__": "dragonBones.ArmatureDisplay",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "_materials": [],
+    "_armatureName": "Sprite",
+    "_animationName": "Sprite",
+    "_preCacheMode": -1,
+    "_cacheMode": 0,
+    "playTimes": -1,
+    "premultipliedAlpha": false,
+    "_armatureKey": "",
+    "_accTime": 0,
+    "_playCount": 0,
+    "_frameCache": null,
+    "_curFrame": null,
+    "_playing": false,
+    "_armatureCache": null,
+    "_N$dragonAsset": {
+      "__uuid__": "62e1bfdc-78cc-45c0-a6b1-121638e6b868"
+    },
+    "_N$dragonAtlasAsset": {
+      "__uuid__": "92ba3c50-492f-4f90-92d3-85f8d9316728"
+    },
+    "_N$_defaultArmatureIndex": 0,
+    "_N$_animationIndex": 1,
+    "_N$_defaultCacheMode": 0,
+    "_N$timeScale": 1,
+    "_N$debugBones": false,
+    "_N$enableBatch": false,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "4456b7c3-3442-48da-aad3-369482e0172a"
+    },
+    "fileId": "1dXr2VAxZEN7auLlVDhjfz",
+    "sync": false
+  },
+  {
+    "__type__": "665c9OT2R1OgqpO6W6onlaQ",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "title": {
+      "__id__": 8
+    },
+    "buildInfo": {
+      "__id__": 14
+    },
+    "buildZone": {
+      "__id__": 2
+    },
+    "_canBuild": false,
+    "InitPosFromStore": false,
+    "InitPos": true,
+    "InitStartPos": {
+      "__type__": "cc.Vec2",
+      "x": 26,
+      "y": 24
+    },
+    "InitBuildingInfo": true,
+    "ShowTip": null,
+    "ShowTipString": "",
+    "InitWorkBuildingInfo": true,
+    "InitWorkBuildingIndex": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "BuildInfo",
+    "buildType": 7,
+    "id": 610006,
+    "occupyArea": {
+      "__type__": "cc.Vec2",
+      "x": 2,
+      "y": 2
+    },
+    "startTilePos": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "isItActive": true,
+    "isItOccupied": false,
+    "occupantPlayerInfo": null,
+    "isThereAnItem": false,
+    "isItSaleable": false,
+    "isItStopOperation": false,
+    "buildingName": "农田",
+    "BuildingPrefabName": "Dragon_Farmland_Labour_01",
+    "EnglishName": "Dragon_Farmland_Labour_1",
+    "BuildingSynopsis": "生产特殊材料",
+    "BuildingSprite": {
+      "__id__": 5
+    },
+    "RunningCost": 0,
+    "consumeStrength": -6,
+    "totalConsumption": 30,
+    "totalInventory": 10,
+    "goodsArray": [
+      {
+        "__id__": 15
+      }
+    ],
+    "_goods": null,
+    "_inventory": 0,
+    "_targetBuildingsInfo": null,
+    "_gotoPosistion": [],
+    "specialSetValue": 3,
+    "consumeStrengthAddValue": 0,
+    "goodsPriceAddValue": 0,
+    "AssetValue": 0
+  },
+  {
+    "__type__": "goodsInfo",
+    "isItSale": true,
+    "goodsId": 0,
+    "goodsName": "苹果",
+    "goodsPrice": 20,
+    "goodsSalesRate": 50,
+    "goodsMaterial": {
+      "__id__": 16
+    }
+  },
+  {
+    "__type__": "goodsMaterialClass",
+    "crops": 0,
+    "wood": 0,
+    "mineral": 0
+  },
+  {
+    "__type__": "c818fDHNAJL/KUAnaPKbekt",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "isShowBuildingInfo": false,
+    "_isInstance": false,
+    "_ifCanEdit": false,
+    "touchTimer": 0.8,
+    "isAutoMove": false,
+    "targetNode": null,
+    "_OldIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "9635dMSoyRLS6/ZTuBovKFA",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "stateArray": [
+      {
+        "__uuid__": "0bf10f81-00d4-4c35-8f25-0c04cc7bbcd8"
+      },
+      {
+        "__uuid__": "67dece92-f574-4b4e-88f9-f5e73f064f1c"
+      }
+    ],
+    "workArray": [
+      {
+        "__uuid__": "7bab315e-71fa-4237-b0d3-33b967bbcc65"
+      },
+      {
+        "__uuid__": "50cbc371-87b8-4897-a39f-5d39db98fa77"
+      },
+      {
+        "__uuid__": "53820242-02d8-4542-a84e-ec09c8465ee0"
+      }
+    ],
+    "changeSprite": {
+      "__id__": 5
+    },
+    "workingStatus": {
+      "__id__": 10
+    },
+    "workPlace": 7,
+    "_id": ""
+  },
+  {
+    "__type__": "11080so8tVCfJMXcYRhAT3s",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "3b3f4TYx8NMDLX1AIrRzmKU",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "4456b7c3-3442-48da-aad3-369482e0172a"
+    },
+    "fileId": "d6zAvvv6lAq6H+8g+/ewLS",
+    "sync": false
+  }
+]

+ 8 - 0
assets/Prefabs/NBuildings/Labour/Labour_205_Holy_Farmland.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.1",
+  "uuid": "4456b7c3-3442-48da-aad3-369482e0172a",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 1141 - 0
assets/Prefabs/UI/DragonFarmlandSeedNode.prefab

@@ -0,0 +1,1141 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "DragonFarmlandSeedNode",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 8
+      },
+      {
+        "__id__": 14
+      },
+      {
+        "__id__": 22
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 30
+      }
+    ],
+    "_prefab": {
+      "__id__": 31
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 200,
+      "height": 200
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.3
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 24,
+      "y": -1801,
+      "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": "WillSelectFrame",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": false,
+    "_level": 4,
+    "_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": 165,
+      "height": 96
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": -44,
+      "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__": 2
+    },
+    "_enabled": true,
+    "_materials": [],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a913c41d-71c4-46b7-8c3f-bbee097c0363"
+    },
+    "_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__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "fileId": "10GAjyp/NP3a8aiWR9VDUV",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Hammer",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 5,
+    "_components": [
+      {
+        "__id__": 6
+      }
+    ],
+    "_prefab": {
+      "__id__": 7
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -32,
+      "y": 62,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 2.79,
+      "y": 2.79,
+      "z": 2.79
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "dragonBones.ArmatureDisplay",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_armatureName": "Sprite",
+    "_animationName": "Sprite",
+    "_preCacheMode": 0,
+    "_cacheMode": 0,
+    "playTimes": -1,
+    "premultipliedAlpha": false,
+    "_armatureKey": "f7dfe677-7935-40e3-926d-7aff7cf3092b#6bd26c7e-d9de-41be-b537-767086f75cac",
+    "_accTime": 0,
+    "_playCount": 0,
+    "_frameCache": null,
+    "_curFrame": null,
+    "_playing": false,
+    "_armatureCache": null,
+    "_N$dragonAsset": {
+      "__uuid__": "f7dfe677-7935-40e3-926d-7aff7cf3092b"
+    },
+    "_N$dragonAtlasAsset": {
+      "__uuid__": "6bd26c7e-d9de-41be-b537-767086f75cac"
+    },
+    "_N$_defaultArmatureIndex": 0,
+    "_N$_animationIndex": 1,
+    "_N$_defaultCacheMode": 0,
+    "_N$timeScale": 0.5,
+    "_N$debugBones": false,
+    "_N$enableBatch": false,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "fileId": "36AjrkikNBg4VQ+31mgwM0",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "commonTip_down_Bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 9
+      }
+    ],
+    "_active": true,
+    "_level": 5,
+    "_components": [
+      {
+        "__id__": 12
+      }
+    ],
+    "_prefab": {
+      "__id__": 13
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 304,
+      "height": 88
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 162,
+      "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": "Tip",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 8
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 6,
+    "_components": [
+      {
+        "__id__": 10
+      }
+    ],
+    "_prefab": {
+      "__id__": 11
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 1,
+      "g": 1,
+      "b": 1,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 234,
+      "height": 32.76
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 9,
+      "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__": 9
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "移动可拆除对应建筑",
+    "_N$string": "移动可拆除对应建筑",
+    "_fontSize": 26,
+    "_lineHeight": 26,
+    "_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__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "fileId": "b8DLONkMJNUobk9hXi68Yh",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 8
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a44e4104-2002-4b52-950f-c6ce2efc33e6"
+    },
+    "_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__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "fileId": "25ZqPOZWFA46CW95pVyhKy",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Cancel",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 15
+      }
+    ],
+    "_active": true,
+    "_level": 4,
+    "_components": [
+      {
+        "__id__": 18
+      },
+      {
+        "__id__": 19
+      }
+    ],
+    "_prefab": {
+      "__id__": 21
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 93,
+      "height": 95
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -67,
+      "y": -38,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 0.64,
+      "y": 0.64,
+      "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": "Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 14
+    },
+    "_children": [],
+    "_active": false,
+    "_level": 0,
+    "_components": [
+      {
+        "__id__": 16
+      }
+    ],
+    "_prefab": {
+      "__id__": 17
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "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__": 15
+    },
+    "_enabled": true,
+    "_materials": [],
+    "_useOriginalSize": false,
+    "_string": "取消",
+    "_N$string": "取消",
+    "_fontSize": 20,
+    "_lineHeight": 40,
+    "_enableWrapText": false,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 1,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "fileId": "770QySo4pIdYYNuBD9wlFQ",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "290283b6-2acb-4d16-8f98-476c940e3b47"
+    },
+    "_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__": 14
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 20
+      }
+    ],
+    "_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__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "_N$hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$disabledSprite": {
+      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
+    },
+    "_N$target": {
+      "__id__": 14
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "6fe23sDTAtGaZKpqfrTPgpp",
+    "handler": "onCancleSelf",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "fileId": "916uK6BdBPkKE5yk6RwZVh",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Create",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 23
+      }
+    ],
+    "_active": true,
+    "_level": 4,
+    "_components": [
+      {
+        "__id__": 26
+      },
+      {
+        "__id__": 27
+      }
+    ],
+    "_prefab": {
+      "__id__": 29
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 93,
+      "height": 95
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 35,
+      "y": -39,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 0.64,
+      "y": 0.64,
+      "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": "Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 22
+    },
+    "_children": [],
+    "_active": false,
+    "_level": 0,
+    "_components": [
+      {
+        "__id__": 24
+      }
+    ],
+    "_prefab": {
+      "__id__": 25
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "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__": 23
+    },
+    "_enabled": true,
+    "_materials": [],
+    "_useOriginalSize": false,
+    "_string": "创建",
+    "_N$string": "创建",
+    "_fontSize": 20,
+    "_lineHeight": 40,
+    "_enableWrapText": false,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 1,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "fileId": "b0gr7w5z5HIbnT6ep+2DDa",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 22
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "9c515ae6-fc75-4da9-a685-4828428648cb"
+    },
+    "_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__": 22
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 28
+      }
+    ],
+    "_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__": "9c515ae6-fc75-4da9-a685-4828428648cb"
+    },
+    "_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__": 22
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "6fe23sDTAtGaZKpqfrTPgpp",
+    "handler": "onSowOnTheGround",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "fileId": "cd6VfQ2qNK2biXa+Ce0VkN",
+    "sync": false
+  },
+  {
+    "__type__": "6fe23sDTAtGaZKpqfrTPgpp",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "seedType": 0,
+    "labelTip": {
+      "__id__": 10
+    },
+    "labelTipString": "移动到对应的田地播种",
+    "targetBuildingsInfo": null,
+    "removeTipPrefab": null,
+    "selectedTarget": [],
+    "selectedTargetIndex": [],
+    "isMoveState": true,
+    "MoveStartNode": null,
+    "MoveEndNode": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "dfff901a-dac2-48df-a77d-261318f9c441"
+    },
+    "fileId": "b9h2a2ECxDYr5oqLX23YNc",
+    "sync": false
+  }
+]

+ 8 - 0
assets/Prefabs/UI/DragonFarmlandSeedNode.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.1",
+  "uuid": "dfff901a-dac2-48df-a77d-261318f9c441",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 45 - 239
assets/Scene/Login.fire

@@ -15,6 +15,9 @@
     "_children": [
       {
         "__id__": 2
+      },
+      {
+        "__id__": 8
       }
     ],
     "_active": false,
@@ -60,22 +63,19 @@
     "_children": [
       {
         "__id__": 3
-      },
-      {
-        "__id__": 5
       }
     ],
     "_active": true,
     "_level": 1,
     "_components": [
       {
-        "__id__": 10
+        "__id__": 5
       },
       {
-        "__id__": 11
+        "__id__": 6
       },
       {
-        "__id__": 12
+        "__id__": 7
       }
     ],
     "_prefab": null,
@@ -159,7 +159,7 @@
       "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
-      "z": 451.19923537169257
+      "z": 510.0889628290344
     },
     "_scale": {
       "__type__": "cc.Vec3",
@@ -215,83 +215,55 @@
     "_id": "72z2eVQapNQaZni+rg/gHX"
   },
   {
-    "__type__": "cc.Node",
-    "_name": "PlayButton",
+    "__type__": "cc.Canvas",
+    "_name": "",
     "_objFlags": 0,
-    "_parent": {
+    "node": {
       "__id__": 2
     },
-    "_children": [
-      {
-        "__id__": 6
-      }
-    ],
-    "_active": true,
-    "_level": 2,
-    "_components": [
-      {
-        "__id__": 9
-      }
-    ],
-    "_prefab": null,
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
+    "_enabled": true,
+    "_designResolution": {
       "__type__": "cc.Size",
-      "width": 100,
-      "height": 40
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_position": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
+      "width": 720,
+      "height": 1280
     },
-    "_scale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
+    "_fitWidth": true,
+    "_fitHeight": false,
+    "_id": "1dXjL7wiJH+o21du1oUu/A"
+  },
+  {
+    "__type__": "e30e8T/pvRKaZAg86g3LvLi",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
     },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
+    "_enabled": true,
+    "_id": "6dodPXyEBMXJOQUSdd+Q0M"
+  },
+  {
+    "__type__": "1021fwbV59BW6cMyQRvQSBi",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
     },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_is3DNode": false,
-    "groupIndex": 0,
-    "_id": "8eUSOzmwRDl7YPy0rTSJLI"
+    "_enabled": true,
+    "_id": "a5YVl2tJtLeaKKsgGwpaoD"
   },
   {
     "__type__": "cc.Node",
-    "_name": "Background",
+    "_name": "dapp",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 5
+      "__id__": 1
     },
     "_children": [],
     "_active": true,
-    "_level": 2,
+    "_level": 1,
     "_components": [
       {
-        "__id__": 7
-      },
-      {
-        "__id__": 8
+        "__id__": 9
       }
     ],
     "_prefab": null,
@@ -305,8 +277,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 100,
-      "height": 40
+      "width": 0,
+      "height": 0
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -335,182 +307,16 @@
     "_skewY": 0,
     "_is3DNode": false,
     "groupIndex": 0,
-    "_id": "80iWbSRilDO6y5v3MOT4lS"
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 6
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "d2a32fc2-ff6b-42e3-83c8-f753a75a824c"
-    },
-    "_type": 1,
-    "_sizeMode": 0,
-    "_fillType": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_atlas": null,
-    "_id": "e8wRhkavBATLJn8xnUknwM"
-  },
-  {
-    "__type__": "cc.Widget",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 6
-    },
-    "_enabled": true,
-    "alignMode": 0,
-    "_target": null,
-    "_alignFlags": 45,
-    "_left": 0,
-    "_right": 0,
-    "_top": 0,
-    "_bottom": 0,
-    "_verticalCenter": 0,
-    "_horizontalCenter": 0,
-    "_isAbsLeft": true,
-    "_isAbsRight": true,
-    "_isAbsTop": true,
-    "_isAbsBottom": true,
-    "_isAbsHorizontalCenter": true,
-    "_isAbsVerticalCenter": true,
-    "_originalWidth": 100,
-    "_originalHeight": 40,
-    "_id": "141p3SS8VMr6jSN09vPB3C"
-  },
-  {
-    "__type__": "cc.Button",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 5
-    },
-    "_enabled": true,
-    "duration": 0.1,
-    "zoomScale": 1.2,
-    "clickEvents": [],
-    "_N$interactable": true,
-    "_N$enableAutoGrayEffect": false,
-    "_N$transition": 2,
-    "transition": 2,
-    "_N$normalColor": {
-      "__type__": "cc.Color",
-      "r": 230,
-      "g": 230,
-      "b": 230,
-      "a": 255
-    },
-    "_N$pressedColor": {
-      "__type__": "cc.Color",
-      "r": 200,
-      "g": 200,
-      "b": 200,
-      "a": 255
-    },
-    "pressedColor": {
-      "__type__": "cc.Color",
-      "r": 200,
-      "g": 200,
-      "b": 200,
-      "a": 255
-    },
-    "_N$hoverColor": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "hoverColor": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_N$disabledColor": {
-      "__type__": "cc.Color",
-      "r": 120,
-      "g": 120,
-      "b": 120,
-      "a": 200
-    },
-    "_N$normalSprite": {
-      "__uuid__": "d2a32fc2-ff6b-42e3-83c8-f753a75a824c"
-    },
-    "_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__": 6
-    },
-    "_id": "f81BVX31JM0JEVMCeQasGu"
+    "_id": "d3SM7AqMhJNaoQpdImbNoF"
   },
   {
-    "__type__": "cc.Canvas",
+    "__type__": "af9b5/qsH5JDazGFesDdoVx",
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 2
+      "__id__": 8
     },
     "_enabled": true,
-    "_designResolution": {
-      "__type__": "cc.Size",
-      "width": 720,
-      "height": 1280
-    },
-    "_fitWidth": false,
-    "_fitHeight": false,
-    "_id": "1dXjL7wiJH+o21du1oUu/A"
-  },
-  {
-    "__type__": "e30e8T/pvRKaZAg86g3LvLi",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 2
-    },
-    "_enabled": true,
-    "_id": "6dodPXyEBMXJOQUSdd+Q0M"
-  },
-  {
-    "__type__": "1021fwbV59BW6cMyQRvQSBi",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 2
-    },
-    "_enabled": true,
-    "_id": "a5YVl2tJtLeaKKsgGwpaoD"
+    "_id": "b2WrvEb0JJyqgFC2JkbiwD"
   }
 ]

文件差异内容过多而无法显示
+ 285 - 258
assets/Scene/MyCityScene - 004.fire


+ 14 - 33
assets/Script/Config.js

@@ -1,4 +1,5 @@
 let Config = {
+        //解锁的费用,比如特指钻石 ManageUI onClickYesBTNInUnlockBuilding
         BuildingUnlockMoneyArray: [
             0,//公路
             0, //路铲
@@ -30,7 +31,10 @@ let Config = {
             200, //警察局
             500,//游乐场
             500,  //蓝色城堡
-            500 //粉色城堡
+            500, //粉色城堡
+
+            2500, //Holy Farmland cnt
+            0 //Holy Farmland seed
         ],
 
         //运营费用
@@ -67,9 +71,12 @@ let Config = {
             500, //警察局
             1000,//游乐场
             5000,  //蓝色城堡
-            5000 //粉色城堡
-        ],
+            5000, //粉色城堡
 
+            0, //Holy Farmland cnt
+            0 //Holy Farmland seed
+        ],
+        /**放置服务器处理*/
         //消耗金币买建筑费用
         DiamondArray: [
             0,//公路
@@ -104,37 +111,11 @@ let Config = {
             1000, //警察局
             1000,//游乐场
             5000,  //蓝色城堡
-            5000 //粉色城堡
-        ],
+            5000, //粉色城堡
 
-        //消耗钻石费用
-        // DiamondArray: [
-        //         0,//公路
-        //         0, //路铲
-        //         0, //拆迁
-        //         10, //农舍
-        //         15, //单元楼
-        //         30, //别墅
-        //
-        //         20, //农田
-        //         20,//伐木场
-        //         20,//矿坑
-        //         40,//加工厂
-        //
-        //         200,//便利店
-        //         400,//鲜花店
-        //         600,//甜品店
-        //         800,//汉堡店
-        //         1000,//咖啡店
-        //         1500,//洋装店
-        //         2000,//酒吧
-        //
-        //         20,//绿化带
-        //         40,//喷泉
-        //         60,//游乐场
-        //         300,//医院
-        //         600,//警察局
-        //         1000],//银行
+            2500, //Holy Farmland cnt
+            0 //Holy Farmland seed
+        ],
 };
 module.exports = Config;
 

+ 75 - 7
assets/Script/Login/Login.js

@@ -1,4 +1,6 @@
 
+import utils from "../Network/netUtils";
+
 cc.Class({
     extends: cc.Component,
 
@@ -19,26 +21,92 @@ cc.Class({
                 }
             }
         };
+       
         //如果不是微信环境
         if (typeof wx === 'undefined') {
-            console.log('cc.sys.platform:',cc.sys.platform);
+            console.log('cc.sys.platform:', cc.sys.platform);
+            // this.getNetworkUserInfo();
             this.h5();
             return;
         }
         this.wxEnv();
 
     },
-    h5(){
+    /**
+     * 获取用户信息
+     */
+    getNetworkUserInfo() {
+
+        //获取公钥和是否开启验证的开关
+        // utils.get(utils.api.publicKeyAndSys, {}, (res, data) => {
+        //     console.log("data:", data);
+        //     utils.setJavaPublicKeyAndSysApiEncrypt(data.data.publicKey, data.data.sysApiEncrypt);
+        // })
+        //第一步需要操作token
+        utils.get(utils.api.loginToken, { loginId: 1 }, (res, value) => {
+            if (value.code == 0) {
+                /** 登录成功获取token */
+                utils.setToken(value.data.token);
+                /** 获取用户数据 */
+                utils.get(utils.api.userInfo, {}, (res, userInfoTemp) => {
+                    // dataManage.setUserInfo(userInfoTemp.data);
+                    console.log("userInfo:", userInfoTemp);
+                    // this.gotoNextScene();
+                })
+                /** 获取角色信息 */
+                utils.get(utils.api.playerInfo, { name: "曹英俊", avatar: "" }, (res, playerInfoTemp) => {
+                    // dataManage.setPlayerInfo(playerInfoTemp.data);
+                    // console.log("playerInfo:", dataManage.playerInfo);
+                    // this.gotoNextScene();
+                })
+            }
+        })
+    },
+
+
+    loginButton(){
         let self = this;
-      
+        UtilsPrefabs.init(self.node).addPrefabs(UtilsPrefabs.getPrefabsPath(UtilsPrefabs.LOGINPREFABSNAME.playButton), null, (node) => {
+
+            node.width *= 2;
+            node.height *= 2;
+            node.setPosition(0, -230);
+
+            node.on(cc.Node.EventType.TOUCH_START, () => {
+                node.destroy();
+                self._showLoading();//显示载入loading
+                //全局函数
+                //获取游戏数据
+                self._gotoScene();//跳转场景
+            })
 
+        })
+    },
+    h5() {
+        let self = this;
         UtilsPrefabs.init(self.node).addPrefabs(UtilsPrefabs.getPrefabsPath(UtilsPrefabs.LOGINPREFABSNAME.login), null, (node) => {
-            UtilsPrefabs.init(self.node).addPrefabs(UtilsPrefabs.getPrefabsPath(UtilsPrefabs.LOGINPREFABSNAME.playButton), null, (node) => {
-        
-            })
+            // UtilsPrefabs.init(self.node).addPrefabs(UtilsPrefabs.getPrefabsPath(UtilsPrefabs.LOGINPREFABSNAME.playButton), null, (node) => {
+
+            //     node.width *= 2;
+            //     node.height *= 2;
+            //     node.setPosition(0, -230);
+
+            //     node.on(cc.Node.EventType.TOUCH_START, () => {
+            //         node.destroy();
+            //         self._showLoading();//显示载入loading
+            //         //全局函数
+            //         //获取游戏数据
+            //         self._gotoScene();//跳转场景
+            //     })
+
+            // })
+
+            // cc.director.preloadScene('MyCityScene - 004', function () {
+            //     cc.log('Next scene preloaded');
+            // });
         })
     },
-    wxEnv(){
+    wxEnv() {
         // let self = this;
         // cc.audioEngine.stopAll();
         // this.progressTag = false;

+ 88 - 0
assets/Script/Login/dapp.js

@@ -0,0 +1,88 @@
+
+import GameNet from "../Network/GameNet"
+import utils from "../Network/netUtils";
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+    },
+
+    // LIFE-CYCLE CALLBACKS:
+
+    onLoad() {
+        cc.view.enableAutoFullScreen(false);
+        cc.game.addPersistRootNode(this.node);
+
+        async function dappInit() {
+           let dapp = GlobalD.dapp = new Dapp()
+            try {
+                console.log('开始初始化dapp!')
+                await dapp.init()
+                console.log("用户当前钱包地址:" + dapp.getAddress()) // 初始化成功,得到用户当前钱包地址
+                dapp.onAccountChanged((account) => {
+                    console.log('当前钱包地址发生变化', account.address) // 用户钱包地址即为登录账户,使用过程中用户可以切换钱包地址,即游戏要进行当前地址退出登录,新地址重新登录的操作
+                    // this.address = account.address
+                    //跳回login 页面
+                    cc.director.loadScene('Login', function () {
+                        //重新初始化信息
+                        console.log('onAccountChanged Login');
+                        dappInit();
+                    }.bind(this));
+                })
+
+                dapp.onNetworkChanged((node) => {
+                    console.log('当前钱包节点发生变化', node) // 切换网络,一般可以不处理,实际用户端一般不会切换
+                    //跳回login 页面
+                    cc.director.loadScene('Login', function () {
+                        //重新初始化信息
+                        console.log('onNetworkChanged Login');
+                        dappInit();
+                    }.bind(this));
+                })
+                // 获取用户信息 
+                const { err, res } = await dapp.userInfo()
+                if (err === null) {
+                    // 返回成功,见下面消息体
+                    console.log(res)
+                    GlobalD.Dapp.UserInfo = res;
+                    GameNet.getInstance().init(res.id, (data) => {
+                        console.log('GameNet:' + data);
+                    }, self);
+
+                    utils.get(utils.api.loginToken, { loginId: GlobalD.Dapp.UserInfo.id }, (res, value) => {
+                        if (value.code == 0) {
+                            /** 登录成功获取token */
+                            utils.setToken(value.data.token);
+                            /** 推送信息 */
+                            utils.get(utils.api.playerPullInfo, {}, (res, playerPullInfoTemp) => {
+                                let _playerData = JSON.parse(playerPullInfoTemp.data.playerData);
+                                //记录读取的数据到内存里面
+                                // 正常游戏
+                                userData.readData = _playerData;
+                                //跳转游戏
+                                cc.find("Canvas").getComponent("Login").loginButton();
+                            })
+                        } else {
+                            console.log(res, value);
+                        }
+                    })
+                } else {
+                    //TODO 服务错误
+                    console.log("dappInit userInfo 错误");
+                    console.log(err)
+                }
+
+            } catch (err) {
+                console.log('catch到的错误:'+err) // 初始化失败,运行环境不是钱包环境
+            }
+        }
+        //初始化调用 dappInit;
+        dappInit();
+    },
+
+    start() {
+
+    },
+
+    // update (dt) {},
+});

+ 9 - 0
assets/Script/Login/dapp.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "af9b5fea-b07e-490d-acc6-15eb03768571",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 7 - 0
assets/Script/Network.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "0b186d23-b487-47a1-aba4-5162d5ef909d",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 7 - 0
assets/Script/Network/Comming.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "2a98c049-7801-4626-a752-208cb7a7b985",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 4 - 0
assets/Script/Network/Comming/NotificationCenter.ts

@@ -0,0 +1,4 @@
+var NotificationCenter = new cc.EventTarget();
+
+//默认导出NotificationCenter
+export { NotificationCenter as default };

+ 9 - 0
assets/Script/Network/Comming/NotificationCenter.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "a6e71e1f-01d6-4c51-a90e-99b7bd37feb3",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 36 - 0
assets/Script/Network/GameNet.ts

@@ -0,0 +1,36 @@
+export default class GameNet{
+    private static instance: GameNet = null;
+    private ws: WebSocket = null;
+ 
+    private constructor(){}
+ 
+    public static getInstance(): GameNet{
+        if(GameNet.instance === null){
+            GameNet.instance = new GameNet();
+        }
+        return GameNet.instance;
+    }
+ 
+    public init(id, callback: Function, target: any){
+        if(this.ws != null)return;
+        // https://www.yuyekeji.cn/api_dapp/index 192.168.0.106:26001 
+        // wss://www.yuyekeji.cn/api_dapp/websocket/dappBack/
+        this.ws = new WebSocket(window['dappWss']+id);
+        this.ws.onopen = (event: Event)=>{
+            callback.call(target, "登录成功");
+        }
+ 
+        this.ws.onmessage = (event: MessageEvent)=>{
+            callback.call(target, event.data);
+        }
+
+        this.ws.onerror = function (e) {
+            console.error("WebSocket连接发生错误");
+        };
+    }
+ 
+    public sendMsg(data: string){
+        if(this.ws != null && this.ws.readyState != WebSocket.OPEN)return;
+        this.ws.send(data);
+    }
+}

+ 9 - 0
assets/Script/Network/GameNet.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "fc0b4aa3-bff1-4033-a70e-5442fc0fc944",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 213 - 0
assets/Script/Network/netUtils.ts

@@ -0,0 +1,213 @@
+
+import notifyCenter from "./Comming/NotificationCenter";
+
+
+// import CryptoJS  from "./encrypt/cryptojs";
+// import JSEncrypt from "./encrypt/jsencrypt";
+
+//通用工具函数类
+var utils = {
+    version: "0.15",
+
+    // baseUrl: "https://www.yuyekeji.cn/game/",
+    // baseUrl: "http://127.0.0.1:26001/api_dapp/game/",
+    // baseUrl: "https://www.yuyekeji.cn/api_dapp/game/",
+    baseUrl: window['dappHost']+'/api_dapp/game/',
+    
+    api: {
+        //获取public 和 系统设置
+        publicKeyAndSys :'comUsers/publicKeyAndSys',
+
+        loginToken: 'comUsers/loginToken',
+        //平台账户相关信息
+        userInfo: 'comUsers/getUserInfo',
+        //角色的信息和属性
+        playerInfo: 'comPlayers/getPlayerAndBattleAttribute',
+        playerPushInfo:'comPlayers/playerPushInfo',
+        playerPullInfo:'comPlayers/playerPullInfo',
+        
+       
+        //获取宝箱
+        getChest: 'comPlayerGoods/getChest',
+        //开启宝箱,获取一个装备
+        openChest: 'comPlayerGoods/openChest',
+        //穿戴装备
+        wearableEquip: 'comPlayerGoods/wearableEquip',
+
+    },
+    /** 登录获取的token */
+    token: null,
+    /** 后端RSA公钥 */
+    javaPublicKey: null,
+    /** api加密开关 */
+    sysApiEncrypt: null,
+    /** 设置token格式 */
+    setToken(value) {
+        this.token = "Bearer " + value;
+    },
+    setJavaPublicKeyAndSysApiEncrypt(javaPublicKey,sysApiEncrypt){
+        this.javaPublicKey = javaPublicKey;
+        this.sysApiEncrypt = sysApiEncrypt;
+    },
+    get(url, params, callback) {
+        let dataStr = '';
+        Object.keys(params).forEach(key => {
+            dataStr += key + '=' + encodeURIComponent(params[key]) + '&';
+        })
+        if (dataStr !== '') {
+            dataStr = dataStr.substr(0, dataStr.lastIndexOf('&'));
+            url = url + '?' + dataStr;
+        }
+        url = this.baseUrl + url;
+        let xhr = cc.loader.getXMLHttpRequest();
+        xhr.open("GET", url, true);
+        xhr.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
+        if (this.token) {
+            xhr.setRequestHeader("Authorization", this.token);
+        }
+        xhr.onreadystatechange = function () {
+            if (xhr.readyState === 4) {
+                let response = xhr.responseText;
+                if (xhr.status >= 200 && xhr.status < 300) {
+                    // let aesKeyS = aesUtil.genKey();
+                    // let encryptS = aesUtil.encrypt(response, aesKeyS);
+                    // let aesKeyE = rsaUtil.encrypt(aesKeyS, sessionStorage.getItem('javaPublicKey')),//后端RSA公钥加密后的AES的key
+                    // console.log('aesKeyS:',aesKeyS);
+                    // console.log('encryptS:',encryptS);
+                    // data = aesUtil.decrypt(data.data.data, rsaUtil.decrypt(data.data.aesKey, window.jsPrivateKey));
+
+                    let httpStatus = xhr.statusText;
+                    notifyCenter.emit("netSuccess", JSON.parse(response));
+                    callback(true, JSON.parse(response));
+                } else {
+                    callback(false, response);
+                    notifyCenter.emit("netError", JSON.parse(response));
+                }
+            }
+        };
+        xhr.send();
+    },
+
+    //Post请求
+    post(url, param, callback) {
+        url = this.baseUrl + url;
+        var xhr = cc.loader.getXMLHttpRequest();
+        let dataStr = '';
+        Object.keys(param).forEach(key => {
+            dataStr += key + '=' + encodeURIComponent(param[key]) + '&';
+        })
+        if (dataStr !== '') {
+            dataStr = dataStr.substr(0, dataStr.lastIndexOf('&'));
+        }
+        xhr.open("POST", url, true);
+        xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+        if (this.token) {
+            xhr.setRequestHeader("Authorization", this.token);
+        }
+        xhr.onreadystatechange = function () {
+            if (xhr.readyState === 4) {
+                let response = xhr.responseText;
+                if (xhr.status >= 200 && xhr.status < 300) {
+                    let httpStatus = xhr.statusText;
+                    notifyCenter.emit("netSuccess", JSON.parse(response));
+                    callback(true, JSON.parse(response));
+                } else {
+                    callback(false, response);
+                    notifyCenter.emit("netError", JSON.parse(response));
+                }
+            }
+        };
+        xhr.send(dataStr);
+    },
+
+    // getKey(){
+    //     let aesKey = aesUtil.genKey();
+    //     console.log('aesKey:',aesKey);
+    // }
+
+};
+
+
+/**
+ * 加解密操作简单封装一下
+ */
+// let aesUtil = {
+
+//     //获取key,
+//     genKey : function (length = 16) {
+//         let random = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+//         let str = "";
+//         for (let i = 0; i < length; i++) {
+//             str  = str + random.charAt(Math.random() * random.length)
+//         }
+//         return str;
+//     },
+
+//     //加密
+//     encrypt : function (plaintext,key) {
+//         if (plaintext instanceof Object) {
+//             //JSON.stringify
+//             plaintext = JSON.stringify(plaintext)
+//         }
+//         let encrypted = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(plaintext), CryptoJS.enc.Utf8.parse(key), {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
+//         return encrypted.toString();
+//     },
+
+//     //解密
+//     decrypt : function (ciphertext,key) {
+//         let decrypt = CryptoJS.AES.decrypt(ciphertext, CryptoJS.enc.Utf8.parse(key), {mode:CryptoJS.mode.ECB,padding: CryptoJS.pad.Pkcs7});
+//         let decString = CryptoJS.enc.Utf8.stringify(decrypt).toString();
+//         if(decString.charAt(0) === "{" || decString.charAt(0) === "[" ){
+//             //JSON.parse
+//             decString = JSON.parse(decString);
+//         }
+//         return decString;
+//     }
+// };
+// let rsaUtil = {
+//     //RSA 位数,这里要跟后端对应
+//     bits: 1024,
+
+//     //当前JSEncrypted对象
+//     thisKeyPair: {},
+
+//     //生成密钥对(公钥和私钥)
+//     genKeyPair: function (bits = rsaUtil.bits) {
+//         let genKeyPair = {};
+//         rsaUtil.thisKeyPair = new JSEncrypt({default_key_size: bits});
+
+//         //获取私钥
+//         genKeyPair.privateKey = rsaUtil.thisKeyPair.getPrivateKey();
+
+//         //获取公钥
+//         genKeyPair.publicKey = rsaUtil.thisKeyPair.getPublicKey();
+
+//         return genKeyPair;
+//     },
+
+//     //公钥加密
+//     encrypt: function (plaintext, publicKey) {
+//         if (plaintext instanceof Object) {
+//             //1、JSON.stringify
+//             plaintext = JSON.stringify(plaintext)
+//         }
+//         publicKey && rsaUtil.thisKeyPair.setPublicKey(publicKey);
+//         return rsaUtil.thisKeyPair.encrypt(plaintext);
+//     },
+
+//     //私钥解密
+//     decrypt: function (ciphertext, privateKey) {
+//         privateKey && rsaUtil.thisKeyPair.setPrivateKey(privateKey);
+//         let decString = rsaUtil.thisKeyPair.decrypt(ciphertext);
+//         if(decString.charAt(0) === "{" || decString.charAt(0) === "[" ){
+//             //JSON.parse
+//             decString = JSON.parse(decString);
+//         }
+//         return decString;
+//     }
+// };
+
+export { utils as default };
+
+
+

+ 9 - 0
assets/Script/Network/netUtils.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "c54fc0af-8b86-4dc9-b7a1-4fbe8b96210e",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 754 - 0
assets/Script/Network/runtime.js

@@ -0,0 +1,754 @@
+/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+var runtime = (function (exports) {
+  "use strict";
+
+  var Op = Object.prototype;
+  var hasOwn = Op.hasOwnProperty;
+  var undefined; // More compressible than void 0.
+  var $Symbol = typeof Symbol === "function" ? Symbol : {};
+  var iteratorSymbol = $Symbol.iterator || "@@iterator";
+  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
+  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
+
+  function define(obj, key, value) {
+    Object.defineProperty(obj, key, {
+      value: value,
+      enumerable: true,
+      configurable: true,
+      writable: true
+    });
+    return obj[key];
+  }
+  try {
+    // IE 8 has a broken Object.defineProperty that only works on DOM objects.
+    define({}, "");
+  } catch (err) {
+    define = function(obj, key, value) {
+      return obj[key] = value;
+    };
+  }
+
+  function wrap(innerFn, outerFn, self, tryLocsList) {
+    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
+    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
+    var generator = Object.create(protoGenerator.prototype);
+    var context = new Context(tryLocsList || []);
+
+    // The ._invoke method unifies the implementations of the .next,
+    // .throw, and .return methods.
+    generator._invoke = makeInvokeMethod(innerFn, self, context);
+
+    return generator;
+  }
+  exports.wrap = wrap;
+
+  // Try/catch helper to minimize deoptimizations. Returns a completion
+  // record like context.tryEntries[i].completion. This interface could
+  // have been (and was previously) designed to take a closure to be
+  // invoked without arguments, but in all the cases we care about we
+  // already have an existing method we want to call, so there's no need
+  // to create a new function object. We can even get away with assuming
+  // the method takes exactly one argument, since that happens to be true
+  // in every case, so we don't have to touch the arguments object. The
+  // only additional allocation required is the completion record, which
+  // has a stable shape and so hopefully should be cheap to allocate.
+  function tryCatch(fn, obj, arg) {
+    try {
+      return { type: "normal", arg: fn.call(obj, arg) };
+    } catch (err) {
+      return { type: "throw", arg: err };
+    }
+  }
+
+  var GenStateSuspendedStart = "suspendedStart";
+  var GenStateSuspendedYield = "suspendedYield";
+  var GenStateExecuting = "executing";
+  var GenStateCompleted = "completed";
+
+  // Returning this object from the innerFn has the same effect as
+  // breaking out of the dispatch switch statement.
+  var ContinueSentinel = {};
+
+  // Dummy constructor functions that we use as the .constructor and
+  // .constructor.prototype properties for functions that return Generator
+  // objects. For full spec compliance, you may wish to configure your
+  // minifier not to mangle the names of these two functions.
+  function Generator() {}
+  function GeneratorFunction() {}
+  function GeneratorFunctionPrototype() {}
+
+  // This is a polyfill for %IteratorPrototype% for environments that
+  // don't natively support it.
+  var IteratorPrototype = {};
+  define(IteratorPrototype, iteratorSymbol, function () {
+    return this;
+  });
+
+  var getProto = Object.getPrototypeOf;
+  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
+  if (NativeIteratorPrototype &&
+      NativeIteratorPrototype !== Op &&
+      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
+    // This environment has a native %IteratorPrototype%; use it instead
+    // of the polyfill.
+    IteratorPrototype = NativeIteratorPrototype;
+  }
+
+  var Gp = GeneratorFunctionPrototype.prototype =
+    Generator.prototype = Object.create(IteratorPrototype);
+  GeneratorFunction.prototype = GeneratorFunctionPrototype;
+  define(Gp, "constructor", GeneratorFunctionPrototype);
+  define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
+  GeneratorFunction.displayName = define(
+    GeneratorFunctionPrototype,
+    toStringTagSymbol,
+    "GeneratorFunction"
+  );
+
+  // Helper for defining the .next, .throw, and .return methods of the
+  // Iterator interface in terms of a single ._invoke method.
+  function defineIteratorMethods(prototype) {
+    ["next", "throw", "return"].forEach(function(method) {
+      define(prototype, method, function(arg) {
+        return this._invoke(method, arg);
+      });
+    });
+  }
+
+  exports.isGeneratorFunction = function(genFun) {
+    var ctor = typeof genFun === "function" && genFun.constructor;
+    return ctor
+      ? ctor === GeneratorFunction ||
+        // For the native GeneratorFunction constructor, the best we can
+        // do is to check its .name property.
+        (ctor.displayName || ctor.name) === "GeneratorFunction"
+      : false;
+  };
+
+  exports.mark = function(genFun) {
+    if (Object.setPrototypeOf) {
+      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+    } else {
+      genFun.__proto__ = GeneratorFunctionPrototype;
+      define(genFun, toStringTagSymbol, "GeneratorFunction");
+    }
+    genFun.prototype = Object.create(Gp);
+    return genFun;
+  };
+
+  // Within the body of any async function, `await x` is transformed to
+  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+  // `hasOwn.call(value, "__await")` to determine if the yielded value is
+  // meant to be awaited.
+  exports.awrap = function(arg) {
+    return { __await: arg };
+  };
+
+  function AsyncIterator(generator, PromiseImpl) {
+    function invoke(method, arg, resolve, reject) {
+      var record = tryCatch(generator[method], generator, arg);
+      if (record.type === "throw") {
+        reject(record.arg);
+      } else {
+        var result = record.arg;
+        var value = result.value;
+        if (value &&
+            typeof value === "object" &&
+            hasOwn.call(value, "__await")) {
+          return PromiseImpl.resolve(value.__await).then(function(value) {
+            invoke("next", value, resolve, reject);
+          }, function(err) {
+            invoke("throw", err, resolve, reject);
+          });
+        }
+
+        return PromiseImpl.resolve(value).then(function(unwrapped) {
+          // When a yielded Promise is resolved, its final value becomes
+          // the .value of the Promise<{value,done}> result for the
+          // current iteration.
+          result.value = unwrapped;
+          resolve(result);
+        }, function(error) {
+          // If a rejected Promise was yielded, throw the rejection back
+          // into the async generator function so it can be handled there.
+          return invoke("throw", error, resolve, reject);
+        });
+      }
+    }
+
+    var previousPromise;
+
+    function enqueue(method, arg) {
+      function callInvokeWithMethodAndArg() {
+        return new PromiseImpl(function(resolve, reject) {
+          invoke(method, arg, resolve, reject);
+        });
+      }
+
+      return previousPromise =
+        // If enqueue has been called before, then we want to wait until
+        // all previous Promises have been resolved before calling invoke,
+        // so that results are always delivered in the correct order. If
+        // enqueue has not been called before, then it is important to
+        // call invoke immediately, without waiting on a callback to fire,
+        // so that the async generator function has the opportunity to do
+        // any necessary setup in a predictable way. This predictability
+        // is why the Promise constructor synchronously invokes its
+        // executor callback, and why async functions synchronously
+        // execute code before the first await. Since we implement simple
+        // async functions in terms of async generators, it is especially
+        // important to get this right, even though it requires care.
+        previousPromise ? previousPromise.then(
+          callInvokeWithMethodAndArg,
+          // Avoid propagating failures to Promises returned by later
+          // invocations of the iterator.
+          callInvokeWithMethodAndArg
+        ) : callInvokeWithMethodAndArg();
+    }
+
+    // Define the unified helper method that is used to implement .next,
+    // .throw, and .return (see defineIteratorMethods).
+    this._invoke = enqueue;
+  }
+
+  defineIteratorMethods(AsyncIterator.prototype);
+  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
+    return this;
+  });
+  exports.AsyncIterator = AsyncIterator;
+
+  // Note that simple async functions are implemented on top of
+  // AsyncIterator objects; they just return a Promise for the value of
+  // the final result produced by the iterator.
+  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
+    if (PromiseImpl === void 0) PromiseImpl = Promise;
+
+    var iter = new AsyncIterator(
+      wrap(innerFn, outerFn, self, tryLocsList),
+      PromiseImpl
+    );
+
+    return exports.isGeneratorFunction(outerFn)
+      ? iter // If outerFn is a generator, return the full iterator.
+      : iter.next().then(function(result) {
+          return result.done ? result.value : iter.next();
+        });
+  };
+
+  function makeInvokeMethod(innerFn, self, context) {
+    var state = GenStateSuspendedStart;
+
+    return function invoke(method, arg) {
+      if (state === GenStateExecuting) {
+        throw new Error("Generator is already running");
+      }
+
+      if (state === GenStateCompleted) {
+        if (method === "throw") {
+          throw arg;
+        }
+
+        // Be forgiving, per 25.3.3.3.3 of the spec:
+        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+        return doneResult();
+      }
+
+      context.method = method;
+      context.arg = arg;
+
+      while (true) {
+        var delegate = context.delegate;
+        if (delegate) {
+          var delegateResult = maybeInvokeDelegate(delegate, context);
+          if (delegateResult) {
+            if (delegateResult === ContinueSentinel) continue;
+            return delegateResult;
+          }
+        }
+
+        if (context.method === "next") {
+          // Setting context._sent for legacy support of Babel's
+          // function.sent implementation.
+          context.sent = context._sent = context.arg;
+
+        } else if (context.method === "throw") {
+          if (state === GenStateSuspendedStart) {
+            state = GenStateCompleted;
+            throw context.arg;
+          }
+
+          context.dispatchException(context.arg);
+
+        } else if (context.method === "return") {
+          context.abrupt("return", context.arg);
+        }
+
+        state = GenStateExecuting;
+
+        var record = tryCatch(innerFn, self, context);
+        if (record.type === "normal") {
+          // If an exception is thrown from innerFn, we leave state ===
+          // GenStateExecuting and loop back for another invocation.
+          state = context.done
+            ? GenStateCompleted
+            : GenStateSuspendedYield;
+
+          if (record.arg === ContinueSentinel) {
+            continue;
+          }
+
+          return {
+            value: record.arg,
+            done: context.done
+          };
+
+        } else if (record.type === "throw") {
+          state = GenStateCompleted;
+          // Dispatch the exception by looping back around to the
+          // context.dispatchException(context.arg) call above.
+          context.method = "throw";
+          context.arg = record.arg;
+        }
+      }
+    };
+  }
+
+  // Call delegate.iterator[context.method](context.arg) and handle the
+  // result, either by returning a { value, done } result from the
+  // delegate iterator, or by modifying context.method and context.arg,
+  // setting context.delegate to null, and returning the ContinueSentinel.
+  function maybeInvokeDelegate(delegate, context) {
+    var method = delegate.iterator[context.method];
+    if (method === undefined) {
+      // A .throw or .return when the delegate iterator has no .throw
+      // method always terminates the yield* loop.
+      context.delegate = null;
+
+      if (context.method === "throw") {
+        // Note: ["return"] must be used for ES3 parsing compatibility.
+        if (delegate.iterator["return"]) {
+          // If the delegate iterator has a return method, give it a
+          // chance to clean up.
+          context.method = "return";
+          context.arg = undefined;
+          maybeInvokeDelegate(delegate, context);
+
+          if (context.method === "throw") {
+            // If maybeInvokeDelegate(context) changed context.method from
+            // "return" to "throw", let that override the TypeError below.
+            return ContinueSentinel;
+          }
+        }
+
+        context.method = "throw";
+        context.arg = new TypeError(
+          "The iterator does not provide a 'throw' method");
+      }
+
+      return ContinueSentinel;
+    }
+
+    var record = tryCatch(method, delegate.iterator, context.arg);
+
+    if (record.type === "throw") {
+      context.method = "throw";
+      context.arg = record.arg;
+      context.delegate = null;
+      return ContinueSentinel;
+    }
+
+    var info = record.arg;
+
+    if (! info) {
+      context.method = "throw";
+      context.arg = new TypeError("iterator result is not an object");
+      context.delegate = null;
+      return ContinueSentinel;
+    }
+
+    if (info.done) {
+      // Assign the result of the finished delegate to the temporary
+      // variable specified by delegate.resultName (see delegateYield).
+      context[delegate.resultName] = info.value;
+
+      // Resume execution at the desired location (see delegateYield).
+      context.next = delegate.nextLoc;
+
+      // If context.method was "throw" but the delegate handled the
+      // exception, let the outer generator proceed normally. If
+      // context.method was "next", forget context.arg since it has been
+      // "consumed" by the delegate iterator. If context.method was
+      // "return", allow the original .return call to continue in the
+      // outer generator.
+      if (context.method !== "return") {
+        context.method = "next";
+        context.arg = undefined;
+      }
+
+    } else {
+      // Re-yield the result returned by the delegate method.
+      return info;
+    }
+
+    // The delegate iterator is finished, so forget it and continue with
+    // the outer generator.
+    context.delegate = null;
+    return ContinueSentinel;
+  }
+
+  // Define Generator.prototype.{next,throw,return} in terms of the
+  // unified ._invoke helper method.
+  defineIteratorMethods(Gp);
+
+  define(Gp, toStringTagSymbol, "Generator");
+
+  // A Generator should always return itself as the iterator object when the
+  // @@iterator function is called on it. Some browsers' implementations of the
+  // iterator prototype chain incorrectly implement this, causing the Generator
+  // object to not be returned from this call. This ensures that doesn't happen.
+  // See https://github.com/facebook/regenerator/issues/274 for more details.
+  define(Gp, iteratorSymbol, function() {
+    return this;
+  });
+
+  define(Gp, "toString", function() {
+    return "[object Generator]";
+  });
+
+  function pushTryEntry(locs) {
+    var entry = { tryLoc: locs[0] };
+
+    if (1 in locs) {
+      entry.catchLoc = locs[1];
+    }
+
+    if (2 in locs) {
+      entry.finallyLoc = locs[2];
+      entry.afterLoc = locs[3];
+    }
+
+    this.tryEntries.push(entry);
+  }
+
+  function resetTryEntry(entry) {
+    var record = entry.completion || {};
+    record.type = "normal";
+    delete record.arg;
+    entry.completion = record;
+  }
+
+  function Context(tryLocsList) {
+    // The root entry object (effectively a try statement without a catch
+    // or a finally block) gives us a place to store values thrown from
+    // locations where there is no enclosing try statement.
+    this.tryEntries = [{ tryLoc: "root" }];
+    tryLocsList.forEach(pushTryEntry, this);
+    this.reset(true);
+  }
+
+  exports.keys = function(object) {
+    var keys = [];
+    for (var key in object) {
+      keys.push(key);
+    }
+    keys.reverse();
+
+    // Rather than returning an object with a next method, we keep
+    // things simple and return the next function itself.
+    return function next() {
+      while (keys.length) {
+        var key = keys.pop();
+        if (key in object) {
+          next.value = key;
+          next.done = false;
+          return next;
+        }
+      }
+
+      // To avoid creating an additional object, we just hang the .value
+      // and .done properties off the next function object itself. This
+      // also ensures that the minifier will not anonymize the function.
+      next.done = true;
+      return next;
+    };
+  };
+
+  function values(iterable) {
+    if (iterable) {
+      var iteratorMethod = iterable[iteratorSymbol];
+      if (iteratorMethod) {
+        return iteratorMethod.call(iterable);
+      }
+
+      if (typeof iterable.next === "function") {
+        return iterable;
+      }
+
+      if (!isNaN(iterable.length)) {
+        var i = -1, next = function next() {
+          while (++i < iterable.length) {
+            if (hasOwn.call(iterable, i)) {
+              next.value = iterable[i];
+              next.done = false;
+              return next;
+            }
+          }
+
+          next.value = undefined;
+          next.done = true;
+
+          return next;
+        };
+
+        return next.next = next;
+      }
+    }
+
+    // Return an iterator with no values.
+    return { next: doneResult };
+  }
+  exports.values = values;
+
+  function doneResult() {
+    return { value: undefined, done: true };
+  }
+
+  Context.prototype = {
+    constructor: Context,
+
+    reset: function(skipTempReset) {
+      this.prev = 0;
+      this.next = 0;
+      // Resetting context._sent for legacy support of Babel's
+      // function.sent implementation.
+      this.sent = this._sent = undefined;
+      this.done = false;
+      this.delegate = null;
+
+      this.method = "next";
+      this.arg = undefined;
+
+      this.tryEntries.forEach(resetTryEntry);
+
+      if (!skipTempReset) {
+        for (var name in this) {
+          // Not sure about the optimal order of these conditions:
+          if (name.charAt(0) === "t" &&
+              hasOwn.call(this, name) &&
+              !isNaN(+name.slice(1))) {
+            this[name] = undefined;
+          }
+        }
+      }
+    },
+
+    stop: function() {
+      this.done = true;
+
+      var rootEntry = this.tryEntries[0];
+      var rootRecord = rootEntry.completion;
+      if (rootRecord.type === "throw") {
+        throw rootRecord.arg;
+      }
+
+      return this.rval;
+    },
+
+    dispatchException: function(exception) {
+      if (this.done) {
+        throw exception;
+      }
+
+      var context = this;
+      function handle(loc, caught) {
+        record.type = "throw";
+        record.arg = exception;
+        context.next = loc;
+
+        if (caught) {
+          // If the dispatched exception was caught by a catch block,
+          // then let that catch block handle the exception normally.
+          context.method = "next";
+          context.arg = undefined;
+        }
+
+        return !! caught;
+      }
+
+      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+        var entry = this.tryEntries[i];
+        var record = entry.completion;
+
+        if (entry.tryLoc === "root") {
+          // Exception thrown outside of any try block that could handle
+          // it, so set the completion value of the entire function to
+          // throw the exception.
+          return handle("end");
+        }
+
+        if (entry.tryLoc <= this.prev) {
+          var hasCatch = hasOwn.call(entry, "catchLoc");
+          var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+          if (hasCatch && hasFinally) {
+            if (this.prev < entry.catchLoc) {
+              return handle(entry.catchLoc, true);
+            } else if (this.prev < entry.finallyLoc) {
+              return handle(entry.finallyLoc);
+            }
+
+          } else if (hasCatch) {
+            if (this.prev < entry.catchLoc) {
+              return handle(entry.catchLoc, true);
+            }
+
+          } else if (hasFinally) {
+            if (this.prev < entry.finallyLoc) {
+              return handle(entry.finallyLoc);
+            }
+
+          } else {
+            throw new Error("try statement without catch or finally");
+          }
+        }
+      }
+    },
+
+    abrupt: function(type, arg) {
+      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+        var entry = this.tryEntries[i];
+        if (entry.tryLoc <= this.prev &&
+            hasOwn.call(entry, "finallyLoc") &&
+            this.prev < entry.finallyLoc) {
+          var finallyEntry = entry;
+          break;
+        }
+      }
+
+      if (finallyEntry &&
+          (type === "break" ||
+           type === "continue") &&
+          finallyEntry.tryLoc <= arg &&
+          arg <= finallyEntry.finallyLoc) {
+        // Ignore the finally entry if control is not jumping to a
+        // location outside the try/catch block.
+        finallyEntry = null;
+      }
+
+      var record = finallyEntry ? finallyEntry.completion : {};
+      record.type = type;
+      record.arg = arg;
+
+      if (finallyEntry) {
+        this.method = "next";
+        this.next = finallyEntry.finallyLoc;
+        return ContinueSentinel;
+      }
+
+      return this.complete(record);
+    },
+
+    complete: function(record, afterLoc) {
+      if (record.type === "throw") {
+        throw record.arg;
+      }
+
+      if (record.type === "break" ||
+          record.type === "continue") {
+        this.next = record.arg;
+      } else if (record.type === "return") {
+        this.rval = this.arg = record.arg;
+        this.method = "return";
+        this.next = "end";
+      } else if (record.type === "normal" && afterLoc) {
+        this.next = afterLoc;
+      }
+
+      return ContinueSentinel;
+    },
+
+    finish: function(finallyLoc) {
+      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+        var entry = this.tryEntries[i];
+        if (entry.finallyLoc === finallyLoc) {
+          this.complete(entry.completion, entry.afterLoc);
+          resetTryEntry(entry);
+          return ContinueSentinel;
+        }
+      }
+    },
+
+    "catch": function(tryLoc) {
+      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+        var entry = this.tryEntries[i];
+        if (entry.tryLoc === tryLoc) {
+          var record = entry.completion;
+          if (record.type === "throw") {
+            var thrown = record.arg;
+            resetTryEntry(entry);
+          }
+          return thrown;
+        }
+      }
+
+      // The context.catch method must only be called with a location
+      // argument that corresponds to a known catch block.
+      throw new Error("illegal catch attempt");
+    },
+
+    delegateYield: function(iterable, resultName, nextLoc) {
+      this.delegate = {
+        iterator: values(iterable),
+        resultName: resultName,
+        nextLoc: nextLoc
+      };
+
+      if (this.method === "next") {
+        // Deliberately forget the last sent value so that we don't
+        // accidentally pass it on to the delegate.
+        this.arg = undefined;
+      }
+
+      return ContinueSentinel;
+    }
+  };
+
+  // Regardless of whether this script is executing as a CommonJS module
+  // or not, return the runtime object so that we can declare the variable
+  // regeneratorRuntime in the outer scope, which allows this module to be
+  // injected easily by `bin/regenerator --include-runtime script.js`.
+  return exports;
+
+}(
+  // If this script is executing as a CommonJS module, use module.exports
+  // as the regeneratorRuntime namespace. Otherwise create a new empty
+  // object. Either way, the resulting object will be used to initialize
+  // the regeneratorRuntime variable at the top of this file.
+  typeof module === "object" ? module.exports : {}
+));
+
+try {
+  regeneratorRuntime = runtime;
+} catch (accidentalStrictMode) {
+  // This module should not be running in strict mode, so the above
+  // assignment should always work unless something is misconfigured. Just
+  // in case runtime.js accidentally runs in strict mode, in modern engines
+  // we can explicitly access globalThis. In older engines we can escape
+  // strict mode using a global Function call. This could conceivably fail
+  // if a Content Security Policy forbids using Function, but in that case
+  // the proper solution is to fix the accidental strict mode problem. If
+  // you've misconfigured your bundler to force strict mode and applied a
+  // CSP to forbid Function, and you're not willing to fix either of those
+  // problems, please detail your unique predicament in a GitHub issue.
+  if (typeof globalThis === "object") {
+    globalThis.regeneratorRuntime = runtime;
+  } else {
+    Function("r", "regeneratorRuntime = r")(runtime);
+  }
+}

+ 9 - 0
assets/Script/Network/runtime.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "e7878014-13b7-4a18-bf55-a51810633914",
+  "isPlugin": true,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 5 - 4
assets/Script/UI/BuildingView.js

@@ -97,8 +97,9 @@ cc.Class({
         this.HiddenAll();
         //面板设置index
         //环境
+        let posY = -5;
         if ('0' == index) {
-            this.EvnBtn.y = -30;
+            this.EvnBtn.y = posY;
             this.EvnBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Env_Sprite;
             this.Env.active = true;
             this.SelectedFrame.parent = this.Building00;
@@ -110,7 +111,7 @@ cc.Class({
         }
         //劳动 
         else if ('1' == index) {
-            this.LabourBtn.y = -30;
+            this.LabourBtn.y = posY;
             this.LabourBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Labour_Sprite;
             this.Labour.active = true;
             this.SelectedFrame.parent = this.Building10;
@@ -120,7 +121,7 @@ cc.Class({
         }
         //商铺
         else if ('2' == index) {
-            this.ShopBtn.y = -30;
+            this.ShopBtn.y = posY;
             this.ShopBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Shop_Sprite;
             this.Shop.active = true;
             this.SelectedFrame.parent = this.Building20;
@@ -129,7 +130,7 @@ cc.Class({
             this.ShopBtn.setSiblingIndex(10);
 
         } else if ('3' == index) {
-            this.SpeBuildingBtn.y = -30;
+            this.SpeBuildingBtn.y = posY;
             this.SpeBuildingBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Spe_Sprite;
             this.SpeBuilding.active = true;
             this.SelectedFrame.parent = this.Building30;

+ 73 - 11
assets/Script/UI/Content_Button.js

@@ -1,7 +1,17 @@
+/**
+ * 货币类型,游戏币为默认
+ */
+var CurrencyType = cc.Enum({
+    GAME: 0,
+    CNT: 1,
+    SNB: 2
+});
+
 cc.Class({
     extends: cc.Component,
 
     properties: {
+
         Name: {
             default: '',
             tooltip: '建筑名称',
@@ -12,14 +22,34 @@ cc.Class({
         },
         DiamondPrice: {
             default: 1,
-            type:cc.Integer,
+            type: cc.Integer,
             tooltip: '需要钻石的价格',
         },
+
+        CNT: {
+            default: '',
+            tooltip: '需要CNT货币的价格',
+        },
+
+        SNB: {
+            default: '',
+            tooltip: '需要SNB货币的价格',
+        },
+
         Synopsis: {
             default: '',
             tooltip: '简介',
         },
 
+        //消耗的货币类型,默认是游戏币
+        consumeType: {
+            default: CurrencyType.GAME,
+            type: cc.Enum(CurrencyType),
+            tooltip: '需要消耗的货币类型',
+        },
+
+
+
         clickEvents: {
             default: [],
             type: cc.Component.EventHandler,
@@ -27,27 +57,59 @@ cc.Class({
         }
     },
     onPressed() {
-
+        //建筑数量为零,也不需要提示购买
         let NameNode = this.node.getChildByName('Name');
         if (NameNode) {
             let Num = NameNode.getChildByName('Num');
-
             if (Num) {
                 let NumLabel = Num.getComponent(cc.Label);
-                // cc.log('NumLabel='+NumLabel.string);
                 if (parseInt(NumLabel.string) < 1) {
-
-                    //this is Content_Button
-                    GlobalD.game._ManageUIScript.onPurchaseTips(this);
+                
+                    switch (this.consumeType) {
+                        /**
+                         * todo 目前只有特殊购买开放购买
+                         */
+                        case CurrencyType.CNT:
+                        case CurrencyType.SNB:
+                            console.warn("Content_Button 不需要购买!");
+                            // GlobalD.game._ManageUIScript.onPurchaseTips(this);
+                            break;
+                        default:
+                            console.warn("Content_Button 不需要购买!");
+                            break;
+                    }
+                    // GlobalD.game._ManageUIScript.onPurchaseTips(this);
                     return;
                 }
             }
         }
-        // GlobalD.game._ManageUIScript.onPurchaseTips(this.node.name);
-        // return;
-        GlobalD.game._ManageUIScript.onSetButtonState({ Target: this }, { Name: this.Name, Price: this.Price, Synopsis: this.Synopsis });
+        let item = { Name: this.Name, Price: this.Price, Synopsis: this.Synopsis };
+        switch (this.consumeType) {
+            case CurrencyType.CNT:
+                item.Price = this.CNT;
+                break;
+            case CurrencyType.SNB:
+                item.Price = this.SNB;
+                break;
+            default:
+                item.Price = this.Price;
+                break;
+        }
+        GlobalD.game._ManageUIScript.onSetButtonState({ Target: this },item);
     },
     onPressedInfo(event, customEventData) {
-        GlobalD.game._ManageUIScript.onSetButtonInfoState({ Target: this }, { Name: this.Name, Price: this.Price, Synopsis: this.Synopsis });
+        let item = { Name: this.Name, Price: this.Price, Synopsis: this.Synopsis };
+        switch (this.consumeType) {
+            case CurrencyType.CNT:
+                item.Price = this.CNT;
+                break;
+            case CurrencyType.SNB:
+                item.Price = this.SNB;
+                break;
+            default:
+                item.Price = this.Price;
+                break;
+        }
+        GlobalD.game._ManageUIScript.onSetButtonInfoState({ Target: this }, item );
     }
 });

+ 49 - 0
assets/Script/UI/Content_seed.js

@@ -0,0 +1,49 @@
+
+var reGameStates = require('GameStates');
+
+
+cc.Class({
+    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,
+        },
+
+    },
+
+
+    onCreateSeed() {
+        let seedTemp = cc.instantiate(this.SeedPrefab);
+        // console.log(seedTemp);
+        //获取对应的信息,设置不同的种子
+        let _ManageSeedNode = seedTemp.getComponent("ManageSeedNode");
+        _ManageSeedNode.seedName = this.Name;
+        _ManageSeedNode.seedType = this.seedType;
+
+        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();
+    },
+
+});

+ 9 - 0
assets/Script/UI/Content_seed.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "22ed8de4-56fe-4a79-94bb-bafdaeeafc3b",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 19 - 1
assets/Script/UI/ManageBuildings.js

@@ -65,6 +65,12 @@ cc.Class({
             type: cc.Prefab,
             serializable: true,
         },
+        //神农专用农田
+        Labour_205_Holy_Farmland: {
+            default: null,
+            type: cc.Prefab,
+            serializable: true,
+        },
         //一级
         // 冷饮摊
         Shops_30101_ColdDrinkStall: {
@@ -229,6 +235,10 @@ cc.Class({
         else if ('204' == index) {
             housing = cc.instantiate(this.Labour_204_Factory);
         }
+        //神农专用农田
+        else if ('205' == index) {
+            housing = cc.instantiate(this.Labour_205_Holy_Farmland);
+        }
         //冷饮摊
         else if ('30101' == index) {
             housing = cc.instantiate(this.Shops_30101_ColdDrinkStall);
@@ -360,7 +370,7 @@ cc.Class({
         let BuildingNumArray = GlobalD.GameData.GetBuildingNumArray();
         // cc.log('BuildingNumArray',BuildingNumArray)
         for (let i = 3; i < this.BuildingArray.length; i++) {
-            // cc.log('this.BuildingArray[i]='+this.BuildingArray[i].getChildByName('Name').getComponent(cc.Label).string);
+            // cc.log('this.BuildingArray['+i+']='+this.BuildingArray[i].getChildByName('Name').getComponent(cc.Label).string);
             this.BuildingArray[i].getChildByName('Name').getChildByName('Num').getComponent(cc.Label).string = BuildingNumArray[i];
         }
 
@@ -548,6 +558,10 @@ cc.Class({
         else if (HouseName == 'Labour_204_Factory') {
             housing = cc.instantiate(this.Labour_204_Factory);
         }
+        //神农专用农田
+        else if (HouseName == 'Labour_205_Holy_Farmland') {
+            housing = cc.instantiate(this.Labour_205_Holy_Farmland);
+        }
         //特殊建筑
         else if (HouseName == 'Spe_401_StreetLamp') {
             housing = cc.instantiate(this.Spe_401_StreetLamp);
@@ -651,6 +665,10 @@ cc.Class({
         else if ('204' == index) {
             buildingName = 'Labour_204_Factory';
         }
+        //神农专用农田
+        else if ('205' == index) {
+            buildingName = 'Labour_205_Holy_Farmland';
+        }
         //冷饮摊
         else if ('30101' == index) {
             buildingName = 'Shops_30101_ColdDrinkStall';

+ 156 - 0
assets/Script/UI/ManageSeedNode.js

@@ -0,0 +1,156 @@
+
+var reGameStates = require('GameStates');
+
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        seedType: {
+            default: reGameStates.SeedType.Normal,
+            type: cc.Enum(reGameStates.SeedType),
+        },
+        seedName:{
+            default: ''
+        },
+        _EndPosition: {
+            default: new cc.Vec2(),
+            serializable: false,
+            visible: false,
+        },
+        labelTip: {
+            default: null,
+            type: cc.Label,
+        },
+        labelTipString: {
+            default: '移动可拆除对应建筑',
+        },
+        //记录节点
+        targetBuildingsInfo: { default: null, visible: false },
+
+        //移除的提示预制
+        removeTipPrefab: { default: null, type: cc.Prefab },
+
+        //记录要删除的节点
+        selectedTarget: { default: [], type: cc.Node, visible: false },
+        //记录选中的index
+        selectedTargetIndex: { default: [], type: cc.Integer, visible: false },
+
+        isMoveState: { default: true, visible: false },
+
+        MoveStartNode: cc.Node,
+        MoveEndNode: cc.Node,
+    },
+
+    // LIFE-CYCLE CALLBACKS:
+
+    // onLoad () {},
+
+    start() {
+
+        //获取对应的地图层级
+        this.buildLayer = GlobalD.TiledMap._tiledMap.getLayer('BuildsHighway');
+
+        GlobalD.game._ManageUIScript.onBottomMenuView(false);
+
+        var self = this;
+        self._MainCamera = GlobalD.game.MainCamera;
+        self._tiledMap = GlobalD.TiledMap._tiledMap;
+        //获取最后建造公路的层级
+        self.HighwayLayer = self._tiledMap.getLayer('Highway');
+        self._game = GlobalD.game;
+
+        //初始化时候设置一下位置
+        //后面只要点击生成铺路就需要重置一下
+        let startTiledPos = GlobalD.TiledMap._tilePosFromLocation(self.node.getPosition());
+        let startEndPos = GlobalD.TiledMap._getTheMiddleLocationFromtilePos(startTiledPos);
+        self.node.setPosition(startEndPos);
+        self._EndPosition = startTiledPos;
+
+        if (reGameStates.SeedType.Normal === self.seedType) {
+            //锤子类型
+            let startIndex = GlobalD.TiledMap.getIndex(startTiledPos);
+            let _targetBuildingsInfo = GlobalD.game.onGetBuildingsTiledMapUnitFromIndex(startIndex);
+            if (_targetBuildingsInfo) {
+                self.labelTip.string = '播种到' + _targetBuildingsInfo.buildInfo.buildingName + '上';
+                self.targetBuildingsInfo = _targetBuildingsInfo;
+            }
+            else {
+                self.labelTip.string = self.labelTipString;
+                self.targetBuildingsInfo = null;
+            }
+        } 
+
+
+
+        self.node.on(cc.Node.EventType.TOUCH_MOVE, function (event) {
+            GlobalD.GameControl._isBuildingMove = true;
+            var delta = event.touch.getDelta();
+            self._touchPosition.x += delta.x / self._MainCamera.zoomRatio;
+            self._touchPosition.y += delta.y / self._MainCamera.zoomRatio;
+            let tiledPos = GlobalD.TiledMap._tilePosFromLocation(self._touchPosition);
+            // //不相等的时候才绘制
+            if (tiledPos.sub(self._EndPosition).mag() != 0) {
+                self._EndPosition = tiledPos;
+                self._SelectHighwayTiled(tiledPos);
+
+            }
+        }, self.node);
+
+        self.node.on(cc.Node.EventType.TOUCH_START, function (event) {
+            self.isMoving = true;
+            self._touchPosition = self.node.getPosition();
+        }, self.node);
+
+        self.node.on(cc.Node.EventType.TOUCH_END, function (event) {
+            //起始触摸位置
+            GlobalD.GameControl._isBuildingMove = false;
+            let buildIndex = GlobalD.TiledMap.getIndex(self._EndPosition);
+            let _targetBuildingsInfo = GlobalD.game.onGetBuildingsTiledMapUnitFromIndex(buildIndex);
+            if (_targetBuildingsInfo) {
+                self.labelTip.string = '播种到' + _targetBuildingsInfo.buildInfo.buildingName + '上';
+                self.targetBuildingsInfo = _targetBuildingsInfo;
+            }
+            else {
+                self.labelTip.string = self.labelTipString;
+                self.targetBuildingsInfo = null;
+            }
+
+        }, self.node);
+        self.node.on(cc.Node.EventType.TOUCH_CANCEL, function (event) {
+            //起始触摸位置
+            GlobalD.GameControl._isBuildingMove = false;
+        }, self.node);
+
+
+    },
+    onCancleSelf() {
+        this.node.active = false;
+
+        GlobalD.game._ManageUIScript.onBottomMenuView(true);
+    },
+    //播种
+    onSowOnTheGround(){
+        //调用土地相关
+        if (!this.targetBuildingsInfo) return;
+        // cc.log('this.targetBuildingsInfo', this.targetBuildingsInfo)
+        // this.targetBuildingsInfo.onClearSelfResetFromType();
+
+        //面板种子消耗减少1
+        console.log('种子减少的类型名字',this.seedName);
+        GlobalD.game.MuinusBuilding(this.seedName);
+        this.targetBuildingsInfo.onInitHolyFarmlandSeedFromGrow();
+       
+        //隐藏种子和显示UI
+        this.node.active = false;
+        GlobalD.game._ManageUIScript.onBottomMenuView(true);
+    },
+
+    _SelectHighwayTiled(tiledPos) {
+
+        let endPos = GlobalD.TiledMap._getTheMiddleLocationFromtilePos(tiledPos);
+        this.node.setPosition(endPos);
+
+    }
+  
+
+});

+ 9 - 0
assets/Script/UI/ManageSeedNode.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "6fe23b03-4c0b-4669-92a9-a9fad33e0a69",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 7 - 0
assets/Script/adpp.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "6fc982b6-6fa6-4cad-bfb9-767022927c0c",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 99 - 0
assets/Script/adpp/inviteInfo.js

@@ -0,0 +1,99 @@
+// Learn cc.Class:
+//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/class.html
+//  - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/class.html
+// Learn Attribute:
+//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
+//  - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
+//  - [English] https://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
+
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        myInviteValue: {
+            default: null,
+            type: cc.Label // optional, default is typeof default
+        },
+        parentInviteValue: {
+            default: null,
+            type: cc.Label // optional, default is typeof default
+        },
+        inputInviteValue:'',
+    },
+
+    // LIFE-CYCLE CALLBACKS:
+
+    // onLoad () {},
+
+    start() {
+
+        this.myInviteValue.string = GlobalD.Dapp.UserInfo.invite_code;
+
+        if (GlobalD.Dapp.UserInfo.parent) {
+            this.parentInviteValue.string = GlobalD.Dapp.UserInfo.parent;
+        }
+
+    },
+
+    inputInvite(value,e){
+        console.log(value);
+        this.inputInviteValue = value;
+    },
+
+    onBindInviteInfo() {
+        console.log('绑定的inputInviteValue:'+ this.inputInviteValue);
+        GlobalD.dapp.bindParent(this.inputInviteValue).then(( err, res)=>{
+            if (err === null) {
+                // 返回成功,见下面消息体
+                console.log(res)
+            } else {
+                //TODO 服务错误
+                console.log(err)
+            }
+        })
+    },
+
+    onClose(){
+        this.node.active = false;
+    },
+
+    webCopyString(){
+        console.log('复制');
+    
+        var input = GlobalD.Dapp.UserInfo.invite_code + '';
+        const el = document.createElement('textarea');
+        el.value = input;
+        el.setAttribute('readonly', '');
+        el.style.contain = 'strict';
+        el.style.position = 'absolute';
+        el.style.left = '-9999px';
+        el.style.fontSize = '12pt'; // Prevent zooming on iOS
+    
+        const selection = getSelection();
+        var originalRange = false;
+        if (selection.rangeCount > 0) {
+            originalRange = selection.getRangeAt(0);
+        }
+        document.body.appendChild(el);
+        el.select();
+        el.selectionStart = 0;
+        el.selectionEnd = input.length;
+    
+        var success = false;
+        try {
+            success = document.execCommand('copy');
+        } catch (err) {}
+    
+        document.body.removeChild(el);
+    
+        if (originalRange) {
+            selection.removeAllRanges();
+            selection.addRange(originalRange);
+        }
+    
+        return success;
+    },
+    // update (dt) {},
+});

+ 9 - 0
assets/Script/adpp/inviteInfo.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "441370e8-cdf2-4170-9da6-5905353f7e76",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 290 - 152
assets/Script/public/GameData.js

@@ -1,6 +1,9 @@
 var reGameStates = require('GameStates');
 var AConfig = require('../Config');
 
+import utils from "../Network/netUtils";
+import GameNet from "../Network/GameNet"
+
 //全局数据类
 cc.Class({
     extends: cc.Component,
@@ -40,7 +43,9 @@ cc.Class({
         readData: {
             default: null,
             visible: false,
-        }
+        },
+
+
 
     },
     onLoad() {
@@ -48,16 +53,91 @@ cc.Class({
         GlobalD.GameData = this;
         this.GameConfig();
     },
+    GameConfig() {
+        this.AddBuildingCost = 5;
+        this.RemoveBuildingCost = 5;
+
+        //
+        this.Dapp = {
+            UserInfo: null
+        }
+    },
     start() {
+        let self = this;
         this._tiledMap = GlobalD.TiledMap._tiledMap;
+        // //todo 临时处理
+        // async function dappInit() {
+        //     const dapp = new Dapp()
+        //     try {
+        //         await dapp.init()
+        //         // 获取用户信息 xxx
+        //         const { err, res } = await dapp.userInfo()
+        //         if (err === null) {
+        //             // 返回成功,见下面消息体
+        //             console.log(res)
+        //             GlobalD.GameData.Dapp.UserInfo = res;
+        //             GlobalD.GameData.onStartGame();
+        //             GameNet.getInstance().init(res.id,(data)=>{
+        //                 console.log('GameNet:'+data);
+        //             }, self);
+
+        //         } else {
+        //             //TODO 服务错误
+        //             console.log(err)
+        //         }
+        //         const cntBalance = await dapp.cntBalance()
+        //         console.log(cntBalance) // string, 精度18,需要自行处理省略几位小数
+        //         GlobalD.GameData.SetCNT(cntBalance);
+        //         console.log("end**************");
+        //     } catch (err) {
+        //         console.log(err) // 初始化失败,运行环境不是钱包环境
+        //     }
+        // }
+        // //初始化调用 dappInit;
+        // dappInit();
+        try {
+            GlobalD.dapp.cntBalance().then((cntBalance) => {
+                console.log(cntBalance) // string, 精度18,需要自行处理省略几位小数
+                GlobalD.GameData.SetCNT(cntBalance);
+            });
+        } catch (err) {
+            console.log(err) // 初始化失败,运行环境不是钱包环境
+        }
 
-        //老铁 请选择 游戏模式
-        //true 每次进入清除数据模式
-        //false 正常带网络存档模式
-        this.isDebugMode(false);
 
-        // return;
+        this.readData = userData.readData;
+        cc.log('playerPullInfo 读取到数据?:', this.readData)
+        // this.Init();
+        this.InitNextworkData();
+        this.InitSceneInfo();
+    },
+
+    onStartGame() {
+        utils.get(utils.api.loginToken, { loginId: GlobalD.GameData.Dapp.UserInfo.id }, (res, value) => {
+            if (value.code == 0) {
+                /** 登录成功获取token */
+                utils.setToken(value.data.token);
+                // console.error("设置token,测试用。");
+                /** 推送信息 */
+                utils.get(utils.api.playerPullInfo, {}, (res, playerPullInfoTemp) => {
+                    let _playerData = JSON.parse(playerPullInfoTemp.data.playerData);
+                    //记录读取的数据到内存里面
+                    // 正常游戏
+                    this.readData = userData.readData = _playerData;
+                    // cc.log('playerPullInfo 读取到数据?:', this.readData)
+                    this.Init();
+                    this.InitSceneInfo();
+                })
+                //老铁 请选择 游戏模式
+                //true 每次进入清除数据模式
+                //false 正常带网络存档模式
+                // this.isDebugMode(false);
+            } else {
+                console.log(res, value);
+            }
+        })
     },
+
     //设置游戏模式
     isDebugMode: function (b) {
         if (b) {
@@ -65,18 +145,15 @@ cc.Class({
             this.onClearAllData();
             this.getData();
         } else {
-            // 正常游戏
-            this.getData();
+            //读取网络数据
+
         }
     },
 
-
-
     getData: function () {
-
         //如果开局没有读取到网络数据,就这里初始化
         if (userData.readData == null) {
-            // cc.log("本地数据:", cc.sys.localStorage.getItem('userdata'));
+            cc.log("本地数据:", cc.sys.localStorage.getItem('userdata'));
             let userdata = cc.sys.localStorage.getItem('userdata');
             if (userdata) {
                 this.readData = JSON.parse(userdata);
@@ -85,20 +162,13 @@ cc.Class({
             this.InitSceneInfo();
         } else {
             this.readData = userData.readData;
-            // cc.log('读取到数据?:', this.readData)
-
+            cc.log('读取到数据?:', this.readData)
             this.Init();
             this.InitSceneInfo();
-
         }
 
     },
 
-
-    GameConfig() {
-        this.AddBuildingCost = 5;
-        this.RemoveBuildingCost = 5;
-    },
     InitSceneInfo() {
         //根据顺序生成
         //初始化道路
@@ -116,61 +186,119 @@ cc.Class({
         //初始化生成人物
         cc.find('GameNode/ManageWorker').getComponent('ManageWorker').InitWorkerAI();
 
-        let _BFirstLoadGame = this.readData ? this.readData.BFirstLoadGame : false;
+        let _BFirstLoadGame = this.readData ? this.readData.BFirstLoadGame : 0;
         //初始化新手教学
         GlobalD.ManageTask.InitTask(_BFirstLoadGame);
 
         this.ManageUI.getComponent('ManageUI').Init();
 
         // 自动存储数据
+        /**
+         * todo 如果退出游戏,触发一次存储。
+         */
         this.AutoSaveData = function () {
             this.pushData();
         };
-        this.schedule(this.AutoSaveData, 5);
+        this.schedule(this.AutoSaveData, 20);
+    },
+    InitNextworkData() {
+        console.log("this.readData", this.readData);
+        this.Golden = this.readData.Golden;
+        this.Diamond = this.readData.Diamond;
+        this.shareGive = this.readData.shareGive;
+        //签到分享给钻石金币
+        this.signInGive = this.readData.signInGive;
+        //每个月 给的 低保
+        this.EveryGive = this.readData.EveryGive;
+        //公共分享
+        this.publicGive = this.readData.publicGive;
+
+        // cc.log('初始化网络数据');
+        //读取日期数据
+        this.GameYear = this.readData.GameYear;
+        this.GameMonth = this.readData.GameMonth;
+        this.GameDay = this.readData.GameDay;
+        /**
+         * 接口
+         * todo cnt和snb 由钱包读取
+         */
+        this.CNT = 0;
+        this.SNB = 0;
+
+        //读取金币
+        this.Golden = this.readData.Golden;
+        //读取钻石
+        this.Diamond = this.readData.Diamond;
+        // cc.log('this.readData.Diamond', this.readData.Diamond);
+        //读取工人等级
+        this.WorkerLV = this.readData.WorkerLV;
+        //工人数量
+        this.WorkerNum = this.readData.WorkerNum;
+        //工人容量
+        this.WorkerCapacity = this.readData.WorkerCapacity;
+        this.GameDate = this.readData.GameDate;
+        this.LastTimeEveryDayRewardsDate = this.readData.LastTimeEveryDayRewardsDate;
+        this.LastTimeLuckDate = this.readData.LastTimeLuckDate;
+        this.EveryDayRewardsArray = this.readData.EveryDayRewardsArray;//.split('_');
+        this.TerritoryStateArray = this.readData.TerritoryStateArray;//.split('_');
+        //面板状态
+        this.BuildingStateArray = this.readData.BuildingStateArray;//.split('_');
+
+        //解锁设置为 不用解锁
+        // this.BuildingLockStateArray.forEach((value, index, array) => {
+        //     array[index] = 1;
+        // })
+        this.BuildingLockStateArray = this.readData.BuildingLockStateArray;//.split('_');
+        this.BuildingNumArray = this.readData.BuildingNumArray;//.split('_');
+        this.DiamondNumArray = this.readData.DiamondNumArray;//.split('_');
+        this.FoodTradeState = this.readData.FoodTradeState;
+        this.WoodTradeState = this.readData.WoodTradeState;
+        this.MineralTradeState = this.readData.MineralTradeState;
+        //工人工作信息
+        if (this.readData.characterInfoArray) {
+            this.CharacterInfoArray = this.readData.characterInfoArray;
+        } else {
+            this.CharacterInfoArray = [];
+        }
+        //道路数据
+        if (this.readData.highwayIndex)
+            this.GameData_highwayIndex = this.readData.highwayIndex;
+
+        //建筑物数据
+        if (this.readData.buildingsInfo)
+            this.GameData_buildings = this.readData.buildingsInfo;
+
+        this.LotteryTimes = this.readData.LotteryTimes;
+        //任务
+        if (this.readData.TaskIconCountClick)
+            task.TaskIconCountClick = this.readData.TaskIconCountClick;
     },
     //InitData
     Init: function () {
-
-        // let BFirstLoadGame = parseInt(cc.sys.localStorage.getItem('BFirstLoadGame'));
-        let _BFirstLoadGame = this.readData ? this.readData.BFirstLoadGame : false;
+        let _BFirstLoadGame = this.readData ? this.readData.BFirstLoadGame : 0;
         //date
         this.GameYear = 0;
         this.GameMonth = 0;
         this.GameDay = 0;
         this.GameDate = '0000/00/01';
-
+        /**
+         * 新增 CNT 和 SNB
+         */
+        this.CNT = 0;
+        this.SNB = 0;
         this.Golden = 2000;
         this.Diamond = 100;
         this.WorkerLV = 0;
         this.WorkerNum = 0;
         this.CharacterInfoArray = [];
         this.WorkerCapacity = 5;
-
         this.TerritoryStateArray = [1, 1, 1, 1, 1, 1, 1, 1];//测试,全开地图
-        // this.BuildingStateArray = [
-        //     0, //公路
-        //     0,  //路铲
-        //     1,  //拆迁
-        //     1,  //农舍
-        //     0,  //单元楼
-        //     0,  //别墅
-        //     1,  //农田
-        //     0, //伐木场
-        //     0, //矿坑
-        //     0, //加工厂
-        //     1, //便利店
-        //     0, //鲜花店
-        //     0, //甜品店
-        //     0, //汉堡店
-        //     0, //咖啡店
-        //     0, //洋装店
-        //     0, //酒吧
-        //     1, //绿化带
-        //     0, //喷泉
-        //     0, //游乐场
-        //     0, //医院
-        //     0,//警察局
-        //     0];//银行
+        /**
+         * 添加建筑往后添加,到时候ManageBuildings 脚本 会初始化根据顺序
+         * BuildingStateArray---相关 GetBuildingStateArray 获取建筑状态
+         * BuildingNumArray  ---相关 GetBuildingNumArray 获取建筑数量
+         * BuildingFrameArray ---相关 ManageUI  添加面板是否解锁之类的相关预制  
+         */
         this.BuildingStateArray = [
             1, //公路
             1,  //路铲
@@ -202,7 +330,9 @@ cc.Class({
             1, //警察局
             1,//游乐场
             1,  //蓝色城堡
-            1 //粉色城堡
+            1, //粉色城堡
+            1, //Holy Farmland
+            1 //Holy Farmland seed
         ];
         this.BuildingLockStateArray = [
             1, //公路
@@ -235,32 +365,11 @@ cc.Class({
             0, //警察局
             0,//游乐场
             0,  //蓝色城堡
-            0 //粉色城堡
+            0, //粉色城堡
+            1, //Holy Farmland
+            1, //Holy Farmland seed
         ];
-        // this.BuildingLockStateArray = [
-        // 1, //公路
-        // 1, //路铲
-        // 1,  //拆迁
-        // 1,  //农舍
-        // 1,  //单元楼
-        // 1,  //别墅
-        // 1, //农田
-        // 1,//伐木场
-        // 1,//矿坑
-        // 1, //加工厂
-        // 1,//便利店
-        // 1,//鲜花店
-        // 1,//甜品店
-        // 1, //汉堡店
-        // 1,//咖啡店
-        // 1, //洋装店
-        // 1, //酒吧
-        // 1, //绿化带
-        // 1,//喷泉
-        // 1,//游乐场
-        // 0, //医院
-        // 0,//警察局
-        // 0];//银行
+        建筑物数量
         this.BuildingNumArray = [
             0, //公路
             0,  //路铲
@@ -292,36 +401,17 @@ cc.Class({
             1, //警察局
             1,//游乐场
             1,  //蓝色城堡
-            1  //粉色城堡
+            1,  //粉色城堡
+            1, //Holy Farmland
+            1, //Holy Farmland seed
         ];
-        // this.BuildingNumArray = [
-        // 0, //公路
-        // 0,  //路铲
-        // 0, //拆迁
-        // 10,  //农舍
-        // 10, //单元楼
-        // 10, //别墅
-        // 10,  //农田
-        // 10, //伐木场
-        // 10, //矿坑
-        // 10, //加工厂
-        // 10, //便利店
-        // 9, //鲜花店
-        // 8, //甜品店
-        // 7,//汉堡店
-        // 6,//咖啡店
-        // 5,//洋装店
-        // 4, //酒吧
-        // 10, //绿化带
-        // 10,//喷泉
-        // 10, //游乐场
-        // 0, //医院
-        // 0, //警察局
-        // 0];//银行
-
-        //钻石消耗默认值
+
         this.DiamondNumArray = AConfig.DiamondArray;
-        // cc.log('钻石消耗默认值',this.DiamondNumArray);
+        //todo 钻石消耗默认值
+        this.DiamondNumArray.forEach((value, index, array) => {
+            array[index] = 0;
+        })
+        cc.log('钻石消耗默认值', this.DiamondNumArray);
         this.EveryDayRewardsArray = [0, 0, 0, 0, 0, 0, 0];
 
         this.LastTimeEveryDayRewardsDate = '0000/00/00';
@@ -332,30 +422,33 @@ cc.Class({
         this.MineralTradeState = 1;
         //转盘分享给钻石金币
         this.shareGive = [200, 5];
-
         //签到分享给钻石金币
         this.signInGive = [200, 5];
         //每个月 给的 低保
         this.EveryGive = [500, 10];
-
         //公共分享
         this.publicGive = [200, 50];
-
         //每天抽奖次数
         this.LotteryTimes = 10;
 
-        if (_BFirstLoadGame) {
-
+        // 1 === _BFirstLoadGame
+        if (true) {
+            console.log("this.readData", this.readData);
             // cc.log('初始化网络数据');
             //读取日期数据
             this.GameYear = this.readData.GameYear;
             this.GameMonth = this.readData.GameMonth;
             this.GameDay = this.readData.GameDay;
 
+            /**
+             * 接口
+             * todo cnt和snb 由钱包读取
+             */
+            this.CNT = 0;
+            this.SNB = 0;
+
             //读取金币
             this.Golden = this.readData.Golden;
-
-
             //读取钻石
             this.Diamond = this.readData.Diamond;
             // cc.log('this.readData.Diamond', this.readData.Diamond);
@@ -368,28 +461,37 @@ cc.Class({
             this.GameDate = this.readData.GameDate;
             this.LastTimeEveryDayRewardsDate = this.readData.LastTimeEveryDayRewardsDate;
             this.LastTimeLuckDate = this.readData.LastTimeLuckDate;
-            this.EveryDayRewardsArray = this.readData.EveryDayRewardsArray.split('_');
-            this.TerritoryStateArray = this.readData.TerritoryStateArray.split('_');
+            this.EveryDayRewardsArray = this.readData.EveryDayRewardsArray;//.split('_');
+            this.TerritoryStateArray = this.readData.TerritoryStateArray;//.split('_');
             //面板状态
-            this.BuildingStateArray = this.readData.BuildingStateArray.split('_');
-            this.BuildingLockStateArray = this.readData.BuildingLockStateArray.split('_');
-            this.BuildingNumArray = this.readData.BuildingNumArray.split('_');
-            this.DiamondNumArray = this.readData.DiamondNumArray.split('_');
+            this.BuildingStateArray = this.readData.BuildingStateArray;//.split('_');
+
+            //解锁设置为 不用解锁
+            this.BuildingLockStateArray.forEach((value, index, array) => {
+                array[index] = 1;
+            })
+            // this.BuildingLockStateArray = this.readData.BuildingLockStateArray.split('_');
+            this.BuildingNumArray = this.readData.BuildingNumArray;//.split('_');
+            this.DiamondNumArray = this.readData.DiamondNumArray;//.split('_');
             this.FoodTradeState = this.readData.FoodTradeState;
             this.WoodTradeState = this.readData.WoodTradeState;
             this.MineralTradeState = this.readData.MineralTradeState;
 
             //工人工作信息
-            this.CharacterInfoArray = this.readData.characterInfoArray;
+            if (this.readData.characterInfoArray)
+                this.CharacterInfoArray = this.readData.characterInfoArray;
             //道路数据
-            this.GameData_highwayIndex = this.readData.highwayIndex;
+            if (this.readData.highwayIndex)
+                this.GameData_highwayIndex = this.readData.highwayIndex;
 
             //建筑物数据
-            this.GameData_buildings = this.readData.buildingsInfo;
+            if (this.readData.buildingsInfo)
+                this.GameData_buildings = this.readData.buildingsInfo;
 
             this.LotteryTimes = this.readData.LotteryTimes;
             //任务
-            task.TaskIconCountClick = this.readData.TaskIconCountClick;
+            if (this.readData.TaskIconCountClick)
+                task.TaskIconCountClick = this.readData.TaskIconCountClick;
             //测试5W
             // this.PlusDiamond(50000);
         }
@@ -444,6 +546,26 @@ cc.Class({
             this.SetDiamond(this.Diamond + num);
         }
     },
+
+    /**
+     * 游戏里面的cnt 和神农呗
+     */
+    GetCNT: function () {
+        return this.CNT;
+    },
+    SetCNT: function (Num) {
+        this.CNT = Num;
+        this.ManageUI.getComponent('ManageUI').CNTChangeCallBack(this.CNT);
+    },
+    GetSNB: function () {
+        return this.SNB;
+    },
+    SetSNB: function (Num) {
+        this.SNB = Num;
+        this.ManageUI.getComponent('ManageUI').SNBChangeCallBack(this.SNB);
+    },
+
+
     GetWorkerLV: function () {
         return parseInt(this.WorkerLV);
     },
@@ -592,13 +714,8 @@ cc.Class({
         let InitPos = this._tiledMap.getLayer('InitPoint');
         InitPos.enabled = false;
 
-        //    //道路数据
-        //    highwayIndex: this.GameData_highwayIndex,
-        //    allHighwayStylesAndIndex: GlobalD.game.AllHighwayStylesAndIndex,
-        // var highwayTemp = cc.sys.localStorage.getItem('highway');
-
         //创建公路数据
-        if (this.readData) {
+        if (this.readData && this.readData.allHighwayStylesAndIndex) {
             //保存到内存中
             this.GameData_highwayIndex = this.readData.highwayIndex;
             //先赋值道路的对象数组
@@ -722,16 +839,39 @@ cc.Class({
         // cc.director.loadScene('Login');
     },
     //保存数据请求
+    /**
+     * 
+     * 现在转服务器存储,原本所有相关操作通过服务器计算。
+     * 一、目前涉及到的是 SNT 和 SNB 两个货币相关,和买田地操作 (可以理解为租聘,三种类型)
+     * 
+     */
     pushData: function () {
         // cc.log(this.EveryDayRewardsArray);
+        // console.log(this.readData.BFirstLoadGame);
         var datas = {
             version: this.GameVersion,
+            // 转后台处理
             BFirstLoadGame: 1,//只要push数据,就证明已经开始第一次游戏了
+
+            /**游戏不修改,默认值 start */
+            shareGive : this.shareGive,
+            //签到分享给钻石金币
+            signInGive : this.signInGive,
+            //每个月 给的 低保
+            EveryGive : this.EveryGive,
+            //公共分享
+            publicGive : this.publicGive,
+            /**游戏不修改,默认值 end */
+
             //时间
             GameYear: this.GameYear,
             GameMonth: this.GameMonth,
             GameDay: this.GameDay,
 
+            //这里只是单纯的存储起来
+            CNT: this.CNT,
+            SNB: this.SNB,
+
             Golden: this.Golden,
             Diamond: this.Diamond,
             WorkerLV: this.WorkerLV,
@@ -740,19 +880,26 @@ cc.Class({
             GameDate: this.GameDate,
             LastTimeEveryDayRewardsDate: this.LastTimeEveryDayRewardsDate,
             LastTimeLuckDate: this.LastTimeLuckDate,
-            EveryDayRewardsArray: this.EveryDayRewardsArray.join('_'),
-            TerritoryStateArray: this.TerritoryStateArray.join('_'),
+            EveryDayRewardsArray: this.EveryDayRewardsArray,//.join('_'),
+            TerritoryStateArray: this.TerritoryStateArray,//.join('_'),
             //面板状态
-            BuildingStateArray: this.BuildingStateArray.join('_'),
-            BuildingLockStateArray: this.BuildingLockStateArray.join('_'),
-            BuildingNumArray: this.BuildingNumArray.join('_'),
-            DiamondNumArray: this.DiamondNumArray.join('_'),
+            BuildingStateArray: this.BuildingStateArray,//.join('_'),
+            BuildingLockStateArray: this.BuildingLockStateArray,//.join('_'),
+
+            /**
+             * SNB和CNT相关,需要后台筛选 田地 和 种子。单独处理
+             */
+            BuildingNumArray: this.BuildingNumArray,//.join('_'),
+            DiamondNumArray: this.DiamondNumArray,//.join('_'),
             FoodTradeState: this.FoodTradeState,
             WoodTradeState: this.WoodTradeState,
             MineralTradeState: this.MineralTradeState,
 
             LotteryTimes: this.LotteryTimes,
 
+            /**
+             * 这些数据不用服务器初始化
+             */
             //工人工作信息
             characterInfoArray: this.CharacterInfoArray,
             //道路数据
@@ -764,26 +911,17 @@ cc.Class({
             TaskIconCountClick: task.TaskIconCountClick
         }
         var data = [];
-        data["openid"] = userData.openId;
-        data["userdata"] = JSON.stringify(datas);
-
+        // data["openid"] = userData.openId;
+        // data["userdata"] = JSON.stringify(datas);
+        data["playerData"] = JSON.stringify(datas);
+
+        /** 推送信息 */
+        utils.post(utils.api.playerPushInfo, data, (res, playerPushInfoTemp) => {
+            // console.log('playerPushInfoTemp', playerPushInfoTemp);
+        })
+        return;
         //保存用户数据到本地
         cc.sys.localStorage.setItem('userdata', JSON.stringify(datas));
-
-        return;
-        // console.log("提交的数据是", datas);
-        httpUtils.Post(httpUtils.setUserData, data, function (resData) {
-            let _userData = resData.data.userdata;
-            let _JsonData = JSON.parse(_userData);
-            // console.log("push成功", resData, _JsonData);
-
-            if (resData.code == 0) {
-                // this.getText.string = data.data.userdata;
-            }
-
-        }.bind(this), function (resData) {
-            // console.log("失败", resData);
-        }.bind(this));
     },
 
 });

+ 14 - 1
assets/Script/public/GameStates.js

@@ -57,6 +57,18 @@ var BuildType = cc.Enum({
     Shop: -1,
     //特殊建筑
     Special: -1,
+
+    //神龙小镇 种子土地
+    DragonTownFarmland:-1
+});
+
+/**
+ * 神龙小镇的种子类型
+ * todo 后续可能根据DragonTownFarmland 需要种子的类型来确定播种
+ */
+var SeedType =  cc.Enum({
+    //Normal -- 默认对应 DragonTownFarmland
+    Normal:0,
 });
 
 
@@ -143,7 +155,8 @@ cc.Class({
         goods,
         goodsMaterialClass,
         AI_Animation_Type,
-        HighwayType
+        HighwayType,
+        SeedType
     },
 });
 

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

@@ -23,4 +23,13 @@ window.GlobalD = {
 
     //新手引导
     ManageTask:null,
+
+
+    //全局存储用户信息
+    dapp:null,
+    Dapp:{
+        UserInfo: null,
+        CNT:0,
+        address:''
+    }
 };

+ 6 - 1
assets/Script/public/ManageGame.js

@@ -312,6 +312,10 @@ var GameManager = cc.Class({
         return false;
     },
     //    Muinus(buildingName) {
+    /**
+     * 建筑物减1操作
+     * @param {建筑名称} buildingName 
+     */    
     MuinusBuilding(buildingName) {
         let ManageBuildings = this.ManageUINode.getComponent('ManageBuildings');
         if (!ManageBuildings) return;
@@ -334,6 +338,7 @@ var GameManager = cc.Class({
     },
 
     //钻石:购买后增加对应可建造的数据
+    //todo 现在修改为不给购买了。给默认值
     AddBuildingNum(_buttonNodeName) {
         let ManageBuildings = this.ManageUINode.getComponent('ManageBuildings');
         if (!ManageBuildings) return;
@@ -458,7 +463,7 @@ var GameManager = cc.Class({
         }
     },
     PlusBuilding(buildingName) {
-        // cc.log('buildingName='+buildingName)
+        cc.log('buildingName='+buildingName)
         let ManageBuildings = this.ManageUINode.getComponent('ManageBuildings');
         if (!ManageBuildings) return;
 

+ 13 - 0
assets/Script/public/ManageGolden.js

@@ -10,10 +10,23 @@ cc.Class({
         },
         ManageUI: cc.Node,
 
+        //5个神农呗兑1个cnt
+        CNTNode: {
+            default: null,
+            type: cc.Node,
+        },
+        SNBNode: {
+            default: null,
+            type: cc.Node,
+        },
     },
     InitManageGlodenUI(){
         this.GoldenLabel.getComponent(cc.Label).string =this.FormatMoney(GlobalD.GameData.GetGolden().toString());
         this.Diamondlabel.getComponent(cc.Label).string =this.FormatMoney(GlobalD.GameData.GetDiamond().toString());
+   
+        this.CNTNode.getComponent(cc.Label).string = GlobalD.GameData.CNT.toString();
+        this.SNBNode.getComponent(cc.Label).string = GlobalD.GameData.SNB.toString();
+   
     },
     FormatMoney(s, n) {
         n = n > 0 && n <= 20 ? n : 2;

+ 16 - 5
assets/Script/public/ManageTask.js

@@ -49,8 +49,15 @@ cc.Class({
 
     },
     onStart() {
-        //初始化任务
-        switch (this.taskEnum) {
+       // onStartTask()
+    },
+
+    /**
+     * 调用任务
+     */
+    onStartTask(){
+         //初始化任务
+         switch (this.taskEnum) {
             case taskEnumType.GameStart:
                 this.onInitGameStartTask();
                 break;
@@ -74,19 +81,23 @@ cc.Class({
         }
     },
 
+
     InitTask(BFirstLoadGame) {
         // return;
         // todo 新手教学 初始化
-        console.log("初始化真的假的", BFirstLoadGame);
-        if (!BFirstLoadGame) {
+     
+        if (0 === BFirstLoadGame) {
+            console.log("***首次初始化任务", BFirstLoadGame);
             //首次初始化
             task.taskOnLoad();
             //创建员工
             // this.manageWorker.getComponent('ManageWorker').onRecruit();
             // this.manageWorker.getComponent('ManageWorker').onRecruit();
 
-            this.onStart();
+            this.onStartTask();
         } else {
+            console.log("***初始化任务", BFirstLoadGame);
+            // this.onStartTask();
             // console.log('task.TaskIconCountClick =====',task.TaskIconCountClick);
             task._init();
             task.addSeneceTaskIcon(() => {

+ 21 - 1
assets/Script/public/ManageUI.js

@@ -60,12 +60,15 @@ cc.Class({
         },
         Goldenlabel: cc.Node,
         Diamondlabel: cc.Node,
-
+        CNTlabel: cc.Node,
+        SNBlabel: cc.Node,
 
         //显示的库存总量,人才界面
         cropContent: cc.Label,
         woodContent: cc.Label,
         mineContent: cc.Label,
+
+        inviteNode: cc.Node,
     },
     onLoad() {
         cc.game.setFrameRate(30);
@@ -165,6 +168,7 @@ cc.Class({
             let Price = this.BuildingFrameArray[i].getChildByName('Lock').getChildByName('PriceBG').getChildByName('label').getComponent(cc.Label).string = this.FormatMoney(AConfig.BuildingUnlockMoneyArray[i]);
         }
 
+        // *********** todo *************
         //初始化,面板信息
         //运营费用数组
         let _runningCostArray = AConfig.RunningCostArray;
@@ -469,6 +473,14 @@ cc.Class({
             this.UITouch.active = isActive;
         }
     },
+
+    /**
+     * 绑定邀请
+     */
+    onInvite_Open(){
+        this.inviteNode.active = true;
+    },
+
     //音效设置界面
     onButtonEvent_Setting_OPen() {
         this.onHideMenu();
@@ -894,6 +906,14 @@ cc.Class({
             AnimTimes++;
         }, 0.05, Times);
     },
+
+    CNTChangeCallBack: function (Num) {
+        this.CNTlabel.getComponent(cc.Label).string = Num;
+    },
+    SNBChangeCallBack: function (Num) {
+        this.SNBlabel.getComponent(cc.Label).string = Num;
+    },
+
     FormatMoney(s, n) {
         n = n > 0 && n <= 20 ? n : 2;
         s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";

二进制
assets/Texture/Labour_205_0.png


+ 34 - 0
assets/Texture/Labour_205_0.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "0a4a79b4-a3a9-4af7-9ecf-a547237d2a6b",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "Labour_205_0": {
+      "ver": "1.0.4",
+      "uuid": "19f8dc86-b387-45de-9faf-289bed54b139",
+      "rawTextureUuid": "0a4a79b4-a3a9-4af7-9ecf-a547237d2a6b",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 1,
+      "offsetY": -39,
+      "trimX": 2,
+      "trimY": 78,
+      "width": 273,
+      "height": 168,
+      "rawWidth": 275,
+      "rawHeight": 246,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

二进制
assets/Texture/Labour_205_1.png


+ 34 - 0
assets/Texture/Labour_205_1.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "a7111471-a396-4251-9554-f5d277c0b898",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "Labour_205_1": {
+      "ver": "1.0.4",
+      "uuid": "0bf10f81-00d4-4c35-8f25-0c04cc7bbcd8",
+      "rawTextureUuid": "a7111471-a396-4251-9554-f5d277c0b898",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": -38,
+      "trimX": 1,
+      "trimY": 76,
+      "width": 273,
+      "height": 170,
+      "rawWidth": 275,
+      "rawHeight": 246,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

二进制
assets/Texture/Labour_205_2.png


+ 34 - 0
assets/Texture/Labour_205_2.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "74b01555-9d6e-417e-9c3a-64992d63f9ba",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "Labour_205_2": {
+      "ver": "1.0.4",
+      "uuid": "67dece92-f574-4b4e-88f9-f5e73f064f1c",
+      "rawTextureUuid": "74b01555-9d6e-417e-9c3a-64992d63f9ba",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 1,
+      "offsetY": -0.5,
+      "trimX": 2,
+      "trimY": 1,
+      "width": 273,
+      "height": 245,
+      "rawWidth": 275,
+      "rawHeight": 246,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

二进制
assets/UI/NOther/EveryDaySign/CNT.png


+ 34 - 0
assets/UI/NOther/EveryDaySign/CNT.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "42963c58-e7a5-49bb-8080-a520c0317f4b",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "CNT": {
+      "ver": "1.0.4",
+      "uuid": "3da6291f-267a-4c2f-aa72-9f0a0ee3247e",
+      "rawTextureUuid": "42963c58-e7a5-49bb-8080-a520c0317f4b",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 7,
+      "width": 81,
+      "height": 67,
+      "rawWidth": 81,
+      "rawHeight": 81,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

二进制
assets/UI/NOther/EveryDaySign/SNB.png


+ 34 - 0
assets/UI/NOther/EveryDaySign/SNB.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "b5011206-2445-44b1-b41b-51497aa72acd",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "SNB": {
+      "ver": "1.0.4",
+      "uuid": "b5f08acf-1bf5-4f36-8005-633dc86435a9",
+      "rawTextureUuid": "b5011206-2445-44b1-b41b-51497aa72acd",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0.5,
+      "offsetY": 1,
+      "trimX": 5,
+      "trimY": 5,
+      "width": 72,
+      "height": 69,
+      "rawWidth": 81,
+      "rawHeight": 81,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

二进制
assets/UI/NScene/Labour_Holy_Farmland.png


+ 34 - 0
assets/UI/NScene/Labour_Holy_Farmland.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "e6435c26-bbdf-468a-a110-7dad7769ce5a",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "Labour_Holy_Farmland": {
+      "ver": "1.0.4",
+      "uuid": "aeaacb68-5e95-4cb6-8645-2d108e4b9228",
+      "rawTextureUuid": "e6435c26-bbdf-468a-a110-7dad7769ce5a",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 1,
+      "offsetY": -39,
+      "trimX": 2,
+      "trimY": 78,
+      "width": 273,
+      "height": 168,
+      "rawWidth": 275,
+      "rawHeight": 246,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

二进制
assets/UI/NScene/Labour_Holy_Farmland_Seed.png


+ 34 - 0
assets/UI/NScene/Labour_Holy_Farmland_Seed.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "25560329-53db-4847-a724-5e8ea1b221ec",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "Labour_Holy_Farmland_Seed": {
+      "ver": "1.0.4",
+      "uuid": "301b3d49-5ffd-4773-87b9-3a0c6cc064d3",
+      "rawTextureUuid": "25560329-53db-4847-a724-5e8ea1b221ec",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 2,
+      "offsetY": -1.5,
+      "trimX": 17,
+      "trimY": 7,
+      "width": 108,
+      "height": 135,
+      "rawWidth": 138,
+      "rawHeight": 146,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 7 - 0
assets/migration.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "52448675-cfeb-4374-9fce-fe190b6e6224",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 15 - 0
assets/migration/use_v2.1.x_cc.Action.js

@@ -0,0 +1,15 @@
+/*
+ * This script is automatically generated by Cocos Creator and is only used for projects compatible with the v2.1.0/2.1.1 version.
+ * You do not need to manually add this script in any other project.
+ * If you don't use cc.Action in your project, you can delete this script directly.
+ * If your project is hosted in VCS such as git, submit this script together.
+ *
+ * 此脚本由 Cocos Creator 自动生成,仅用于兼容 v2.1.0/2.1.1 版本的工程,
+ * 你无需在任何其它项目中手动添加此脚本。
+ * 如果你的项目中没用到 Action,可直接删除该脚本。
+ * 如果你的项目有托管于 git 等版本库,请将此脚本一并上传。
+ */
+
+// Revert the rotation direction of Actions associated with 2D rotation (such as cc.rotateBy) to keep it consistent with v2.1.0/2.1.1.
+// 将跟 2D 旋转相关的 Action (如 cc.rotateBy)的旋转朝向取反,以保持跟 v2.1.0/2.1.1 行为一致。
+cc.macro.ROTATE_ACTION_CCW = true;

+ 9 - 0
assets/migration/use_v2.1.x_cc.Action.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "276dadce-bd21-4aaa-a11d-142d83c8ab57",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

二进制
assets/resources/login/shennongStartBg.jpg


+ 34 - 0
assets/resources/login/shennongStartBg.jpg.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "0828ffa4-20de-43ba-9266-b4f34f76e1a6",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "shennongStartBg": {
+      "ver": "1.0.4",
+      "uuid": "953e6290-0816-42d1-b462-cbe1b91bb3fb",
+      "rawTextureUuid": "0828ffa4-20de-43ba-9266-b4f34f76e1a6",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 720,
+      "height": 1280,
+      "rawWidth": 720,
+      "rawHeight": 1280,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 7 - 0
assets/resources/prefab/login.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "0f77cbe4-22ea-46e3-bafd-03d9be4f0e74",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 34 - 28
assets/resources/prefab/login.prefab

@@ -63,16 +63,14 @@
       "y": 1,
       "z": 1
     },
-    "_quat": {
-      "__type__": "cc.Quat",
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
-      "z": 0,
-      "w": 1
+      "z": 0
     },
     "_skewX": 0,
     "_skewY": 0,
-    "_zIndex": 0,
     "_is3DNode": false,
     "groupIndex": 0,
     "_id": ""
@@ -125,16 +123,14 @@
       "y": 1,
       "z": 1
     },
-    "_quat": {
-      "__type__": "cc.Quat",
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
-      "z": 0,
-      "w": 1
+      "z": 0
     },
     "_skewX": 0,
     "_skewY": 0,
-    "_zIndex": 0,
     "_is3DNode": false,
     "groupIndex": 0,
     "_id": ""
@@ -147,10 +143,15 @@
       "__id__": 2
     },
     "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "7b382f04-0559-429c-86af-1b1eb52f5f99"
+      "__uuid__": "953e6290-0816-42d1-b462-cbe1b91bb3fb"
     },
     "_type": 0,
     "_sizeMode": 0,
@@ -163,7 +164,6 @@
     "_fillStart": 0,
     "_fillRange": 0,
     "_isTrimmedMode": true,
-    "_state": 0,
     "_atlas": null,
     "_id": ""
   },
@@ -207,7 +207,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 372,
-      "height": 20
+      "height": 25.2
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -226,16 +226,14 @@
       "y": 1,
       "z": 1
     },
-    "_quat": {
-      "__type__": "cc.Quat",
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
-      "z": 0,
-      "w": 1
+      "z": 0
     },
     "_skewX": 0,
     "_skewY": 0,
-    "_zIndex": 0,
     "_is3DNode": false,
     "groupIndex": 0,
     "_id": ""
@@ -248,8 +246,11 @@
       "__id__": 5
     },
     "_enabled": true,
-    "_srcBlendFactor": 1,
-    "_dstBlendFactor": 771,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
     "_useOriginalSize": false,
     "_string": "抵制不良游戏 拒绝到饭游戏 注意自我保护 谨防受骗上当",
     "_N$string": "抵制不良游戏 拒绝到饭游戏 注意自我保护 谨防受骗上当",
@@ -259,10 +260,12 @@
     "_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": ""
   },
   {
@@ -305,7 +308,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 372,
-      "height": 20
+      "height": 25.2
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -324,16 +327,14 @@
       "y": 1,
       "z": 1
     },
-    "_quat": {
-      "__type__": "cc.Quat",
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
-      "z": 0,
-      "w": 1
+      "z": 0
     },
     "_skewX": 0,
     "_skewY": 0,
-    "_zIndex": 0,
     "_is3DNode": false,
     "groupIndex": 0,
     "_id": ""
@@ -346,8 +347,11 @@
       "__id__": 8
     },
     "_enabled": true,
-    "_srcBlendFactor": 1,
-    "_dstBlendFactor": 771,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
     "_useOriginalSize": false,
     "_string": "适当游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活",
     "_N$string": "适当游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活",
@@ -357,10 +361,12 @@
     "_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": ""
   },
   {

+ 300 - 0
assets/resources/prefab/login/playButton.prefab

@@ -0,0 +1,300 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "playButton",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 6
+      }
+    ],
+    "_prefab": {
+      "__id__": 7
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "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.Node",
+    "_name": "Background",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": {
+      "__id__": 5
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "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.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "d2a32fc2-ff6b-42e3-83c8-f753a75a824c"
+    },
+    "_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.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 100,
+    "_originalHeight": 40,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "c61f5a09-1679-4e7e-ba8d-4ea62653f263"
+    },
+    "fileId": "80iWbSRilDO6y5v3MOT4lS",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 230,
+      "g": 230,
+      "b": 230,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 120,
+      "g": 120,
+      "b": 120,
+      "a": 200
+    },
+    "_N$normalSprite": {
+      "__uuid__": "d2a32fc2-ff6b-42e3-83c8-f753a75a824c"
+    },
+    "_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__": 2
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "c61f5a09-1679-4e7e-ba8d-4ea62653f263"
+    },
+    "fileId": "8eUSOzmwRDl7YPy0rTSJLI",
+    "sync": false
+  }
+]

+ 8 - 0
assets/resources/prefab/login/playButton.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.1",
+  "uuid": "c61f5a09-1679-4e7e-ba8d-4ea62653f263",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 1 - 1
settings/builder.json

@@ -39,7 +39,7 @@
   },
   "startScene": "e0bea6db-64db-4c3b-b02a-531046201733",
   "title": "MyCity",
-  "webOrientation": "auto",
+  "webOrientation": "portrait",
   "wechatgame": {
     "REMOTE_SERVER_ROOT": "https://www.9527fun.cn/Cocos/pocketmall/0608Online",
     "appid": "wx6898b48e0760935c",

+ 3 - 13
settings/project.json

@@ -11,17 +11,7 @@
   ],
   "design-resolution-height": 640,
   "design-resolution-width": 960,
-  "excluded-modules": [
-    "PageView",
-    "PageViewIndicator",
-    "VideoPlayer",
-    "WebView",
-    "Physics",
-    "StudioComponent",
-    "Native NetWork",
-    "3D",
-    "Mesh"
-  ],
+  "excluded-modules": [],
   "facebook": {
     "appID": "",
     "audience": {
@@ -44,7 +34,7 @@
     "height": 640,
     "width": 960
   },
-  "start-scene": "current",
-  "use-customize-simulator": false,
+  "start-scene": "e0bea6db-64db-4c3b-b02a-531046201733",
+  "use-customize-simulator": true,
   "use-project-simulator-setting": false
 }

+ 6 - 0
settings/services.json

@@ -0,0 +1,6 @@
+{
+	"game": {
+		"name": "未知游戏",
+		"appid": "UNKNOW"
+	}
+}

部分文件因为文件数量过多而无法显示