Citrus 9 luni în urmă
comite
7f9f79d409
100 a modificat fișierele cu 11030 adăugiri și 0 ștergeri
  1. 51 0
      .gitignore
  2. 3 0
      README.md
  3. 13 0
      assets/LoadScene.meta
  4. 1604 0
      assets/LoadScene/LoadScene.fire
  5. 8 0
      assets/LoadScene/LoadScene.fire.meta
  6. 475 0
      assets/LoadScene/PreviewScene.fire
  7. 8 0
      assets/LoadScene/PreviewScene.fire.meta
  8. 13 0
      assets/LoadScene/Sp.meta
  9. BIN
      assets/LoadScene/Sp/1.png
  10. 38 0
      assets/LoadScene/Sp/1.png.meta
  11. BIN
      assets/LoadScene/Sp/2.png
  12. 38 0
      assets/LoadScene/Sp/2.png.meta
  13. BIN
      assets/LoadScene/Sp/4.png
  14. 38 0
      assets/LoadScene/Sp/4.png.meta
  15. BIN
      assets/LoadScene/Sp/5.png
  16. 38 0
      assets/LoadScene/Sp/5.png.meta
  17. BIN
      assets/LoadScene/Sp/6.png
  18. 38 0
      assets/LoadScene/Sp/6.png.meta
  19. BIN
      assets/LoadScene/Sp/7.png
  20. 38 0
      assets/LoadScene/Sp/7.png.meta
  21. BIN
      assets/LoadScene/Sp/8.png
  22. 38 0
      assets/LoadScene/Sp/8.png.meta
  23. 3 0
      assets/LoadScene/Sp/AutoAtlas.pac
  24. 23 0
      assets/LoadScene/Sp/AutoAtlas.pac.meta
  25. 13 0
      assets/Script.meta
  26. 13 0
      assets/Script/EventName.meta
  27. 193 0
      assets/Script/EventName/EventName.ts
  28. 10 0
      assets/Script/EventName/EventName.ts.meta
  29. 13 0
      assets/Script/GameLogic.meta
  30. 95 0
      assets/Script/GameLogic/CloseDoor.ts
  31. 10 0
      assets/Script/GameLogic/CloseDoor.ts.meta
  32. 1833 0
      assets/Script/GameLogic/DataConfig.ts
  33. 10 0
      assets/Script/GameLogic/DataConfig.ts.meta
  34. 444 0
      assets/Script/GameLogic/Role.ts
  35. 10 0
      assets/Script/GameLogic/Role.ts.meta
  36. 774 0
      assets/Script/GameLogic/RoleQueue.ts
  37. 10 0
      assets/Script/GameLogic/RoleQueue.ts.meta
  38. 259 0
      assets/Script/GameLogic/Sofa.ts
  39. 10 0
      assets/Script/GameLogic/Sofa.ts.meta
  40. 236 0
      assets/Script/GameLogic/aStar.ts
  41. 10 0
      assets/Script/GameLogic/aStar.ts.meta
  42. 836 0
      assets/Script/GameLogic/barrierDrag.ts
  43. 10 0
      assets/Script/GameLogic/barrierDrag.ts.meta
  44. 595 0
      assets/Script/GameLogic/game.ts
  45. 10 0
      assets/Script/GameLogic/game.ts.meta
  46. 69 0
      assets/Script/GameLogic/indexManager.ts
  47. 10 0
      assets/Script/GameLogic/indexManager.ts.meta
  48. 50 0
      assets/Script/GameLogic/mapLayer.ts
  49. 10 0
      assets/Script/GameLogic/mapLayer.ts.meta
  50. 13 0
      assets/Script/GameUI.meta
  51. 99 0
      assets/Script/GameUI/AudioManager.ts
  52. 10 0
      assets/Script/GameUI/AudioManager.ts.meta
  53. 49 0
      assets/Script/GameUI/Collect.ts
  54. 10 0
      assets/Script/GameUI/Collect.ts.meta
  55. 85 0
      assets/Script/GameUI/CollectManger.ts
  56. 10 0
      assets/Script/GameUI/CollectManger.ts.meta
  57. 88 0
      assets/Script/GameUI/Collectitem.ts
  58. 10 0
      assets/Script/GameUI/Collectitem.ts.meta
  59. 106 0
      assets/Script/GameUI/CurrentLevel.ts
  60. 10 0
      assets/Script/GameUI/CurrentLevel.ts.meta
  61. 25 0
      assets/Script/GameUI/DifficultyUp.ts
  62. 10 0
      assets/Script/GameUI/DifficultyUp.ts.meta
  63. 131 0
      assets/Script/GameUI/Down.ts
  64. 10 0
      assets/Script/GameUI/Down.ts.meta
  65. 84 0
      assets/Script/GameUI/DressUp.ts
  66. 10 0
      assets/Script/GameUI/DressUp.ts.meta
  67. 84 0
      assets/Script/GameUI/EmployeeReferral.ts
  68. 10 0
      assets/Script/GameUI/EmployeeReferral.ts.meta
  69. 276 0
      assets/Script/GameUI/GameLevel.ts
  70. 10 0
      assets/Script/GameUI/GameLevel.ts.meta
  71. 125 0
      assets/Script/GameUI/GameOverEnd.ts
  72. 10 0
      assets/Script/GameUI/GameOverEnd.ts.meta
  73. 32 0
      assets/Script/GameUI/GameOverMid.ts
  74. 10 0
      assets/Script/GameUI/GameOverMid.ts.meta
  75. 91 0
      assets/Script/GameUI/GamePause.ts
  76. 10 0
      assets/Script/GameUI/GamePause.ts.meta
  77. 216 0
      assets/Script/GameUI/GameTime.ts
  78. 10 0
      assets/Script/GameUI/GameTime.ts.meta
  79. 44 0
      assets/Script/GameUI/GameUI.ts
  80. 10 0
      assets/Script/GameUI/GameUI.ts.meta
  81. 70 0
      assets/Script/GameUI/Guide.ts
  82. 10 0
      assets/Script/GameUI/Guide.ts.meta
  83. 156 0
      assets/Script/GameUI/HallScrollView.ts
  84. 10 0
      assets/Script/GameUI/HallScrollView.ts.meta
  85. 402 0
      assets/Script/GameUI/HonorManger.ts
  86. 10 0
      assets/Script/GameUI/HonorManger.ts.meta
  87. 137 0
      assets/Script/GameUI/HonorWall.ts
  88. 10 0
      assets/Script/GameUI/HonorWall.ts.meta
  89. 101 0
      assets/Script/GameUI/HonorWallitem.ts
  90. 10 0
      assets/Script/GameUI/HonorWallitem.ts.meta
  91. 108 0
      assets/Script/GameUI/IDcard.ts
  92. 10 0
      assets/Script/GameUI/IDcard.ts.meta
  93. 30 0
      assets/Script/GameUI/JustAgain.ts
  94. 10 0
      assets/Script/GameUI/JustAgain.ts.meta
  95. 13 0
      assets/Script/GameUI/Notice.meta
  96. 72 0
      assets/Script/GameUI/Notice/DressUpPop.ts
  97. 10 0
      assets/Script/GameUI/Notice/DressUpPop.ts.meta
  98. 63 0
      assets/Script/GameUI/Notice/FullAttendance.ts
  99. 10 0
      assets/Script/GameUI/Notice/FullAttendance.ts.meta
  100. 90 0
      assets/Script/GameUI/Notice/HrDetails.ts

+ 51 - 0
.gitignore

@@ -0,0 +1,51 @@
+#/////////////////////////////////////////////////////////////////////////////
+# Fireball Projects
+#/////////////////////////////////////////////////////////////////////////////
+
+/library/
+/temp/
+/local/
+/build/
+
+#/////////////////////////////////////////////////////////////////////////////
+# npm files
+#/////////////////////////////////////////////////////////////////////////////
+
+npm-debug.log
+node_modules/
+
+#/////////////////////////////////////////////////////////////////////////////
+# Logs and databases
+#/////////////////////////////////////////////////////////////////////////////
+
+*.log
+*.sql
+*.sqlite
+
+#/////////////////////////////////////////////////////////////////////////////
+# files for debugger
+#/////////////////////////////////////////////////////////////////////////////
+
+*.sln
+*.pidb
+*.suo
+
+#/////////////////////////////////////////////////////////////////////////////
+# OS generated files
+#/////////////////////////////////////////////////////////////////////////////
+
+.DS_Store
+ehthumbs.db
+Thumbs.db
+
+#/////////////////////////////////////////////////////////////////////////////
+# WebStorm files
+#/////////////////////////////////////////////////////////////////////////////
+
+.idea/
+
+#//////////////////////////
+# VS Code files
+#//////////////////////////
+
+.vscode/

+ 3 - 0
README.md

@@ -0,0 +1,3 @@
+# sCreater-shangbanwang
+
+谁是上班王

+ 13 - 0
assets/LoadScene.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "f9d63acc-6da3-4eff-8c44-e068d39897a6",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 1604 - 0
assets/LoadScene/LoadScene.fire

@@ -0,0 +1,1604 @@
+[
+  {
+    "__type__": "cc.SceneAsset",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "scene": {
+      "__id__": 1
+    }
+  },
+  {
+    "__type__": "cc.Scene",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
+    "_active": false,
+    "_components": [],
+    "_prefab": null,
+    "_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
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_is3DNode": true,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "autoReleaseAssets": false,
+    "_id": "18364748-5d4d-4a13-ba80-24a58690c521"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Canvas",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 24
+      },
+      {
+        "__id__": 32
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 34
+      },
+      {
+        "__id__": 35
+      },
+      {
+        "__id__": 36
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 252,
+      "g": 252,
+      "b": 252,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1624
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        375,
+        812,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "a286bbGknJLZpRpxROV6M94"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Main Camera",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "85OVmg6EVLoKbdmeaHrmFN"
+  },
+  {
+    "__type__": "cc.Camera",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 3
+    },
+    "_enabled": true,
+    "_cullingMask": 4294967295,
+    "_clearFlags": 7,
+    "_backgroundColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_depth": -1,
+    "_zoomRatio": 1,
+    "_targetTexture": null,
+    "_fov": 60,
+    "_orthoSize": 10,
+    "_nearClip": 1,
+    "_farClip": 4096,
+    "_ortho": true,
+    "_rect": {
+      "__type__": "cc.Rect",
+      "x": 0,
+      "y": 0,
+      "width": 1,
+      "height": 1
+    },
+    "_renderStages": 1,
+    "_alignWithScreen": true,
+    "_id": "e5jb+TvOJBKYayWZDPk8cb"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 6
+      },
+      {
+        "__id__": 12
+      },
+      {
+        "__id__": 14
+      },
+      {
+        "__id__": 16
+      },
+      {
+        "__id__": 19
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 22
+      },
+      {
+        "__id__": 23
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1624
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "39Wjg8okJMQoCixc0/JJ3y"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "StartGame",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [
+      {
+        "__id__": 7
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 9
+      },
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 331.9,
+      "height": 175.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -303.081,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "59YHz/MjtH6ZzA9CoNpAXQ"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Background",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 6
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 611,
+      "height": 277
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.5,
+        0.5,
+        0
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "84O5S2jDtAtZ9cEivBafg1"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 7
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "34a18619-3d04-48cd-bcd7-faf2c07e01fe"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "65kvJbHXRICoUdFa40h1eD"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_normalMaterial": null,
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.05,
+    "clickEvents": [
+      {
+        "__id__": 10
+      }
+    ],
+    "_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__": "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__": 7
+    },
+    "_id": "7dk34ps69JZrKSmqTSAugz"
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 2
+    },
+    "component": "",
+    "_componentId": "572dd3BwulMAorbseYM96UQ",
+    "handler": "StartGame",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 4,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 421.219,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "fefn9bmmBKVafmR2VQwZWL"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "logoName",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 13
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 1007,
+      "height": 909
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        386.116,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.5,
+        0.5,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "29wdQntLREToXTjAVrSFpw"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 12
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "456d388c-3165-4f7c-890e-772ee9b08933"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "c3Owhyh1NAu5JBnv0wI2zc"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "test",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 15
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 333,
+      "height": 333
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -896.816,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "b0fGkQQD5PTqQM9+8rrTYP"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "ccd9b6dd-c8fa-43c3-b30a-e470d66f05bb"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "3c6DPOQx5DXK6Nq3WM3IAG"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "GongGao",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 17
+      },
+      {
+        "__id__": 18
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 886,
+      "height": 137
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        5.684341886080802e-14,
+        -654.0670000000001,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.6,
+        0.6,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "32+S5oGx9BQauItIyLHkV8"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 16
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "e129d4da-57ff-400f-94a7-ff38ce468088"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "18FRaf5SFLVJv6YLkIIFm0"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 16
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 4,
+    "_left": 29.800000000000068,
+    "_right": 29.799999999999955,
+    "_top": 0,
+    "_bottom": 116.83299999999991,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 690.4,
+    "_originalHeight": 0,
+    "_id": "7b4vkbnNlC9bllvfWihszs"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "ageTips",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 5
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 20
+      },
+      {
+        "__id__": 21
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 124,
+      "height": 162
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        329.6,
+        -648.358,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.7,
+        0.7,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "47659gkFBBhZ8vCTzzSoTd"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 19
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "22f24b6a-ed2d-49d7-820f-2419b9915fd2"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "bdcsDIxzZK74y0/DSv6UvP"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 19
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 36,
+    "_left": 0,
+    "_right": 2,
+    "_top": 0,
+    "_bottom": 106.94199999999995,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "42CydmPQJJ+oyZqXebQ/D7"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "821caffc-744e-4f8d-bc99-1e11d3f0a7ae"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "2dvnvjxGRGLpfSMX8c2unK"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "01pP+UFl1MSJf4jAkUShtI"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "New ProgressBar",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 25
+      },
+      {
+        "__id__": 27
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 29
+      },
+      {
+        "__id__": 30
+      },
+      {
+        "__id__": 31
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 402.4,
+      "height": 48.7
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -451.462,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "83MmlXCGhNSa0b+0CfxZP2"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bar",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 24
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 26
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 74.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -198.3,
+        2.4,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.5,
+        0.5,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "32ACE7polB+5AjI4R/xYYm"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 25
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "9c0d6818-4a9a-4aac-81c6-5368add6de5c"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "9do4URTZdEa7c0q1vf9v6x"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "New Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 24
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 28
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 37.8
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -50.412,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "67RR9LZpFJ+KY+ivEyWebF"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 27
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "",
+    "_N$string": "",
+    "_fontSize": 30,
+    "_lineHeight": 30,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 1,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": "395TQDby1L6IVy2RJDTqKC"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 24
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a43b6efa-8839-4dd2-923f-4b60f1ae6edf"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "96U1Et7W1OnJwHM20ShQyg"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 24
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 4,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 336.188,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "27BUFbmGJMh7HuMYJ4F6tN"
+  },
+  {
+    "__type__": "cc.ProgressBar",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 24
+    },
+    "_enabled": true,
+    "_N$totalLength": 795,
+    "_N$barSprite": {
+      "__id__": 26
+    },
+    "_N$mode": 0,
+    "_N$progress": 0,
+    "_N$reverse": false,
+    "_id": "57D1niLFNPka6LTzKz3+SH"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Login",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 33
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 366,
+      "height": 70
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -81.038,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "b5ngFq0thCX6Se+HP4nBdJ"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 32
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "9c0d6818-4a9a-4aac-81c6-5368add6de5c"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "6cB1yIGZtI0bxM60KD1ZMR"
+  },
+  {
+    "__type__": "cc.Canvas",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_designResolution": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1624
+    },
+    "_fitWidth": false,
+    "_fitHeight": true,
+    "_id": "b42DrKIf9Hr6FInPlWMROO"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "99gg41LT1KhocyDpwWNiT6"
+  },
+  {
+    "__type__": "572dd3BwulMAorbseYM96UQ",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "StartGameNode": {
+      "__id__": 6
+    },
+    "progress": {
+      "__id__": 31
+    },
+    "launchDesc": {
+      "__id__": 28
+    },
+    "Login": {
+      "__id__": 32
+    },
+    "_id": "b7X2d+N8ZKlI48AJ3H5ftz"
+  }
+]

+ 8 - 0
assets/LoadScene/LoadScene.fire.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.3.2",
+  "uuid": "18364748-5d4d-4a13-ba80-24a58690c521",
+  "importer": "scene",
+  "asyncLoadAssets": false,
+  "autoReleaseAssets": false,
+  "subMetas": {}
+}

+ 475 - 0
assets/LoadScene/PreviewScene.fire

@@ -0,0 +1,475 @@
+[
+  {
+    "__type__": "cc.SceneAsset",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "scene": {
+      "__id__": 1
+    }
+  },
+  {
+    "__type__": "cc.Scene",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
+    "_active": false,
+    "_components": [],
+    "_prefab": null,
+    "_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
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_is3DNode": true,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "autoReleaseAssets": false,
+    "_id": "3b9f954d-83b1-476d-aad1-21e0d12c8fdd"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Canvas",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 8
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 9
+      },
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 252,
+      "g": 252,
+      "b": 252,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1624
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        375,
+        812,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "a286bbGknJLZpRpxROV6M94"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Main Camera",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "85OVmg6EVLoKbdmeaHrmFN"
+  },
+  {
+    "__type__": "cc.Camera",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 3
+    },
+    "_enabled": true,
+    "_cullingMask": 4294967295,
+    "_clearFlags": 7,
+    "_backgroundColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_depth": -1,
+    "_zoomRatio": 1,
+    "_targetTexture": null,
+    "_fov": 60,
+    "_orthoSize": 10,
+    "_nearClip": 1,
+    "_farClip": 4096,
+    "_ortho": true,
+    "_rect": {
+      "__type__": "cc.Rect",
+      "x": 0,
+      "y": 0,
+      "width": 1,
+      "height": 1
+    },
+    "_renderStages": 1,
+    "_alignWithScreen": true,
+    "_id": "e5jb+TvOJBKYayWZDPk8cb"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "background",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 6
+      },
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1624
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "4cXC+8HydETIvYvl574ayJ"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "821caffc-744e-4f8d-bc99-1e11d3f0a7ae"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "0avPNIYXhH3qSudhqiiy8G"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 1572,
+    "_originalHeight": 3408,
+    "_id": "36dpMJIRRF8J7pjXwQM57H"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "PopManger",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "aczX3cyz5FaqJVe4nd6T8f"
+  },
+  {
+    "__type__": "cc.Canvas",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_designResolution": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1624
+    },
+    "_fitWidth": false,
+    "_fitHeight": true,
+    "_id": "b42DrKIf9Hr6FInPlWMROO"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "99gg41LT1KhocyDpwWNiT6"
+  },
+  {
+    "__type__": "c6d956BLV5CxrIzawGCCnFM",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_id": "44Dk+N0XNAPJbMurpnLXHE"
+  }
+]

+ 8 - 0
assets/LoadScene/PreviewScene.fire.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.3.2",
+  "uuid": "3b9f954d-83b1-476d-aad1-21e0d12c8fdd",
+  "importer": "scene",
+  "asyncLoadAssets": false,
+  "autoReleaseAssets": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/LoadScene/Sp.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "74888a4f-ae51-4d20-b638-22c24d0a7ff5",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

BIN
assets/LoadScene/Sp/1.png


+ 38 - 0
assets/LoadScene/Sp/1.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "1a67b3b5-7b62-4cc7-a856-23063635e56f",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 1572,
+  "height": 3408,
+  "platformSettings": {},
+  "subMetas": {
+    "1": {
+      "ver": "1.0.6",
+      "uuid": "821caffc-744e-4f8d-bc99-1e11d3f0a7ae",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "1a67b3b5-7b62-4cc7-a856-23063635e56f",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 1572,
+      "height": 3408,
+      "rawWidth": 1572,
+      "rawHeight": 3408,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/LoadScene/Sp/2.png


+ 38 - 0
assets/LoadScene/Sp/2.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "7f362966-145a-4dc1-b23c-6428afd48b99",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 611,
+  "height": 277,
+  "platformSettings": {},
+  "subMetas": {
+    "2": {
+      "ver": "1.0.6",
+      "uuid": "34a18619-3d04-48cd-bcd7-faf2c07e01fe",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "7f362966-145a-4dc1-b23c-6428afd48b99",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 611,
+      "height": 277,
+      "rawWidth": 611,
+      "rawHeight": 277,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/LoadScene/Sp/4.png


+ 38 - 0
assets/LoadScene/Sp/4.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "ed31dc11-ce5b-41a3-88ef-c6fa4ee83918",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 863,
+  "height": 137,
+  "platformSettings": {},
+  "subMetas": {
+    "4": {
+      "ver": "1.0.6",
+      "uuid": "e129d4da-57ff-400f-94a7-ff38ce468088",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "ed31dc11-ce5b-41a3-88ef-c6fa4ee83918",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 863,
+      "height": 137,
+      "rawWidth": 863,
+      "rawHeight": 137,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/LoadScene/Sp/5.png


+ 38 - 0
assets/LoadScene/Sp/5.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "a9ea6b6d-2d66-4a85-af19-2be872264ec1",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 132,
+  "height": 170,
+  "platformSettings": {},
+  "subMetas": {
+    "5": {
+      "ver": "1.0.6",
+      "uuid": "22f24b6a-ed2d-49d7-820f-2419b9915fd2",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "a9ea6b6d-2d66-4a85-af19-2be872264ec1",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 4,
+      "trimY": 4,
+      "width": 124,
+      "height": 162,
+      "rawWidth": 132,
+      "rawHeight": 170,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/LoadScene/Sp/6.png


+ 38 - 0
assets/LoadScene/Sp/6.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "8d1593fe-3e52-4175-8e55-86b258e0437e",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 1007,
+  "height": 909,
+  "platformSettings": {},
+  "subMetas": {
+    "6": {
+      "ver": "1.0.6",
+      "uuid": "456d388c-3165-4f7c-890e-772ee9b08933",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "8d1593fe-3e52-4175-8e55-86b258e0437e",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 1007,
+      "height": 909,
+      "rawWidth": 1007,
+      "rawHeight": 909,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/LoadScene/Sp/7.png


+ 38 - 0
assets/LoadScene/Sp/7.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "d0863ce5-d1b9-426a-918b-c5cc0c5a5246",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 952,
+  "height": 94,
+  "platformSettings": {},
+  "subMetas": {
+    "7": {
+      "ver": "1.0.6",
+      "uuid": "a43b6efa-8839-4dd2-923f-4b60f1ae6edf",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "d0863ce5-d1b9-426a-918b-c5cc0c5a5246",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 952,
+      "height": 94,
+      "rawWidth": 952,
+      "rawHeight": 94,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/LoadScene/Sp/8.png


+ 38 - 0
assets/LoadScene/Sp/8.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "c248bbc8-8d83-4ddb-9ef2-dcf1d8cb5e1e",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 366,
+  "height": 70,
+  "platformSettings": {},
+  "subMetas": {
+    "8": {
+      "ver": "1.0.6",
+      "uuid": "9c0d6818-4a9a-4aac-81c6-5368add6de5c",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "c248bbc8-8d83-4ddb-9ef2-dcf1d8cb5e1e",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 366,
+      "height": 70,
+      "rawWidth": 366,
+      "rawHeight": 70,
+      "borderTop": 24,
+      "borderBottom": 23,
+      "borderLeft": 20,
+      "borderRight": 23,
+      "subMetas": {}
+    }
+  }
+}

+ 3 - 0
assets/LoadScene/Sp/AutoAtlas.pac

@@ -0,0 +1,3 @@
+{
+    "__type__": "cc.SpriteAtlas"
+}

+ 23 - 0
assets/LoadScene/Sp/AutoAtlas.pac.meta

@@ -0,0 +1,23 @@
+{
+  "ver": "1.2.5",
+  "uuid": "d8ab3c5e-e000-4a28-8d20-0b529356193e",
+  "importer": "auto-atlas",
+  "maxWidth": 1024,
+  "maxHeight": 1024,
+  "padding": 2,
+  "compressionLevel": 6,
+  "allowRotation": true,
+  "forceSquared": false,
+  "powerOfTwo": false,
+  "algorithm": "MaxRects",
+  "format": "png",
+  "quality": 80,
+  "contourBleed": true,
+  "paddingBleed": true,
+  "filterUnused": true,
+  "packable": false,
+  "premultiplyAlpha": false,
+  "filterMode": "bilinear",
+  "platformSettings": {},
+  "subMetas": {}
+}

+ 13 - 0
assets/Script.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 13 - 0
assets/Script/EventName.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "d998c68a-e79f-4032-989c-d07187b4f34c",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 193 - 0
assets/Script/EventName/EventName.ts

@@ -0,0 +1,193 @@
+
+export default class EventName {
+
+
+    /////////////////////////////////////////////////////////////////////HALL
+    //我在哪
+    static WhereMy = 'WhereMy'
+
+    //收藏选中
+    static CollectSelect = 'CollectSelect'
+
+
+    //手动刷新一次轮训
+    static UpdateOnce = 'UpdateOnce'
+
+
+
+
+
+
+
+
+
+
+
+    /////////////////////////////////////////////////////////////////////GAME
+    //更新渲染
+    static UpdataRender = 'UpdataRender'
+    //开始倒计时
+    static InitCountDown = 'InitCountDown'
+    static StartCountDown = 'StartCountDown'
+    static PauseCountDown = 'PauseCountDown'
+    static RestoreCountDown = 'RestoreCountDown'
+    static ADDCountDown = 'ADDCountDown'
+    static RestartCurrentLevel = 'RestartCurrentLevel'
+    //点击弹射入座
+    static NowSitDowninSeat = 'NowSitDowninSeat'
+    //播放弹射入座动画
+    static NowSitDowninSeatAnim = 'NowSitDowninSeatAnim'
+    //停止所有的跳跃选中动画
+    static StopNowSitDowninSeatAnim = 'StopNowSitDowninSeatAnim'
+
+
+
+
+
+    //GameOver
+    static GameOver = 'GameOver'
+
+
+    //下一关之前应该马上停止时间
+    static NextCoustomGameStop = 'NextCoustomGameStop'
+    //下一关
+    static NextCoustomGame = 'NextCoustomGame'
+
+    //执行发车命令
+    static driveBus = 'driveBus'
+
+    //发车完毕中间层
+    static driveBusMind = 'driveBusMind'
+    //发车完毕
+    static driveBusOver = 'driveBusOver'
+
+    //生成车子
+    static BronBus = 'BronBus'
+
+    //initRoleQueuePos
+    static initRoleQueuePos = 'initRoleQueuePos'
+
+    //生成地图 数据赋值
+    static BronMap = 'BronMap'
+    //生成乘客
+    static BronRole = 'BronRole'
+
+    //生成门
+    static BronDoor = 'BronDoor'
+    //关门
+    static CloseDoor = 'CloseDoor'
+
+
+    //乘客开始上车
+    static RoleStartBus = 'RoleStartBus'
+    //乘客停止上车
+    static RoleStopBus = 'RoleStopBus'
+
+
+
+
+
+    //使用道具跳跃
+    static UpdataPropCount = 'UpdataPropCount'
+
+    //使用道具时间
+    static UserPropTime = 'UserPropTime'
+
+    //使用道具跳跃
+    static UserPropJump = 'UserPropJump'
+
+}
+
+export class PopName {
+    // Notice 通知 
+    //荣誉通知
+    static FullAttendance = 'res/GameUI/Notice/FullAttendance'
+
+    //装扮通知
+    static DressUpPop = 'res/GameUI/Notice/DressUpPop'
+
+    //HR通知
+    static HrNotice = 'res/GameUI/Notice/HrNotice'
+
+    //HR 详情 通知
+    static HrDetails = 'res/GameUI/Notice/HrDetails'
+
+    //////////////////////////////////////////////////////////////////////////////////////////
+    //预加载场景动画
+    static StartAnim = 'res/GameUI/StartAnim'
+    //难度飙升
+    static DifficultyUp = 'res/GameUI/DifficultyUp'
+    //set
+    static Seting = 'res/GameUI/Seting'
+    //游戏暂停
+    static GamePause = 'res/GameUI/GamePause'
+    //没免费次数了 再来一次
+    static JustAgain = 'res/GameUI/JustAgain'
+    //通关成功
+    static Successfully = 'res/GameUI/Successfully'
+    //时间暂停动画
+    static TimePause = 'res/GameUI/TimePause'
+    //荣誉墙
+    static HonorWall = 'res/GameUI/HonorWall'
+    //隐私
+    static Privacy = 'res/GameUI/Privacy'
+
+    //收藏
+    static Collect = 'res/GameUI/Collect'
+    //收藏详情穿戴
+    static DressUp = 'res/GameUI/DressUp'
+
+    //内推
+    static EmployeeReferral = 'res/GameUI/EmployeeReferral'
+
+    //我的工卡
+    static IDcard = 'res/GameUI/IDcard'
+
+    //我的工卡
+    static Rank = 'res/GameUI/Rank'
+
+    static GameOverMid = 'res/GameUI/GameOverMid'
+    static GameOverEnd = 'res/GameUI/GameOverEnd'
+
+
+    static TimeOver_1 = 'res/GameUI/TimeOver_1'
+    static TimeOver_2 = 'res/GameUI/TimeOver_2'
+
+
+    //第几车
+    static CurrentLevel = 'res/GameUI/CurrentLevel'
+
+
+    //使用道具
+    static UserProp = 'res/GameUI/UserProp'
+}
+
+
+
+export class ItemName {
+    //勋章子元素
+    static HonorItem = 'res/GameUI/item/HonorItem'
+    //收藏子元素
+    static Collectitem = 'res/GameUI/item/Collectitem'
+}
+
+
+
+
+// 蓝	灰	粉	红	黄	蓝2	灰2	粉2	红2	黄2
+// 1	3	5	7	9	11	13	15	17	19
+// 2	4	6	8	10	12	14	16	18	20
+
+export enum SofaColor {
+    无 = -1,
+    蓝 = 1,
+    灰 = 2,
+    粉 = 3,
+    红 = 4,
+    黄 = 5,
+}
+
+export enum SofaDir {
+    正 = 0,
+    反 = 1,
+}

+ 10 - 0
assets/Script/EventName/EventName.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "fd8eb8c9-38d0-4782-85d0-46b0b92a19b7",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/Script/GameLogic.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "95fced78-4e8c-414a-b005-b890ce778439",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 95 - 0
assets/Script/GameLogic/CloseDoor.ts

@@ -0,0 +1,95 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName from "../EventName/EventName";
+import LocalData from "../Template/LocalData";
+import MyComponent from "../Template/MyComponent";
+import { BusType, CloseDoorPos } from "./DataConfig";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class CloseDoor extends MyComponent {
+
+    @property(sp.Skeleton)
+    leftNode: sp.Skeleton = null;
+
+    @property(sp.Skeleton)
+    RightNode: sp.Skeleton = null;
+
+
+    sendOver = false
+
+    onLoad() {
+        super.onLoad();
+
+        this.regEvent(EventName.BronDoor, this.BronDoor, this)
+        this.regEvent(EventName.CloseDoor, this.CloseDoor, this)
+    }
+    //默认皮肤
+    defaultSkin = 2
+    BronDoor() {
+
+        this.sendOver = false
+        let MenSkeletons = [this.RightNode, this.leftNode]
+        MenSkeletons.forEach(e => {
+            e.node.active = false
+        })
+
+        //得到当前关卡的门的数据
+        let MenData = CloseDoorPos[BusType][LocalData.getInstance().getBusSkin()]
+
+        let MenCount = 0
+
+        if (MenData.pos.length == 2) {
+            MenCount = 2
+        } else {
+            MenCount = 1
+        }
+        for (let index = 0; index < MenCount; index++) {
+            let MenSkeleton = MenSkeletons[index]
+            MenSkeleton.node.active = true
+
+            MenSkeleton.setSkin('门0' + LocalData.getInstance().getBusSkin())
+
+            MenSkeleton.node.setScale(MenData.scale[index][0], MenData.scale[index][1])
+            MenSkeleton.node.setPosition(MenData.pos[index][0], MenData.pos[index][1])
+
+            MenSkeletons[index].setAnimation(0, '待机', false)
+
+        }
+
+
+    }
+
+
+    CloseDoor() {
+
+
+        let MenSkeletons = [this.RightNode, this.leftNode]
+
+        for (let index = 0; index < MenSkeletons.length; index++) {
+
+            if (MenSkeletons[index].node.active) {
+
+                MenSkeletons[index].timeScale = 2
+
+                //待机_站 待机_坐 坐 走路
+                let dddd = MenSkeletons[index].setAnimation(0, '关门', false)
+
+
+                this.scheduleOnce(() => {
+                    if (this.sendOver == false) {
+                        this.sendOver = true
+                        cc.systemEvent.emit(EventName.NextCoustomGame)
+                    }
+                }, dddd.animationEnd / 2)
+            }
+        }
+    }
+
+}

+ 10 - 0
assets/Script/GameLogic/CloseDoor.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "2a6463d6-dec0-4fbb-b060-5e0c3a8128db",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 1833 - 0
assets/Script/GameLogic/DataConfig.ts

@@ -0,0 +1,1833 @@
+
+
+// 蓝	灰	粉	红	黄	蓝2	灰2	粉2	红2	黄2
+// 1	3	5	7	9	11	13	15	17	19
+// 2	4	6	8	10	12	14	16	18	20
+
+import { SofaColor } from "../EventName/EventName"
+
+
+
+export const tiledSize = cc.size(81, 78)//每个小地板的 尺寸
+export const leftButtomStatPos = cc.v2(0, 0)
+
+
+
+//千位是否是锁
+export var tableData = [
+    [0, 0, 0, 0, 0, 0],
+    [0, 0, 0, 0, 0, 0],
+    [0, 0, 0, 0, 0, 0],
+    [0, 0, 0, 0, 0, 0],
+    [0, 0, 0, 0, 0, 0],
+    [99, 0, 99, 99, 99, 99],
+    [99, 0, 99, 99, 99, 99],
+    [0, 0, 0, 0, 0, 0],
+    [0, 0, 0, 0, 0, 0],
+    [0, 0, 0, 0, 0, 0],
+    [0, 0, 0, 0, 0, 0],
+    [0, 0, 0, 0, 0, 0],
+]
+
+//车子的宽
+export var tableDataX = 6
+//车子的高
+export var tableDataY = 12
+
+//当前灰色沙发允许做的颜色
+export var GraySitDownColor = SofaColor.粉
+
+//当前排队人数
+export var RoloQueues = []
+
+//当前倒计时
+export var GlobalCountDownTime = 0
+
+
+//地图加载 是否完毕的标识
+export var MapInitOver = false
+//人物加载 是否完毕的标识
+export var RoloInitOver = false
+
+
+
+
+export var MenX = 5
+export var MenY = 11
+
+
+export var MenXLeft = 5
+export var MenYLeft = 11
+
+
+//车子类型
+export var BusType = 1
+
+
+
+export type BusNodeDataType = {
+    'fllow': number[],
+    'BusMod2': number[],
+    'BusMod4': number[],
+    'BusMod1': number[],
+    'BusMod3': number[],
+    'gameLayer': number[],
+    'BusModSp': number[],
+    'MapScale': number,
+    'BusScale': number,
+    'RoleScale': number,
+    'BgImage': string,
+    'Rail': number[][],
+}
+
+export var BusNodeData = {
+    //#region 3x2+1x11   7x11 类型 皮肤类型
+    1: [{
+        'fllow': [-282.844, -475.78],
+        'gameLayer': [-282.844, -475.78],
+        'BusMod2': null,
+        'BusMod4': [-375, -812],//x.y.图片名称
+        'BusMod1': [-375, -812],
+        'BusMod3': null,
+        'BusModSp': [1, null, null, 2],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-282.844, -475.78],
+        'gameLayer': [-282.844, -475.78],
+        'BusMod2': null,
+        'BusMod4': [-375, -812],//x.y.图片名称
+        'BusMod1': [-375, -812],
+        'BusMod3': null,
+        'BusModSp': [1, null, null, 2],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': [[-157.83, 13.902, 1, 1], [158.388, 13.902, 1, 1]],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-282.844, -475.78],
+        'gameLayer': [-282.844, -475.78],
+        'BusMod2': null,
+        'BusMod4': [-375, -812],//x.y.图片名称
+        'BusMod1': [-375, -812],
+        'BusMod3': null,
+        'BusModSp': [1, null, null, 2],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-282.844, -470.926],
+        'gameLayer': [-282.844, -470.926],
+        'BusMod2': null,
+        'BusMod4': [-375, -812],//x.y.图片名称
+        'BusMod1': [-375, -812],
+        'BusMod3': null,
+        'BusModSp': [1, null, null, 2],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': [[-157.83, 13.902, 1, 1], [158.388, 13.902, 1, 1]],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-282.844, -470.926],
+        'gameLayer': [-282.844, -470.926],
+        'BusMod2': null,
+        'BusMod4': [-375, -812],//x.y.图片名称
+        'BusMod1': [-375, -812],
+        'BusMod3': null,
+        'BusModSp': [1, null, null, 2],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': [[-157.83, 13.902, 1, 1], [158.388, 13.902, 1, 1]],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-309.644, -506.234],
+        'gameLayer': [-309.644, -506.234],
+        'BusMod2': null,
+        'BusMod4': [-544.441, -1124.433],//x.y.图片名称
+        'BusMod1': [-544.441, -1124.433],
+        'BusMod3': null,
+        'BusModSp': [1, null, null, 2],
+        'MapScale': 0.893,
+        'BusScale': 1.3,
+        'RoleScale': 0.893,
+        'BgImage': 'res/Bg/海'
+    }, {
+        'fllow': [-343.261, -402.212],
+        'gameLayer': [-343.261, -402.212],
+        'BusMod2': null,
+        'BusMod4': [-571.481, -1026.478],//x.y.图片名称
+        'BusMod1': [-571.481, -1025.042],
+        'BusMod3': null,
+        'BusModSp': [1, null, null, 2],
+        'MapScale': 0.98,
+        'BusScale': 1.35,
+        'RoleScale': 0.98,
+        'BgImage': 'res/Bg/背景'
+    }],
+    //#endregion
+
+
+    //#region            4x7 类型 皮肤类型
+    2: [{
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1180.689],//x.y.图片名称
+        'BusMod1': [-555.763, -1180.689],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1180.689],//x.y.图片名称
+        'BusMod1': [-555.763, -1180.689],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': [[-60, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1180.689],//x.y.图片名称
+        'BusMod1': [-555.763, -1180.689],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1180.689],//x.y.图片名称
+        'BusMod1': [-555.763, -1180.689],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': [[-60, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1180.689],//x.y.图片名称
+        'BusMod1': [-555.763, -1180.689],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': [[-74, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1180.689],//x.y.图片名称
+        'BusMod1': [-555.763, -1180.689],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'BgImage': 'res/Bg/海'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1180.689],//x.y.图片名称
+        'BusMod1': [-555.763, -1180.689],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'BgImage': 'res/Bg/背景'
+    }],
+    //#endregion
+
+
+    //#region            4x8 类型 皮肤类型
+    3: [{
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1129.354],//x.y.图片名称
+        'BusMod1': [-555.763, -1129.354],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1129.354],//x.y.图片名称
+        'BusMod1': [-555.763, -1129.354],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': [[-60, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1129.354],//x.y.图片名称
+        'BusMod1': [-555.763, -1129.354],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1129.354],//x.y.图片名称
+        'BusMod1': [-555.763, -1129.354],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': [[-60, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1129.354],//x.y.图片名称
+        'BusMod1': [-555.763, -1129.354],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'Rail': [[-66, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1129.354],//x.y.图片名称
+        'BusMod1': [-555.763, -1129.354],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'BgImage': 'res/Bg/海'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-555.763, -1129.354],//x.y.图片名称
+        'BusMod1': [-555.763, -1129.354],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.3,
+        'BusScale': 1.3,
+        'RoleScale': 1.3,
+        'BgImage': 'res/Bg/背景'
+    }],
+    //#endregion
+
+
+    //#region            5x8 类型 皮肤类型
+    4: [{
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-496.749, -1027.72],//x.y.图片名称
+        'BusMod1': [-496.749, -1027.72],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-496.749, -1027.72],//x.y.图片名称
+        'BusMod1': [-496.749, -1027.72],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'Rail': [[-35, 13.902, 1.3, 1.3], null],///////////////
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-496.749, -1027.72],//x.y.图片名称
+        'BusMod1': [-496.749, -1027.72],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-496.749, -1027.72],//x.y.图片名称
+        'BusMod1': [-496.749, -1027.72],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'Rail': [[-37, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-496.749, -1027.72],//x.y.图片名称
+        'BusMod1': [-496.749, -1027.72],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'Rail': [[-38, 13.902, 1.2, 1.2], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-496.749, -1027.72],//x.y.图片名称
+        'BusMod1': [-496.749, -1027.72],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'BgImage': 'res/Bg/海'
+    }, {
+        'fllow': [-278.372, -509.388],
+        'gameLayer': [-278.372, -509.388],
+        'BusMod2': null,
+        'BusMod4': [-496.749, -1027.72],//x.y.图片名称
+        'BusMod1': [-496.749, -1027.72],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'BgImage': 'res/Bg/背景'
+    }],
+    //#endregion
+
+
+    //#region            5x11 类型 皮肤类型
+    5: [{
+        'fllow': [-283.82, -581.042],
+        'gameLayer': [-283.82, -581.042],
+        'BusMod2': null,
+        'BusMod4': [-493.869, -874.512],//x.y.图片名称
+        'BusMod1': [-493.869, -874.512],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-283.82, -581.042],
+        'gameLayer': [-283.82, -581.042],
+        'BusMod2': null,
+        'BusMod4': [-493.869, -874.512],//x.y.图片名称
+        'BusMod1': [-493.869, -874.512],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'Rail': [[-40, 13.902, 1.3, 1.3], null],///////////////
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-283.82, -581.042],
+        'gameLayer': [-283.82, -581.042],
+        'BusMod2': null,
+        'BusMod4': [-493.869, -874.512],//x.y.图片名称
+        'BusMod1': [-493.869, -874.512],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-283.82, -581.042],
+        'gameLayer': [-283.82, -581.042],
+        'BusMod2': null,
+        'BusMod4': [-493.869, -874.512],//x.y.图片名称
+        'BusMod1': [-493.869, -874.512],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.2,
+        'BusScale': 1.2,
+        'RoleScale': 1.2,
+        'Rail': [[-43, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-252.836, -452.315],
+        'gameLayer': [-252.836, -452.315],
+        'BusMod2': null,
+        'BusMod4': [-600.872, -1216.356],//x.y.图片名称5
+        'BusMod1': [-600.639, -1212.792],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.1,
+        'BusScale': 1.5,
+        'RoleScale': 1.1,
+        'Rail': [[-32, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-289.305, -577.853],
+        'gameLayer': [-289.305, -577.853],
+        'BusMod2': null,
+        'BusMod4': [-658.1, -1389.637],//x.y.图片名称
+        'BusMod1': [-658.1, -1389.637],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.17,
+        'BusScale': 1.6,
+        'RoleScale': 1.17,
+        'BgImage': 'res/Bg/海'
+    }, {
+        'fllow': [-257.486, -533.114],
+        'gameLayer': [-257.486, -533.114],
+        'BusMod2': null,
+        'BusMod4': [-628.923, -1345.273],//x.y.图片名称
+        'BusMod1': [-628.923, -1345.832],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.17,
+        'BusScale': 1.6,
+        'RoleScale': 1.17,
+        'BgImage': 'res/Bg/背景'
+    }],
+    //#endregion
+
+
+    //#region            6x10 类型 皮肤类型
+    6: [{
+        'fllow': [-278.372, -509.288],
+        'gameLayer': [-278.372, -509.288],
+        'BusMod2': null,
+        'BusMod4': [-411.465, -782.903],//x.y.图片名称
+        'BusMod1': [-411.465, -782.903],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.288],
+        'gameLayer': [-278.372, -509.288],
+        'BusMod2': null,
+        'BusMod4': [-411.465, -782.903],//x.y.图片名称
+        'BusMod1': [-411.465, -782.903],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': [[-37, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.288],
+        'gameLayer': [-278.372, -509.288],
+        'BusMod2': null,
+        'BusMod4': [-411.465, -782.903],//x.y.图片名称
+        'BusMod1': [-411.465, -782.903],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-278.372, -509.288],
+        'gameLayer': [-278.372, -509.288],
+        'BusMod2': null,
+        'BusMod4': [-411.465, -782.903],//x.y.图片名称
+        'BusMod1': [-411.465, -782.903],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': [[-34, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-282.054, -416.883],
+        'gameLayer': [-282.054, -416.883],
+        'BusMod2': null,
+        'BusMod4': [-600.872, -1216.356],//x.y.图片名称
+        'BusMod1': [-600.639, -1212.792],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1,
+        'BusScale': 1.5,
+        'RoleScale': 1,
+        'Rail': [[-39, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-210.06, -420.809],
+        'gameLayer': [-210.06, -420.809],
+        'BusMod2': null,
+        'BusMod4': [-411.959, -861.165],//x.y.图片名称6
+        'BusMod1': [-411.959, -861.165],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 0.86,
+        'BusScale': 1.1,
+        'RoleScale': 0.86,
+        'BgImage': 'res/Bg/海'
+    }, {
+        'fllow': [-261.439, -429.379],
+        'gameLayer': [-261.439, -429.379],
+        'BusMod2': null,
+        'BusMod4': [-599.185, -1283.031],//x.y.图片名称7
+        'BusMod1': [-599.185, -1283.59],
+        'BusMod3': null,
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1.07,
+        'BusScale': 1.6,
+        'RoleScale': 1.07,
+        'BgImage': 'res/Bg/背景'
+    }],
+    //#endregion
+
+
+    //#region            6x12 类型 皮肤类型
+    7: [{
+        'fllow': [-278.372, -559.388],
+        'gameLayer': [-278.372, -559.388],
+        'BusMod2': [-318.467, -635.103],
+        'BusMod4': [-318.467, -635.103],
+        'BusMod1': [-318.467, -635.103],
+        'BusMod3': [-318.467, -635.103],
+        'BusModSp': [1, 2, 3, 4],
+        'MapScale': 1,
+        'BusScale': 1,
+        'RoleScale': 1,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-338, -581],
+        'gameLayer': [-338, -581],
+        'BusMod2': [-575.083, -1195.585],
+        'BusMod4': [-575.6, -1178.467],
+        'BusMod1': [-575.192, -1193.314],
+        'BusMod3': [-575.044, -1177.408],
+        'BusModSp': [1, 2, 3, 4],
+        'MapScale': 1.2,
+        'BusScale': 1.4,
+        'RoleScale': 1.2,
+        'Rail': [[-46.441, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-306.97, -616.259],
+        'gameLayer': [-306.97, -616.259],
+        'BusMod2': [-452.339, -993.942],
+        'BusMod4': [-452.856, -994.791],
+        'BusMod1': [-452.448, -991.671],
+        'BusMod3': [-452.3, -990.978],
+        'BusModSp': [1, 2, 3, 4],
+        'MapScale': 1.1,
+        'BusScale': 1.1,
+        'RoleScale': 1.1,
+        'Rail': null,
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-306.97, -616.259],
+        'gameLayer': [-306.97, -616.259],
+        'BusMod2': [-644.737, -1364.247],
+        'BusMod4': [-643.678, -1343.396],
+        'BusMod1': [-645.23, -1359.001],
+        'BusMod3': [-644.122, -1343.541],
+        'BusModSp': [1, 2, 3, 4],
+        'MapScale': 1.1,
+        'BusScale': 1.6,
+        'RoleScale': 1.1,
+        'Rail': [[-37, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-306.97, -616.259],
+        'gameLayer': [-306.97, -616.259],
+        'BusMod2': [-452.031, -994.64],
+        'BusMod4': [-452.149, -996.357],
+        'BusMod1': [-453.701, -993.615],
+        'BusMod3': [-452.593, -995.597],
+        'BusModSp': [1, 2, 3, 4],
+        'MapScale': 1.1,
+        'BusScale': 1.1,
+        'RoleScale': 1.1,
+        'Rail': [[-41, 13.902, 1.3, 1.3], null],
+        'BgImage': 'res/Bg/背景'
+    }, {
+        'fllow': [-307.327, -580.149],
+        'gameLayer': [-307.327, -580.149],
+        'BusMod2': [-571.481, -1026.968],
+        'BusMod4': [-571.481, -1026.478],
+        'BusMod1': [-571.481, -1026.968],
+        'BusMod3': [-571.481, -1026.478],
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1,
+        'BusScale': 1.35,
+        'RoleScale': 1,
+        'BgImage': 'res/Bg/海'
+    }, {
+        'fllow': [-286.547, -409.942],
+        'gameLayer': [-286.547, -409.942],
+        'BusMod2': [-706.422, -1201.846],
+        'BusMod4': [-706.422, -1201.846],
+        'BusMod1': [-706.422, -1202.405],
+        'BusMod3': [-706.422, -1202.405],
+        'BusModSp': [2, null, null, 1],
+        'MapScale': 1,
+        'BusScale': 1.76,
+        'RoleScale': 1,
+        'BgImage': 'res/Bg/背景'
+    }],
+    //#endregion
+}
+
+
+export type MapRoleQueuePosType = {
+    'type': number,
+    'pos': number[],
+    'pos1': number[],
+    'an': number[][],
+}
+//地图上乘客排队的精确位置 ,
+export var MapRoleQueuePos = {
+    1: [{
+        type: 1,
+        pos: [619, 783],//7*11
+    }, {
+        type: 1,
+        pos: [637, 805],//7*11
+    }, {
+        type: 1,
+        pos: [637, 805],//7*11
+    }, {
+        type: 1,
+        pos: [637, 805],//7*11
+    }, {
+        type: 1,
+        pos: [637, 805],//7*11
+    }, {
+        type: 1,
+        pos: [723, 805],//7*11
+        an: [[333.634, -518, 1], null]
+    }, {
+        type: 1,
+        pos: [637, 805],//7*11
+    }],
+    2: [{
+        type: 1,
+        pos: [380, 482],//4*7
+    }, {
+        type: 1,
+        pos: [380, 482],//4*7
+    }, {
+        type: 1,
+        pos: [380, 482],//4*7
+    }, {
+        type: 1,
+        pos: [380, 482],//4*7
+    }, {
+        type: 1,
+        pos: [380, 482],//4*7
+    }, {
+        type: 1,
+        pos: [433, 482],//4*7
+        an: [[263.634, -518, 1], null]
+    }, {
+        type: 1,
+        pos: [380, 482],//4*7
+    }],
+    3: [{
+        type: 1,
+        pos: [378, 566],//4*8
+    }, {
+        type: 1,
+        pos: [378, 566],//4*8
+    }, {
+        type: 1,
+        pos: [390, 566],//4*8
+    }, {
+        type: 1,
+        pos: [378, 566],//4*8
+    }, {
+        type: 1,
+        pos: [378, 566],//4*8
+    }, {
+        type: 1,
+        pos: [421, 566],//4*8
+        an: [[263.634, -518, 1], null]
+    }, {
+        type: 1,
+        pos: [378, 566],//4*8
+    }],
+    4: [{
+        type: 1,
+        pos: [480, 565],//5*8
+    }, {
+        type: 1,
+        pos: [480, 565],//5*8
+    }, {
+        type: 1,
+        pos: [480, 565],//5*8
+    }, {
+        type: 1,
+        pos: [480, 565],//5*8
+    }, {
+        type: 1,
+        pos: [480, 565],//5*8
+    }, {
+        type: 1,
+        pos: [502, 565],//5*8
+        an: [[330.634, -518, 1], null]
+    }, {
+        type: 1,
+        pos: [480, 565],//5*8
+    }],
+    5: [{
+        type: 1,
+        pos: [475, 805],//5*11
+    }, {
+        type: 1,
+        pos: [475, 805],//5*11
+    }, {
+        type: 1,
+        pos: [475, 805],//5*11
+    }, {
+        type: 1,
+        pos: [475, 805],//5*11
+    }, {
+        type: 1,
+        pos: [475, 805],//5*11
+    }, {
+        type: 1,
+        pos: [521, 805],//5*11
+        an: [[316.634, -279, 1], null]
+    }, {
+        type: 1,
+        pos: [475, 805],//5*11
+    }],
+    6: [{
+        type: 2,
+        pos: [561, 725],//5*11
+        pos1: [-57, 193],//5*11
+    }, {
+        type: 2,
+        pos: [561, 725],//5*11
+        pos1: [-57, 193],//5*11
+    }, {
+        type: 2,
+        pos: [561, 725],//5*11
+        pos1: [-57, 193],//5*11
+    }, {
+        type: 2,
+        pos: [561, 725],//5*11
+        pos1: [-57, 193],//5*11
+    }, {
+        type: 2,
+        pos: [561, 725],//5*11
+        pos1: [-57, 193],//5*11
+    }, {
+        type: 2,
+        pos: [621, 725],//5*11
+        pos1: [-142, 193],//5*11
+        an: [[316.634, -279, 1], [-333.763, 400, 1]] 
+    }, {
+        type: 2,
+        pos: [561, 725],//5*11
+        pos1: [-57, 193],//5*11
+    }],
+    7: [{
+        type: 1,
+        pos: [570, 891],//5*11
+    }, {
+        type: 1,
+        pos: [535, 891],//5*11
+    }, {
+        type: 1,
+        pos: [570, 891],//5*11
+    }, {
+        type: 1,
+        pos: [570, 891],//5*11
+    }, {
+        type: 1,
+        pos: [570, 891],//5*11
+    }, {
+        type: 1,
+        pos: [637, 891],//5*11
+        an: [[316.634, -367, 1], null]/////////////todo
+    }, {
+        type: 1,
+        pos: [570, 891],//5*11
+    }],
+}
+
+
+export var MenPos = {
+    1: [[6, 10]],//7*11
+    2: [[3, 6]],//4*7
+    3: [[3, 7]],//4*8
+    4: [[4, 7]],//5*8
+    5: [[4, 10]],//5*11
+    6: [[5, 9], [0, 2]],// 右门 左门
+    7: [[5, 11]],//6*12
+}
+
+
+
+export type CloseDoorPosType = {
+    [key: number]: {
+        [key: number]: {
+            pos: number[][];
+            scale: number[][];
+        };
+    };
+};
+
+
+export var CloseDoorPos: CloseDoorPosType = {
+    1: {//关卡类型
+        1: {
+            'pos': [[327, 408]],
+            'scale': [[2, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        2: {
+            'pos': [[324, 416]],
+            'scale': [[2, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        3: {
+            'pos': [[342, 423]],
+            'scale': [[2.5, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        4: {
+            'pos': [[309, 410]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        5: {
+            'pos': [[310, 420]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        6: {
+            'pos': [[226, 304]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        7: {
+            'pos': [[241, 470]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+    },//7*11
+    2: {
+        1: {
+            'pos': [[188, 219]],
+            'scale': [[2, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        2: {
+            'pos': [[188, 219]],
+            'scale': [[2, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        3: {
+            'pos': [[188, 219]],
+            'scale': [[2, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        4: {
+            'pos': [[179, 226]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        5: {
+            'pos': [[174, 237]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        6: {
+            'pos': [[173, 219]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        7: {
+            'pos': [[171, 230]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+    },//4*7
+    3: {
+        1: {
+            'pos': [[191, 337]],
+            'scale': [[2, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        2: {
+            'pos': [[197, 341]],
+            'scale': [[2.5, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        3: {
+            'pos': [[191, 337]],
+            'scale': [[2, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        4: {
+            'pos': [[175, 316]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        5: {
+            'pos': [[174, 336]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        6: {
+            'pos': [[173, 337]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        7: {
+            'pos': [[172, 337]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+    },//4*8
+    4: {
+        1: {
+            'pos': [[261, 263]],
+            'scale': [[2.2, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        2: {
+            'pos': [[261, 263]],
+            'scale': [[2.2, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        3: {
+            'pos': [[261, 263]],
+            'scale': [[2.2, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        4: {
+            'pos': [[232, 264]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        5: {
+            'pos': [[235, 273]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        6: {
+            'pos': [[231, 263]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        7: {
+            'pos': [[242, 263]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+    },//5*8
+    5: {
+        1: {
+            'pos': [[260, 484]],
+            'scale': [[2.4, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        2: {
+            'pos': [[258, 484]],
+            'scale': [[2.4, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        3: {
+            'pos': [[260, 484]],
+            'scale': [[2.4, 1.3]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        4: {
+            'pos': [[229, 474]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        5: {
+            'pos': [[215, 520]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        6: {
+            'pos': [[208, 484]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        7: {
+            'pos': [[248, 484]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+    },//5*11
+    6: {
+        1: {
+            'pos': [[256, 302], [-332, -381]],
+            'scale': [[2, 1], [-2, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        2: {
+            'pos': [[256, 302], [-332, -381]],
+            'scale': [[2, 1], [-2, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        3: {
+            'pos': [[256, 302], [-332, -381]],
+            'scale': [[2, 1], [-2, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        4: {
+            'pos': [[244, 302], [-313, -381]],
+            'scale': [[1, 1], [-1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        5: {
+            'pos': [[238, 397], [-320, -299]],
+            'scale': [[1, 1], [-1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        6: {
+            'pos': [[231, 288], [-256, -323]],
+            'scale': [[1, 1], [-1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        7: {
+            'pos': [[281, 427], [-293, -291]],
+            'scale': [[1, 1], [-1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+    }, //双门
+    7: {
+        1: {
+            'pos': [[265, 402]],
+            'scale': [[2, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        2: {
+            'pos': [[289, 580]],
+            'scale': [[2.5, 1.5]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        3: {
+            'pos': [[289, 470]],
+            'scale': [[2.5, 1.5]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        4: {
+            'pos': [[247, 441]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        5: {
+            'pos': [[262, 449]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        6: {
+            'pos': [[203, 402]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+        7: {
+            'pos': [[227, 552]],
+            'scale': [[1, 1]],
+        },//皮肤  -》 具体位置  x y  scalex scaley
+    },//6*12
+}
+
+
+// [[5, 9], [1, 1]]
+export const ChangetableDataMen = (temp: number[][]) => {
+    if (BusType == 6) {
+        MenX = temp[0][0]
+        MenY = temp[0][1]
+
+        MenXLeft = temp[1][0]
+        MenYLeft = temp[1][1]
+    } else {
+
+        MenX = temp[0][0]
+        MenY = temp[0][1]
+    }
+}
+
+
+
+export const ChangetableDataBusSize = (temp: number[]) => {
+    tableDataX = temp[0]
+    tableDataY = temp[1]
+}
+
+export const ChangetableDataBusType = (temp: number) => {
+    BusType = temp
+}
+
+export const ChangetableData = (temp: number[][]) => {
+    if (!temp) {
+        return
+    }
+
+    //深拷贝一下
+    let a = []
+    for (let index = 0; index < temp.length; index++) {
+        a.push([...temp[index]])
+    }
+    tableData = a
+}
+export const ChangeGraySitDownColor = (temp: SofaColor) => {
+    GraySitDownColor = temp
+}
+export const ChangeRoloQueues = (temp: SofaColor[] | SofaColor[][]) => {
+    RoloQueues = temp
+}
+
+export const GetRoloQueues = () => {
+    if (BusType == 6) {
+        return RoloQueues
+    }
+
+    return RoloQueues
+}
+export const ChangeCountDown = (temp: number) => {
+    GlobalCountDownTime = temp
+}
+//设置人物加载 是否完毕的标识
+export const ChangeRoloInitOver = (temp: boolean) => {
+    RoloInitOver = temp
+}
+//设置地图加载 是否完毕的标识
+export const ChangeMapInitOver = (temp: boolean) => {
+    MapInitOver = temp
+}
+
+//#region 引导关卡数据
+export const MapData_ByYinDao = [
+    [//4*7 map 2
+        [0, 1, 1, 7],
+        [0, 0, 3, 3],
+        [0, 0, 0, 0],
+        [1, 0, 0, 0],
+        [1, 3, 0, 0],
+        [1, 0, 0, 0],
+        [0, 0, 0, 7],
+    ]
+]
+export var MapDataRoloQueues_ByYinDao = [
+    [//4*7  map2 
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.红,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.红,
+    ],
+]
+export var MapDataGraySitDownColor_ByYinDao = [
+    SofaColor.蓝,//第一关灰色可以坐下的乘客的颜色
+]
+
+export var MapDataCountDown_ByYinDao = [
+    1200
+]
+
+//当前车子类型
+export var MapDataBusTypes_ByYinDao = [
+    2,
+]
+//#endregion
+
+
+
+
+
+
+
+//#region 快速通关关卡
+export var MapData = [
+
+    [//7*11 map 1
+        [0, 0, 0, 99, 0, 1, 0],
+        [0, 0, 0, 99, 0, 1, 0],
+        [17, 0, 0, 0, 0, 1, 0],
+        [1, 0, 0, 99, 0, 1, 0],
+        [1, 0, 0, 99, 0, 1, 0],
+        [1, 0, 0, 99, 0, 1, 0],
+        [0, 0, 0, 99, 0, 1, 0],
+        [0, 15, 0, 99, 0, 1, 0],
+        [0, 0, 0, 99, 0, 1, 0],
+        [0, 1, 0, 0, 0, 1, 0],
+        [0, 0, 0, 99, 0, 1, 1],
+    ],
+
+    [//4*7 map 2
+        [0, 0, 0, 0],
+        [17, 0, 0, 0],
+        [0, 1, 15, 0],
+        [0, 1, 0, 0],
+        [0, 1, 0, 0],
+        [17, 0, 15, 0],
+        [0, 0, 0, 0],
+    ],
+    [//4*8 map 3
+        [0, 0, 0, 1],
+        [0, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 1, 0, 0],
+        [0, 1, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 0, 0],
+        [0, 0, 0, 1],
+    ],
+    [//5*8 map 4
+        [0, 0, 0, 0, 1],
+        [0, 0, 0, 0, 0],
+        [0, 0, 1, 0, 0],
+        [0, 0, 1, 0, 0],
+        [0, 0, 1, 0, 0],
+        [0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 1],
+    ], [//5*11  map 5
+        [0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0],
+        [0, 0, 1, 0, 0],
+        [0, 0, 1, 0, 0],
+        [0, 0, 1, 0, 0],
+        [0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 1],
+    ],
+
+    [//6*10 map 6
+        [0, 0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0, 1],
+        [1, 0, 12, 0, 0, 0],
+        [0, 1, 0, 0, 0, 0],
+        [1, 1, 0, 0, 1, 0],
+        [1, 1, 0, 0, 4, 0],
+        [1, 1, 0, 0, 0, 0],
+        [1, 1, 4, 0, 0, 0],
+        [0, 0, 4, 0, 0, 0],
+        [0, 4, 4, 0, 0, 1],
+    ],
+    [
+        // 6 * 12 map 7
+        [0, 0, 12, 0, 0, 0],
+        [17, 0, 19, 0, 20, 0],
+        [0, 15, 0, 0, 19, 0],
+        [0, 1, 13, 0, 1, 0],
+        [0, 1, 0, 0, 1, 0],
+        [99, 0, 99, 99, 99, 99],
+        [99, 0, 99, 99, 99, 99],
+        [19, 0, 0, 0, 0, 0],
+        [0, 0, 3, 19, 0, 0],
+        [5, 18, 0, 19, 0, 0],
+        [0, 13, 0, 1, 3, 0],
+        [0, 12, 0, 0, 0, 1],
+    ],
+
+
+
+
+
+
+]
+
+export var MapDataRoloQueues = [
+
+
+    [//4*7  map1
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+    ],
+
+    [//4*7  map2 
+        SofaColor.红,
+        SofaColor.红,
+        SofaColor.蓝,
+    ],
+    [//4*8 map 3
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+    ],
+    [//5*8 map 4
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+    ],
+    [//5*11  map 5
+        SofaColor.蓝,
+        SofaColor.蓝,
+        SofaColor.蓝,
+    ],
+
+    [//6*10  map 6
+        [
+            SofaColor.蓝,
+            SofaColor.蓝,
+            SofaColor.蓝,
+            SofaColor.蓝,
+        ],
+        [
+            SofaColor.蓝,
+            SofaColor.蓝,
+            SofaColor.蓝,
+
+        ]
+    ],
+
+    [//6*12  map7
+        SofaColor.黄,
+        SofaColor.黄,
+    ],
+
+
+
+]
+
+export var MapDataGraySitDownColor = [
+    SofaColor.蓝,//第一关灰色可以坐下的乘客的颜色
+    SofaColor.蓝,//第2关
+    SofaColor.蓝,
+    SofaColor.蓝,
+    SofaColor.蓝,
+    SofaColor.蓝,
+    SofaColor.蓝,
+    SofaColor.蓝
+]
+
+export var MapDataCountDown = [
+      112,//第一关需要的时间
+      112,//第2关需要的时间
+      112,
+      112,
+      112,
+      110,
+      112]
+
+//当前车子类型
+export var MapDataBusTypes = [
+    1,
+    2,
+    3,
+    4,
+    5,
+    6,
+    7,
+]
+
+//#endregion
+
+
+//#region 打包用关卡数据
+
+// export var MapData = [
+
+
+//     [//4*7 map 2
+//         [0, 1, 0, 1],
+//         [1, 0, 1, 0],
+//         [0, 1, 0, 1],
+//         [1, 0, 1, 0],
+//         [0, 1, 0, 1],
+//         [1, 0, 1, 0],
+//         [0, 1, 0, 1],
+//     ],
+//     [//5*8 map 4
+//         [1, 7, 9, 0, 3],
+//         [9, 7, 1, 15, 0],
+//         [0, 0, 4, 0, 0],
+//         [15, 0, 0, 1, 4],
+//         [0, 0, 3, 0, 0],
+//         [15, 0, 20, 0, 0],
+//         [14, 0, 0, 20, 0],
+//         [1, 7, 7, 0, 0],
+//     ],
+
+//     [//5*8 map 4
+//         [1, 0, 11, 0, 1009],
+//         [1007, 1, 1005, 1, 1],
+//         [1, 0, 19, 0, 0],
+//         [1009, 1, 1005, 1, 1005],
+//         [1, 2, 0, 11, 0],
+//         [1007, 0, 1, 1, 0],
+//         [1, 1, 0, 1009, 0],
+//         [0, 1005, 0, 11, 0],
+//     ],
+//     [//7*11 map 1
+//         [11, 0, 0, 99, 15, 0, 0],
+//         [1, 0, 0, 99, 0, 5, 0],
+//         [0, 1, 1, 5, 5, 5, 5],
+//         [11, 0, 0, 99, 5, 5, 0],
+//         [1, 1, 1, 99, 0, 5, 5],
+//         [0, 9, 9, 99, 17, 0, 0],
+//         [9, 0, 9, 99, 0, 17, 0],
+//         [0, 9, 0, 99, 7, 7, 0],
+//         [9, 9, 9, 99, 0, 3, 7],
+//         [3, 0, 1, 9, 17, 0, 0],
+//         [0, 9, 0, 99, 7, 0, 7,],
+//     ],
+
+//     [
+//         // 6 * 12 map 7
+//         [0, 0, 12, 0, 0, 0],
+//         [17, 0, 19, 0, 20, 0],
+//         [0, 15, 0, 0, 19, 0],
+//         [0, 1, 13, 0, 1, 0],
+//         [0, 1, 0, 0, 1, 0],
+//         [99, 0, 99, 99, 99, 99],
+//         [99, 0, 99, 99, 99, 99],
+//         [19, 0, 0, 0, 0, 0],
+//         [0, 0, 3, 19, 0, 0],
+//         [5, 18, 0, 19, 0, 0],
+//         [0, 13, 0, 1, 3, 0],
+//         [0, 12, 0, 0, 0, 0],
+//     ],
+
+//     [
+//         // 6 * 12 map 7
+//         [0, 0, 12, 0, 0, 0],
+//         [17, 0, 19, 0, 20, 0],
+//         [0, 15, 0, 0, 19, 0],
+//         [0, 1, 13, 0, 1, 0],
+//         [0, 1, 0, 0, 1, 0],
+//         [99, 0, 99, 99, 99, 99],
+//         [99, 0, 99, 99, 99, 99],
+//         [19, 0, 0, 0, 0, 0],
+//         [0, 0, 3, 19, 0, 0],
+//         [5, 18, 0, 19, 0, 0],
+//         [0, 13, 0, 1, 3, 0],
+//         [0, 12, 0, 0, 0, 0],
+//     ],
+// ]
+
+
+// export var MapDataRoloQueues = [
+
+//     [//4*7  map2
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//     ],
+//     [
+//         SofaColor.粉,
+//         SofaColor.粉,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.红,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.粉,
+//         SofaColor.粉,
+//         SofaColor.粉,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.粉,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.红,
+//         SofaColor.红,
+//         SofaColor.蓝,
+
+//     ],
+
+//     [
+//         SofaColor.粉,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.红,
+//         SofaColor.红,
+//         SofaColor.粉,
+//         SofaColor.粉,
+//         SofaColor.粉,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//     ],
+
+//     [
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.粉,
+//         SofaColor.粉,
+//         SofaColor.粉,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.红,
+//         SofaColor.红,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+
+//     ],
+
+//     [//6*12  map7
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.黄,
+//         SofaColor.红,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.红,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.粉,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//     ],
+//     [//6*12  map7
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.黄,
+//         SofaColor.红,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.黄,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.黄,
+//         SofaColor.黄,
+//         SofaColor.红,
+//         SofaColor.粉,
+//         SofaColor.红,
+//         SofaColor.粉,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//         SofaColor.蓝,
+//     ],
+// ]
+
+
+// export var MapDataGraySitDownColor = [
+//     SofaColor.蓝,//第一关灰色可以坐下的乘客的颜色
+//     SofaColor.蓝,//第2关
+//     SofaColor.蓝,
+//     SofaColor.蓝,
+//     SofaColor.蓝,
+//     SofaColor.蓝
+// ]
+
+
+// export var MapDataCountDown = [
+//     120,//第一关需要的时间
+//     180,//第2关需要的时间
+//     180,
+//     220,
+//     180,
+//     180
+// ]
+// //当前车子类型
+// export var MapDataBusTypes = [
+//     2,
+//     4,
+//     4,
+//     1,
+//     7,
+//     7,
+// ]
+//#endregion
+
+//设置正式地图函数
+export const SetMap = (Data: string) => {
+    // console.log(JSON.parse(Data));
+    console.error(Data);
+    try {
+        MapData = JSON.parse(Data['MapData'])
+    } catch (error) {
+        return console.error('MapData出错');
+    }
+    try {
+        MapDataRoloQueues = JSON.parse(Data['MapDataRoloQueues'])
+    } catch (error) {
+        return console.error('MapDataRoloQueues出错');
+    }
+    try {
+        MapDataGraySitDownColor = JSON.parse(Data['MapDataGraySitDownColor'])
+    } catch (error) {
+        return console.error('MapDataGraySitDownColor出错');
+    }
+    try {
+        MapDataCountDown = JSON.parse(Data['MapDataCountDown'])
+    } catch (error) {
+        return console.error('MapDataCountDown出错');
+    }
+    try {
+        MapDataBusTypes = JSON.parse(Data['MapDataBusTypes'])
+    } catch (error) {
+        return console.error('MapDataBusTypes出错');
+    }
+}
+
+//设置预览地图函数
+export const SetPreviewMap = (Mapobj: object) => {
+    try {
+        JSON.parse(Mapobj['MapData'])
+        JSON.parse(Mapobj['MapDataRoloQueues'])
+        JSON.parse(Mapobj['MapDataGraySitDownColor'])
+        JSON.parse(Mapobj['MapDataCountDown'])
+        JSON.parse(Mapobj['MapDataBusTypes'])
+    } catch (error) {
+        console.error(error);
+        console.error('序列化出错了');
+        debugger
+        return
+    }
+    if (Mapobj) {
+        MapData[0] = JSON.parse(Mapobj['MapData'])
+        MapDataRoloQueues[0] = JSON.parse(Mapobj['MapDataRoloQueues'])
+        MapDataGraySitDownColor[0] = JSON.parse(Mapobj['MapDataGraySitDownColor'])
+        MapDataCountDown[0] = JSON.parse(Mapobj['MapDataCountDown'])
+        MapDataBusTypes[0] = JSON.parse(Mapobj['MapDataBusTypes'])
+    }
+
+}
+
+

+ 10 - 0
assets/Script/GameLogic/DataConfig.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "a6af7658-bd55-422b-91f4-d4e6d879817e",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 444 - 0
assets/Script/GameLogic/Role.ts

@@ -0,0 +1,444 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { SofaColor, SofaDir } from "../EventName/EventName";
+import AudioManager from "../GameUI/AudioManager";
+import Down from "../GameUI/Down";
+import RoleQueue from "./RoleQueue";
+import Sofa from "./Sofa";
+import BarrierDrag from "./barrierDrag";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Role extends cc.Component {
+    @property(sp.SkeletonData)
+    Zhengmian: sp.SkeletonData = null
+    @property(sp.SkeletonData)
+    BeiMian: sp.SkeletonData = null
+    @property(sp.SkeletonData)
+    CeMian: sp.SkeletonData = null
+
+
+
+
+
+    MysPsKeleton: sp.Skeleton = null
+
+
+    MyColor: SofaColor
+
+
+    start() {
+
+    }
+
+
+    setColor() {
+        switch (this.MyColor) {
+            case SofaColor.蓝:
+                this.MysPsKeleton.setSkin('蓝')
+                break;
+            case SofaColor.灰:
+                console.log('没有这个灰色颜色的人物');
+                break;
+            case SofaColor.粉:
+                this.MysPsKeleton.setSkin('粉')
+                break;
+            case SofaColor.红:
+                this.MysPsKeleton.setSkin('红')
+                break;
+            case SofaColor.黄:
+                this.MysPsKeleton.setSkin('黄')
+                break;
+
+            default:
+                break;
+        }
+    }
+    init(RoleColor: SofaColor) {
+        this.MysPsKeleton = this.node.getComponent(sp.Skeleton)
+
+        this.MyColor = RoleColor
+
+        this.setColor()
+
+        //待机_站 待机_坐 坐 走路
+        this.MysPsKeleton.setAnimation(0, '待机_站', true)
+    }
+
+
+
+    SofaComponent: Sofa
+
+    //坐下
+    SitDown(SubData: { x: number, y: number, isleft: number, slefNode: cc.Node }) {
+        // console.log('坐下了得到');
+        this.SofaComponent = SubData.slefNode.getComponent(Sofa)
+
+
+        //切换父节点 自身位置修改
+        let pos = SubData.slefNode.convertToNodeSpaceAR(this.node.convertToWorldSpaceAR(cc.v2(0, 0)))
+        this.node.parent = SubData.slefNode
+        this.node.setSiblingIndex(0)
+        this.node.setPosition(pos)
+
+ 
+        //执行并且得到入座时间
+        let JumpSitDownTime = this.getRoleAnim().time
+
+        let targetPos = cc.v3(0, 0)
+
+        switch (SubData.isleft) {
+            case 0:
+                //单人
+                // targetPos =cc.v3(0, 0)
+                break;
+            case 1:
+                //双人左
+                // targetPos =cc.v3(0, 0)
+                break;
+            case 2:
+                //双人右
+                targetPos = cc.v3(77, 0)
+                break;
+            default:
+                break;
+        }
+
+        cc.tween(this.node)
+            .to(JumpSitDownTime * 0.85 * 0.5, { position: targetPos })
+            // .to(JumpSitDownTime, { position: targetPos }, { easing: dt => cc.easeBounceIn().easing(dt) })
+            .call(() => {
+                AudioManager.instance.playEffect(AudioManager.BUTTON_EFFECT1)
+                RoleQueue.SitdownRole++
+                this.SofaComponent.isLock = false
+                this.SofaComponent.NodeBarrierDragComp.ShowLock()
+                switch (SubData.isleft) {
+                    case 0:
+                        //单人
+                        this.SofaComponent.isTarget[0] = false
+                        break;
+                    case 1:
+                        //双人左
+                        this.SofaComponent.isTarget[0] = false
+                        break;
+                    case 2:
+                        //双人右
+                        this.SofaComponent.isTarget[1] = false
+                        break;
+                    default:
+                        break;
+                }
+            })
+            .start()
+    }
+
+
+    //弹射
+    NowSitDowAni(targetNode: cc.Node, isleft: number, SeatColor: SofaColor, Sofadir: SofaDir) {
+        this.SofaComponent = targetNode.getComponent(Sofa)
+
+
+        Down.NowJumping = false
+
+        let pos = targetNode.convertToNodeSpaceAR(this.node.convertToWorldSpaceAR(cc.v2(0, 0)))
+        this.node.parent = targetNode
+        this.node.setSiblingIndex(0)
+        this.node.setPosition(pos)
+
+        let time = 0
+        let dddd = this.MysPsKeleton.setAnimation(0, '弹射', false)
+        time = dddd.animationEnd
+
+
+        this.scheduleOnce(() => {
+            if (this.node.isValid) {
+                let time1 = 0
+                if (Sofadir == SofaDir.反) {
+                    this.MysPsKeleton.skeletonData = this.BeiMian
+                } else {
+                    this.MysPsKeleton.skeletonData = this.Zhengmian
+                }
+
+                this.setColor()
+                time1 = this.MysPsKeleton.setAnimation(0, '弹射', false).animationEnd
+                this.scheduleOnce(() => {
+                    this.setColor()
+                    time1 = this.MysPsKeleton.setAnimation(0, '待机_坐', true).animationEnd
+                }, time1)
+            }
+        }, time)
+
+
+        let pos1
+
+
+        //实际坐在哪个位置
+        let downseatIndex = 0
+
+        switch (isleft) {
+            case 0:
+                //单人
+                this.SofaComponent.isTarget[0] = true
+                this.SofaComponent.SofaSitDown[0] = 1
+                pos1 = cc.v2(0, 0)
+                downseatIndex = 0
+                break;
+            case 1:
+                //双人左
+                if (this.SofaComponent.SofaSitDown[0] == 0) {
+                    this.SofaComponent.isTarget[0] = true
+                    this.SofaComponent.SofaSitDown[0] = 1
+                    pos1 = cc.v2(0, 0)
+                    downseatIndex = 1
+                } else {
+                    this.SofaComponent.isTarget[1] = true
+                    this.SofaComponent.SofaSitDown[1] = 1
+                    pos1 = cc.v2(77, 0)
+                    downseatIndex = 2
+                }
+                break;
+            case 2:
+                //双人右
+                if (this.SofaComponent.SofaSitDown[1] == 0) {
+                    this.SofaComponent.isTarget[1] = true
+                    this.SofaComponent.SofaSitDown[1] = 1
+                    pos1 = cc.v2(77, 0)
+                    downseatIndex = 2
+                } else {
+                    this.SofaComponent.isTarget[0] = true
+                    this.SofaComponent.SofaSitDown[0] = 1
+                    pos1 = cc.v2(0, 0)
+                    downseatIndex = 1
+                }
+                break;
+            default:
+                break;
+        }
+
+
+        this.scheduleOnce(() => {
+            cc.tween(this.node)
+                .to(1.26, { position: pos1 }, { easing: 'sineOut' })
+                .call(() => {
+
+                    AudioManager.instance.playEffect(AudioManager.BUTTON_EFFECT1)
+                    RoleQueue.SitdownRole++
+                    switch (downseatIndex) {
+                        case 0:
+                            //单人
+                            this.SofaComponent.isTarget[0] = false
+                            break;
+                        case 1:
+                            //双人左
+                            this.SofaComponent.isTarget[0] = false
+                            break;
+                        case 2:
+                            //双人右
+                            this.SofaComponent.isTarget[1] = false
+                            break;
+                        default:
+                            break;
+                    }
+                    this.SofaComponent.isLock = false
+                    this.SofaComponent.NodeBarrierDragComp.ShowLock()
+                })
+                .start()
+        }, 0.06)
+
+
+
+    }
+
+
+
+
+    getRoleAnim() {
+        let time = 0
+
+        if (this.SofaComponent.NodeBarrierDragComp.MyisDouble()) {
+
+            if (this.SofaComponent.Sofadir === SofaDir.正) {
+                // console.log('zheng');
+                this.MysPsKeleton.skeletonData = this.Zhengmian
+
+                this.MysPsKeleton.timeScale = 2
+                this.setColor()
+                let dddd = this.MysPsKeleton.setAnimation(0, '坐', false)
+                time = dddd.animationEnd
+                this.scheduleOnce(() => {
+                    if (this.node.isValid) {
+                        this.MysPsKeleton.setAnimation(0, '待机_坐', true)
+                    }
+                }, time)
+            } else {
+                // console.log('fan');
+                this.MysPsKeleton.skeletonData = this.BeiMian
+                this.MysPsKeleton.timeScale = 2
+                this.setColor()
+                let dddd = this.MysPsKeleton.setAnimation(0, '坐', false)
+                time = dddd.animationEnd
+
+                this.scheduleOnce(() => {
+                    if (this.node.isValid) {
+                        this.MysPsKeleton.setAnimation(0, '待机_坐', true)
+                    }
+                }, time)
+            }
+
+
+
+        } else {
+            if (this.SofaComponent.Sofadir === SofaDir.正) {
+                // console.log('zheng');
+                this.MysPsKeleton.skeletonData = this.Zhengmian
+                this.MysPsKeleton.timeScale = 2
+                this.setColor()
+                let dddd = this.MysPsKeleton.setAnimation(0, '坐', false)
+                time = dddd.animationEnd
+                this.scheduleOnce(() => {
+                    if (this.node.isValid) {
+                        this.MysPsKeleton.setAnimation(0, '待机_坐', true)
+                    }
+                }, time)
+            } else {
+                // console.log('fan');
+                this.MysPsKeleton.skeletonData = this.BeiMian
+                this.MysPsKeleton.timeScale = 2
+                this.setColor()
+                let dddd = this.MysPsKeleton.setAnimation(0, '坐', false)
+                time = dddd.animationEnd
+
+                this.scheduleOnce(() => {
+                    if (this.node.isValid) {
+                        this.MysPsKeleton.setAnimation(0, '待机_坐', true)
+                    }
+                }, time)
+            }
+        }
+
+
+        return { time }
+
+    }
+    // update (dt) {}
+
+
+    lastDir: string = ''
+
+    //坐下
+    setRoleAnimbyRun(dir: string) {
+        if (this.lastDir == dir) {
+            return
+        }
+        switch (dir) {
+            case '左':
+                this.MysPsKeleton.skeletonData = this.CeMian
+                this.setColor()
+                this.node.scaleX = -0.2
+                this.MysPsKeleton.setAnimation(0, '走路', true)
+                break;
+            case '右':
+                this.MysPsKeleton.skeletonData = this.CeMian
+                this.setColor()
+                this.node.scaleX = 0.2
+                this.MysPsKeleton.setAnimation(0, '走路', true)
+                break;
+            case '上':
+                this.MysPsKeleton.skeletonData = this.Zhengmian
+                this.setColor()
+                this.node.scaleX = 0.2
+                this.MysPsKeleton.setAnimation(0, '走路', true)
+                break;
+            case '下':
+                this.MysPsKeleton.skeletonData = this.BeiMian
+                this.setColor()
+                this.node.scaleX = 0.2
+                this.MysPsKeleton.setAnimation(0, '走路', true)
+                break;
+            default:
+                break;
+        }
+        this.lastDir = dir
+    }
+
+
+    run(dir: string) {
+        switch (dir) {
+            case '上':
+                this.MysPsKeleton.skeletonData = this.Zhengmian
+                this.setColor()
+                this.node.scaleX = 0.2
+                this.MysPsKeleton.setAnimation(0, '走路', true)
+                break;
+            case '下':
+                this.MysPsKeleton.skeletonData = this.BeiMian
+                this.setColor()
+                this.node.scaleX = 0.2
+                this.MysPsKeleton.setAnimation(0, '走路', true)
+                break;
+            default:
+                break;
+        }
+    }
+
+    idle(dir: string) {
+        switch (dir) {
+            case '上':
+                this.MysPsKeleton.skeletonData = this.Zhengmian
+                this.setColor()
+                this.node.scaleX = 0.2
+                this.MysPsKeleton.setAnimation(0, '待机_站', true)
+                break;
+            case '下':
+                this.MysPsKeleton.skeletonData = this.BeiMian
+                this.setColor()
+                this.node.scaleX = 0.2
+                this.MysPsKeleton.setAnimation(0, '待机_站', true)
+                break;
+            default:
+                break;
+        }
+    }
+
+
+    //队伍第一站立
+    QueueFirstIdle(isRightQueue: boolean) {
+        //如果是右边的队列
+
+        this.MysPsKeleton.skeletonData = this.CeMian
+        this.setColor()
+
+        if (isRightQueue == true) {
+            this.node.scaleX = -0.2
+        } else {
+            // console.log(isRightQueue);
+            this.node.scaleX = 0.2
+        }
+        this.MysPsKeleton.setAnimation(0, '眨眼', true)
+    }
+
+
+
+
+    //其他人
+    QueueotherIdle(isRightQueue: boolean) {
+        //如果是右边的队列
+
+        if (isRightQueue == false) {
+            this.MysPsKeleton.skeletonData = this.BeiMian
+            this.setColor()
+            this.MysPsKeleton.setAnimation(0, '待机_站', true)
+        } else {
+            this.MysPsKeleton.skeletonData = this.Zhengmian
+            this.setColor()
+            this.MysPsKeleton.setAnimation(0, '待机_站', true)
+        }
+
+    }
+}

+ 10 - 0
assets/Script/GameLogic/Role.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "b7c8f296-adb7-49c6-b240-cbc7cad858be",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 774 - 0
assets/Script/GameLogic/RoleQueue.ts

@@ -0,0 +1,774 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName, { SofaColor, SofaDir } from "../EventName/EventName";
+import Down from "../GameUI/Down";
+import GamePause from "../GameUI/GamePause";
+import HonorManger from "../GameUI/HonorManger";
+import LocalData from "../Template/LocalData";
+import MyComponent from "../Template/MyComponent";
+import { BusNodeData, BusType, ChangeRoloInitOver, GetRoloQueues, GraySitDownColor, MapRoleQueuePos, MapRoleQueuePosType, MenX, MenXLeft, MenY, MenYLeft, leftButtomStatPos, tableData, tiledSize } from "./DataConfig";
+import Role from "./Role";
+import Sofa from "./Sofa";
+import { AStar } from "./aStar";
+import BarrierDrag from "./barrierDrag";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class RoleQueue extends MyComponent {
+
+    private aStar: AStar
+
+    // update (dt) {}
+    targetPos: cc.Vec2 = new cc.Vec2(0, 0)
+
+    selectNode: cc.Node = null
+
+    @property(cc.Node)
+    barrierLayer: cc.Node = null
+
+
+    @property(cc.Node)
+    gameLayer: cc.Node = null
+
+
+
+    //队列类型
+    RoleQueueType: number = 1
+
+    //人物预制体
+    @property(cc.Prefab)
+    Role: cc.Prefab = null
+
+    @property(cc.Node)
+    RoleQueue1: cc.Node = null
+
+    @property(cc.Node)
+    RoleQueue2: cc.Node = null
+
+    @property(cc.Node)
+    An1: cc.Node = null
+    @property(cc.Node)
+    An2: cc.Node = null
+
+    //是否发送了一次下一关的表示 。放置 双层队列发送两次
+    IsSendNextCoustomGameFlag = false
+
+
+    onLoad(): void {
+        super.onLoad();
+
+        RoleQueue.SitdownRole = 0
+
+
+        this.aStar = new AStar()
+
+        this.regEvent(EventName.BronRole, this.BronRoles, this)
+        this.regEvent(EventName.RoleStartBus, this.RoleStartBus, this)
+        this.regEvent(EventName.RoleStopBus, this.RoleStopBus, this)
+        this.regEvent(EventName.initRoleQueuePos, this.initRoleQueuePos, this)
+        this.regEvent(EventName.NowSitDowninSeatAnim, this.NowSitDowninSeatAnim, this)
+        this.regEvent(EventName.RestartCurrentLevel, this.RestartCurrentLevel, this)
+    }
+
+    RestartCurrentLevel() {
+        this.RoleQueue1.children.forEach(e => {
+            e.stopAllActions()
+            e.destroy()
+        })
+
+        this.RoleQueue2.children.forEach(e => {
+            e.stopAllActions()
+            e.destroy()
+        })
+
+        cc.systemEvent.emit(EventName.RoleStopBus)
+        cc.systemEvent.emit(EventName.NextCoustomGameStop)
+        cc.systemEvent.emit(EventName.CloseDoor)
+    }
+
+
+    NowSitDowninSeatAnim(targetNode: cc.Node, isleft: number, SeatColor: SofaColor, Sofadir: SofaDir) {
+        //按照先右边后左边的顺序
+        let rightRoleColor = this.RoleQueue1.children[0]?.getComponent(Role)
+        let leftRoleColor = this.RoleQueue2.children[0]?.getComponent(Role)
+
+
+
+        if (rightRoleColor?.MyColor == SeatColor ||
+            (SeatColor == SofaColor.灰 && GraySitDownColor == rightRoleColor?.MyColor)) {
+
+            cc.systemEvent.emit(EventName.StopNowSitDowninSeatAnim)
+            BarrierDrag.PlayJump = false
+            rightRoleColor.NowSitDowAni(targetNode, isleft, SeatColor, Sofadir)
+            //更新排队队列
+            this.UpdateRoleQueue(true)
+            return
+        }
+
+
+        if (leftRoleColor?.MyColor == SeatColor ||
+            (SeatColor == SofaColor.灰 && GraySitDownColor == leftRoleColor?.MyColor)
+        ) {
+            cc.systemEvent.emit(EventName.StopNowSitDowninSeatAnim)
+            BarrierDrag.PlayJump = false
+            leftRoleColor?.NowSitDowAni(targetNode, isleft, SeatColor, Sofadir)
+            //更新排队队列
+            this.UpdateRoleQueue(false)
+        }
+
+
+    }
+    // 此次管卡有多少乘客
+    TotalRole = 0;
+
+    // 现在坐下的乘客数量
+    static SitdownRole = 0;
+
+    //初始化队列
+    initRoleQueuePos() {
+        // console.log('initRoleQueuePos');
+
+        this.IsSendNextCoustomGameFlag = false
+        if (this.isValid) {
+            let temp: MapRoleQueuePosType = MapRoleQueuePos[BusType][LocalData.getInstance().getBusSkin() - 1]
+
+            this.node.scale = BusNodeData[BusType][LocalData.getInstance().getBusSkin() - 1].RoleScale
+            this.node.setPosition(BusNodeData[BusType][LocalData.getInstance().getBusSkin() - 1].gameLayer[0], BusNodeData[BusType][LocalData.getInstance().getBusSkin() - 1].gameLayer[1])
+
+
+            this.RoleQueueType = temp.type
+            //一个队列
+            if (temp.type == 1) {
+                let RoleQueue1 = this.RoleQueue1
+                RoleQueue1.setPosition(temp.pos[0], temp.pos[1])
+
+
+
+                if (!temp?.an) {
+                    return
+                }
+
+                if (temp?.an[0]) {
+                    this.An1.setPosition(temp.an[0][0], temp.an[0][1])
+                    this.An1.setScale(temp.an[0][2])
+                    this.An1.active = true
+                } else {
+                    this.An1.active = false
+                }
+
+                if (temp?.an[1]) {
+                    this.An2.active = true
+                } else {
+                    this.An2.active = false
+                }
+            }
+
+            //两个队列
+            if (temp.type == 2) {
+                let RoleQueue1 = this.RoleQueue1
+                RoleQueue1.setPosition(temp.pos[0], temp.pos[1])
+
+                let RoleQueue2 = this.RoleQueue2
+                RoleQueue2.setPosition(temp.pos1[0], temp.pos1[1])
+
+
+                if (!temp?.an) {
+                    return
+                }
+                
+                if (temp?.an[0]) {
+                    this.An1.setPosition(temp.an[0][0], temp.an[0][1])
+                    this.An1.setScale(temp.an[0][2])
+                    this.An1.active = true
+                } else {
+                    this.An1.active = false
+                }
+
+
+                if (temp?.an[1]) {
+                    this.An2.setPosition(temp.an[1][0], temp.an[1][1])
+                    this.An2.setScale(temp.an[1][2])
+                    this.An2.active = true
+                } else {
+                    this.An2.active = false
+                }
+
+            }
+        }
+    }
+
+    BronRoles() {
+        //第一个人出生时间
+        let First_time = 0
+        let last_time = 0.2
+
+        //第一个人是侧着站立
+        if (this.RoleQueueType == 1) {
+            //右边的队列
+            for (let index = 0; index < GetRoloQueues().length; index++) {
+                this.scheduleOnce(() => {
+                    const element = GetRoloQueues()[index];
+                    this.BronRole(element, this.RoleQueue1, true, index)
+                    if (index == GetRoloQueues().length - 1) {
+                        ChangeRoloInitOver(true)
+                    }
+                }, index > 0 ? last_time : First_time)
+            }
+            this.TotalRole = GetRoloQueues().length
+        }
+        if (this.RoleQueueType == 2) {
+            //右边的队列
+            for (let index = 0; index < GetRoloQueues()[0].length; index++) {
+                this.scheduleOnce(() => {
+                    const element = GetRoloQueues()[0][index];
+                    this.BronRole(element, this.RoleQueue1, true, index)
+                    if (index == GetRoloQueues()[0].length - 1) {
+                        ChangeRoloInitOver(true)
+                    }
+                }, index > 0 ? last_time : First_time)
+            }
+            //左边的队列
+            for (let index = 0; index < GetRoloQueues()[1].length; index++) {
+                this.scheduleOnce(() => {
+                    const element = GetRoloQueues()[1][index];
+                    this.BronRole(element, this.RoleQueue2, false, index)
+                    if (index == GetRoloQueues()[1].length - 1) {
+                        ChangeRoloInitOver(true)
+
+                    }
+                }, index > 0 ? last_time : First_time)
+            }
+            this.TotalRole = GetRoloQueues()[0].length + GetRoloQueues()[1].length
+        }
+        RoleQueue.SitdownRole = 0
+        console.log('开始发车');
+    }
+    //停止上车
+    RoleStopBus() {
+        this.unschedule(this.GoBus)
+    }
+
+    e_first_run_time = 0.15//0.2
+    e_run_time = 0.15//0.2
+    //每只乘客上车的间隔
+    e_GoBus_time = 0.15//0.2
+
+    //开始上车
+    RoleStartBus() {
+        this.schedule(this.GoBus, this.e_GoBus_time, cc.macro.REPEAT_FOREVER)
+    }
+
+    //上车逻辑
+    GoBus() {
+        //玩家在编辑中 不上人
+        if (BarrierDrag.PlayEditer == false || BarrierDrag.PlayJump == true) {
+            //创建完毕 更新一下渲染
+            cc.systemEvent.emit(EventName.UpdataRender)
+
+            //第一个人是侧着站立
+            if (this.RoleQueueType == 1) {
+                //右边的队列
+                this.StartOneNode(this.RoleQueue1.children[0]?.getComponent(Role).MyColor, true)
+            }
+
+            if (this.RoleQueueType == 2) {
+                //左边的队列
+
+                //左右随机出
+                // if (this.node.isValid) {
+                //     if (Math.random() > 0.5) {
+                //         this.StartOneNode(this.RoleQueue1.children[0]?.getComponent(Role).MyColor, true)
+                //     } else {
+                //         this.StartOneNode(this.RoleQueue2.children[0]?.getComponent(Role).MyColor, false)
+                //     }
+                // }
+
+
+                //优先出右边的
+                this.StartOneNode(this.RoleQueue1.children[0]?.getComponent(Role).MyColor, true)
+
+                this.scheduleOnce(() => {
+                    if (this.node.isValid) {
+                        this.StartOneNode(this.RoleQueue2.children[0]?.getComponent(Role).MyColor, false)
+                    }
+                }, 0.05)
+            }
+
+        }
+    }
+
+
+
+    onDestroy(): void {
+        super.onDestroy();
+        this.unscheduleAllCallbacks()
+    }
+
+
+
+    //沙发颜色
+    SofaColor: SofaColor = SofaColor.红
+
+
+    //生成人物
+    BronRole(RoleColor: SofaColor, parent: cc.Node, isRightQueue: boolean, index: number) {
+        let tempNode = cc.instantiate(this.Role)
+
+
+        if (isRightQueue) {
+            tempNode.parent = parent
+        } else {
+            parent.addChild(tempNode, 0, parent.childrenCount.toString())
+        }
+
+
+
+        // let x = Math.floor(Math.random() * (41)) - 20
+        let x = Math.floor(Math.random() * (31)) - 15
+        tempNode.getComponent(Role).init(RoleColor)
+        tempNode.active = true
+
+        let setPos
+        let targetpos
+
+
+        if (isRightQueue) {
+            setPos = -this.Right_Path - this.Right_Role_interval * (parent.childrenCount - 1)
+            targetpos = - this.Right_Role_interval * (parent.childrenCount - 1)
+            tempNode.setPosition(cc.v2(x, setPos))
+            tempNode.getComponent(Role).run('上')
+            let move = cc.moveTo(this.Right_Path_time, cc.v2(x, targetpos))
+            let cb = cc.callFunc(() => {
+                tempNode.getComponent(Role).idle('上')
+                if (index == 0) {
+                    this.RoleQueueFirst(this.RoleQueue1, true)
+                }
+            })
+            tempNode.runAction(cc.sequence(move, cb))
+
+        } else {
+            setPos = -this.Left_Path + this.Left_Role_interval * (parent.childrenCount - 1)
+            targetpos = this.Left_Role_interval * (parent.childrenCount - 1)
+            tempNode.setPosition(cc.v2(x, setPos))
+
+
+
+
+            tempNode.getComponent(Role).run('下')
+            let move = cc.moveTo(this.Left_Path_time, cc.v2(x, targetpos))
+            let cb = cc.callFunc(() => {
+                tempNode.getComponent(Role).idle('下')
+                if (index == 0) {
+                    this.RoleQueueFirst(this.RoleQueue2, false)
+                }
+            })
+            tempNode.runAction(cc.sequence(move, cb))
+        }
+    }
+
+
+    async StartOneNode(RoleColor: SofaColor, isRightQueue: boolean) {
+
+        //如果正在跳跃模式中
+        if (Down.NowJumping) {
+            return
+        }
+
+        if (BarrierDrag.PlayEditer == true) {
+            return
+        }
+
+        if (GamePause.GamePause == true) {
+            return
+        }
+
+
+        let MoveNode
+
+
+        // console.log(RoleColor, isRightQueue);
+
+        if (isRightQueue == true) {
+            MoveNode = this.RoleQueue1.children[0]
+        } else {
+            MoveNode = this.RoleQueue2.children[0]
+        }
+
+
+        if (isRightQueue == true) {
+            if (tableData[MenY][MenX] != 0) {
+                cc.log('----右侧入口被阻挡---')
+                return
+            }
+        } else {
+            if (tableData[MenYLeft][MenXLeft] != 0) {
+                cc.log('----左侧入口被阻挡---')
+                return
+            }
+        }
+
+
+        if (!MoveNode) {
+            if (this.RoleQueue1.children[0] || this.RoleQueue2.children[0]) {
+
+            } else {
+
+                if (RoleQueue.SitdownRole == this.TotalRole && this.IsSendNextCoustomGameFlag == false) {
+                    this.IsSendNextCoustomGameFlag = true
+
+                    cc.systemEvent.emit(EventName.RoleStopBus)
+                    cc.systemEvent.emit(EventName.NextCoustomGameStop)
+                    cc.systemEvent.emit(EventName.CloseDoor)
+
+                }
+            }
+            return
+        }
+
+        if (!RoleColor) {
+            // cc.log('为空直接退出')
+            return
+        }
+
+        if (MoveNode.getComponent(Role).MyColor != RoleColor) {
+            console.log('乘客颜色不对');
+            return
+        }
+
+        for (let index = 0; index < this.barrierLayer.children.length; index++) {
+            const element = this.barrierLayer.children[index];
+
+            if (element.getComponent(Sofa)?.SofaColor == RoleColor || (element.getComponent(Sofa)?.SofaColor == SofaColor.灰 && GraySitDownColor == RoleColor)) {
+                let paths = element.getComponent(Sofa).getSitDownMapIndex()
+
+                for (let k = 0; k < paths.length; k++) {
+                    const SubData = paths[k];
+                    let isOK = this.showPathsAndMove(cc.v2(SubData.x, SubData.y), SubData, MoveNode, isRightQueue)
+
+                    if (await isOK == true) {
+
+
+                        cc.systemEvent.emit(EventName.StartCountDown)
+
+                        //更新排队队列
+                        this.UpdateRoleQueue(isRightQueue)
+
+                        //如果是单人
+                        if (SubData.isleft == 0) {
+                            element.getComponent(Sofa).SofaSitDown = [1]
+                        } else {
+                            //如果是双人
+                            if (SubData.isleft == 1) {
+                                element.getComponent(Sofa).SofaSitDown[0] = 1
+                            }
+                            if (SubData.isleft == 2) {
+                                element.getComponent(Sofa).SofaSitDown[1] = 1
+                            }
+                        }
+                        return
+                    }
+                }
+            }
+        }
+    }
+
+    async showPathsAndMove(targetPos: cc.Vec2, SubData, MoveNode: cc.Node, isRightQueue: boolean) {
+        //起始点
+        // console.time('findPath')
+        let resultList
+        if (isRightQueue == true) {
+            // cc.log('----右侧---')
+            resultList = await this.aStar.findePaths(cc.v2(MenX, MenY), targetPos)
+        } else {
+            // cc.log('----左侧---')
+            resultList = await this.aStar.findePaths(cc.v2(MenXLeft, MenYLeft), targetPos)
+        }
+
+
+        if (resultList[0]) {
+            let mapPosList = <[cc.Vec2]>resultList[1]
+
+            // this.stork(resultList)
+            this.playerMove(mapPosList, null, SubData, MoveNode, isRightQueue)
+
+            return true
+        } else {
+            // cc.log('----找不到路径---')
+            return null
+        }
+    }
+
+
+    stork(resultList) {
+        console.log('66');
+
+        if (resultList[0]) {
+            let mapPosList = <[cc.Vec2]>resultList[1]
+
+            let pathLayer = this.node.parent.getChildByName('MapLayer').getChildByName('pathLayer')
+
+
+            let gp = pathLayer.getComponent(cc.Graphics)
+            gp.clear()
+
+            // 画openList
+            let closeList = <any[]>resultList[3]
+            // cc.log('--openList---',closeList)
+            for (let i = 0; i < closeList.length; i++) {
+                let nodePos = this.getNodePosByMapPos(closeList[i].pos.x, closeList[i].pos.y)
+                gp.fillRect(nodePos.x - tiledSize.width / 2, nodePos.y - tiledSize.height / 2, tiledSize.width, tiledSize.height)
+                gp.strokeColor = new cc.Color().fromHEX('##B23FAB');
+                gp.stroke()
+            }
+
+            // 画路径
+            for (let i = 0; i < mapPosList.length; i++) {
+                let nodePos = this.getNodePosByMapPos(mapPosList[i].x, mapPosList[i].y)
+                gp.fillRect(nodePos.x - tiledSize.width / 2, nodePos.y - tiledSize.height / 2, tiledSize.width, tiledSize.height)
+                gp.strokeColor = new cc.Color().fromHEX('#4B64BC9A');
+                gp.stroke()
+
+            }
+        } else {
+            // cc.log('----找不到路径---')
+        }
+    }
+
+
+
+
+    UpdateRoleQueue(isright: boolean = true) {
+        if (this.RoleQueueType == 1) {
+            //右边的队列
+            for (let index = 0; index < this.RoleQueue1.children.length; index++) {
+                this.UpdateRolePos(this.RoleQueue1.children[index], this.RoleQueue1.children[index].position.x, index, true)
+            }
+
+            //第一个人是侧着站立
+            this.RoleQueue1.children[0]?.getComponent(Role).QueueFirstIdle(true)
+
+        }
+
+        if (this.RoleQueueType == 2) {
+
+            if (isright) {
+                //右边的队列
+                for (let index = 0; index < this.RoleQueue1.children.length; index++) {
+                    this.UpdateRolePos(this.RoleQueue1.children[index], this.RoleQueue1.children[index].position.x, index, true)
+                }
+
+                //第一个人是侧着站立
+                this.RoleQueueFirst(this.RoleQueue1, true)
+            } else {
+                //左边的队列
+                for (let index = 0; index < this.RoleQueue2.children.length; index++) {
+                    this.UpdateRolePos(this.RoleQueue2.children[index], this.RoleQueue2.children[index].position.x, index, false)
+                }
+
+                //第一个人是侧着站立
+                this.RoleQueueFirst(this.RoleQueue2, false)
+            }
+        }
+
+        HonorManger.getInstance().remainingpassengers = this.RoleQueue1.childrenCount + this.RoleQueue2.childrenCount
+    }
+
+
+    RoleQueueFirst(RoleQueue: cc.Node, isRightQueue: boolean) {
+
+        for (let index = 0; index < RoleQueue.children.length; index++) {
+            const element = RoleQueue.children[index];
+            if (element) {
+                if (index == 0) {
+                    element.getComponent(Role).QueueFirstIdle(isRightQueue)
+                } else {
+                    element.getComponent(Role).QueueotherIdle(isRightQueue)
+                }
+            }
+        }
+
+    }
+
+
+    getTargetPosInMap(MapPos: cc.Vec2) {
+        return cc.v3(leftButtomStatPos.x + MapPos.x * tiledSize.width + tiledSize.width / 2, leftButtomStatPos.y + MapPos.y * tiledSize.height + tiledSize.height / 2)
+    }
+
+
+    //右侧追车路径
+    Right_Path: number = 1400
+    //左侧追车路径
+    Left_Path: number = -1400
+
+
+    //右侧追车时间
+    Right_Path_time: number = 1
+    //左侧追车时间
+    Left_Path_time: number = 1
+
+    //右侧排队间隔
+    Right_Role_interval: number = 50
+    //左侧排队间隔
+    Left_Role_interval: number = 100
+
+
+    UpdateRolePos(RoleNode: cc.Node, x, y, isRightQueue: boolean) {
+
+        if (isRightQueue) {
+            let move = cc.moveTo(this.e_first_run_time, cc.v2(x, - this.Right_Role_interval * y))
+            RoleNode.runAction(move)
+        } else {
+            let move = cc.moveTo(this.e_first_run_time, cc.v2(x, + this.Left_Role_interval * y))
+            RoleNode.runAction(move)
+        }
+
+    }
+
+    playerMove(paths: [cc.Vec2], gp: cc.Graphics, SubData, MoveNode: cc.Node, isRightQueue: boolean) {
+        let quance = []
+
+        let startcallBack = cc.callFunc(() => {
+            switch (SubData.isleft) {
+                case 0:
+                    //单人
+                    SubData.slefNode.getComponent(Sofa).isTarget[0] = true
+                    break;
+                case 1:
+                    //双人左
+                    SubData.slefNode.getComponent(Sofa).isTarget[0] = true
+                    break;
+                case 2:
+                    //双人右
+                    SubData.slefNode.getComponent(Sofa).isTarget[1] = true
+                    break;
+                default:
+                    break;
+            }
+
+
+        })
+        quance.push(startcallBack)
+
+
+
+
+        if (isRightQueue == true) {
+            let name = MoveNode.parent.childrenCount
+            //找到路径了在放置在第一位
+            MoveNode.parent = this.barrierLayer
+            MoveNode.name = name + ''
+            //障碍物的是 200多 我们 333开始
+            MoveNode.zIndex = (333 + (name))
+        } else {
+            let name = MoveNode.parent.childrenCount
+            //找到路径了在放置在第一位
+            MoveNode.parent = this.barrierLayer
+            MoveNode.name = name + ''
+            //障碍物的是 200多 我们 333开始
+            MoveNode.zIndex = (333 + (99 - name))
+        }
+
+
+
+
+
+
+        let pos = this.gameLayer.convertToNodeSpaceAR(MoveNode.convertToWorldSpaceAR(MoveNode.position))
+
+        MoveNode.setPosition(pos)
+
+        if (isRightQueue == true) {
+            quance.push(cc.callFunc(() => {
+                MoveNode.getComponent(Role).setRoleAnimbyRun('左')
+            }))
+            // cc.log('----右侧---')
+            let move = cc.moveTo(this.e_first_run_time, cc.v2(this.getNodePosByMapPos(MenX, MenY)))
+            quance.push(move)
+        } else {
+            quance.push(cc.callFunc(() => {
+                MoveNode.getComponent(Role).setRoleAnimbyRun('右')
+            }))
+            let move = cc.moveTo(this.e_first_run_time, cc.v2(this.getNodePosByMapPos(MenXLeft, MenYLeft)))
+            quance.push(move)
+        }
+
+        for (let index = 0; index < paths.length; index++) {
+            const path = paths[index];
+            //添加移动路径
+            let TargetPos = this.getNodePosByMapPos(path.x, path.y)
+            let move
+
+            if (index == 0) {
+                move = cc.moveTo(0, cc.v2(TargetPos))
+            } else {
+                move = cc.moveTo(this.e_run_time, cc.v2(TargetPos))
+            }
+
+            //移动方向
+            let MoveDir = cc.callFunc(() => {
+                let NextPath = paths[index + 1];
+                if (NextPath) {
+                    let NextTargetPos = this.getNodePosByMapPos(NextPath.x, NextPath.y)
+                    let xxx = TargetPos.x - NextTargetPos.x
+                    let yyy = TargetPos.y - NextTargetPos.y
+                    if (Math.abs(xxx) > 10) {
+                        if (xxx > 0) {
+                            // console.log('左');
+                            MoveNode.getComponent(Role).setRoleAnimbyRun('左')
+                        } else {
+                            // console.log('右');
+                            MoveNode.getComponent(Role).setRoleAnimbyRun('右')
+                        }
+                    }
+                    if (Math.abs(yyy) > 10) {
+                        if (xxx > 0) {
+                            // console.log('上');
+                            MoveNode.getComponent(Role).setRoleAnimbyRun('上')
+                        } else {
+                            // console.log('下');
+                            MoveNode.getComponent(Role).setRoleAnimbyRun('下')
+                        }
+                    }
+                }
+            })
+
+            quance.push(move)
+            quance.push(MoveDir)
+
+        }
+        let callBack = cc.callFunc(() => {
+            // cc.log('---moveEnd--')
+            //人物节点
+            MoveNode.getComponent(Role).SitDown(SubData)
+
+        })
+        quance.push(callBack)
+        MoveNode.stopAllActions()
+
+        MoveNode.runAction(cc.sequence(quance))
+        ///////////////////////////////////////////////////////////////////////////////////////
+
+
+    }
+    /**
+     *  地图坐标转为节点坐标
+     * @param x 
+     * @param y 
+     * @returns 
+     */
+    getNodePosByMapPos(x: number, y: number) {
+        x = Math.floor(x)
+        y = Math.floor(y)
+        let nodePos = cc.v3(leftButtomStatPos.x + x * tiledSize.width + tiledSize.width / 2, leftButtomStatPos.y + y * tiledSize.height + tiledSize.height / 2)
+        return nodePos
+    }
+
+
+
+}

+ 10 - 0
assets/Script/GameLogic/RoleQueue.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "ca04f3eb-0884-4e11-b1e7-9d4485972918",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 259 - 0
assets/Script/GameLogic/Sofa.ts

@@ -0,0 +1,259 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { SofaColor, SofaDir } from "../EventName/EventName";
+import Sdk, { VibrateType } from "../SDK/SDK";
+import { tableData } from "./DataConfig";
+import BarrierDrag from "./barrierDrag";
+
+const { ccclass, property } = cc._decorator;
+
+/**
+
+按钮点击限制节流    防抖 节流
+@param lockTime 阻塞时间
+@param callBackFun 节流回调 多次点击的时候给一个回调函数提示用户不要多次点击
+*/
+export function ButtonLock(lockTime: number = 0.3, callBackFun?: Function) {
+    return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
+        let oldFun: Function = descriptor.value;
+        let isLock: boolean = false;
+        descriptor.value = function (...args: any[]) {
+            if (isLock) {
+                callBackFun?.()
+                return
+            }
+            isLock = true;
+            setTimeout(() => {
+                isLock = false
+            }, lockTime * 1000);
+            oldFun.apply(this, args);
+        }
+        return descriptor
+    }
+}
+
+
+@ccclass
+export default class Sofa extends cc.Component {
+    start() {
+
+    }
+
+    //沙发ID
+    SofaID: number = 0
+
+
+    //沙发Prefab 类型
+    SofaPrefabID: number = 0
+
+    //沙发颜色
+    SofaColor: SofaColor = SofaColor.无
+
+    //沙发方向
+    Sofadir: SofaDir = SofaDir.正
+
+    //沙发还可以做人的位置
+    SofaSitDown: number[] = []
+
+
+    //是否是上锁的
+    isLock: boolean = false
+
+    NodeBarrierDragComp: BarrierDrag = null
+    // update (dt) {}
+
+
+    //鸭子目标是这个沙发的时候 沙发不能被玩家移动
+    isTarget: boolean[] = []
+
+    //初始化
+    init(BarrierDragtype: number, SofaPrefabID: number, islock) {
+        this.SofaID = BarrierDragtype
+        this.SofaPrefabID = SofaPrefabID
+
+        this.isLock = islock
+        //障碍物 61
+        // 蓝	灰	粉	红	黄	蓝2	灰2	粉2	红2	黄2    
+        // 1	3	5	7	9	11	13	15	17	19
+        // 2	4	6	8	10	12	14	16	18	20
+
+        let Type = [{
+            Has: [1, 2, 11, 12],
+            is: SofaColor.蓝,
+        }, {
+            Has: [3, 4, 13, 14],
+            is: SofaColor.灰
+        }, {
+            Has: [5, 6, 15, 16],
+            is: SofaColor.粉
+        }, {
+            Has: [7, 8, 17, 18],
+            is: SofaColor.红
+        }, {
+            Has: [9, 10, 19, 20],
+            is: SofaColor.黄
+        }]
+
+        Type.forEach(e => {
+            if (e.Has.includes(this.SofaPrefabID)) {
+                this.SofaColor = e.is
+            }
+            if (this.SofaPrefabID % 2 === 0) {
+                this.Sofadir = SofaDir.反
+            } else {
+                this.Sofadir = SofaDir.正
+            }
+            if (this.SofaPrefabID > 10 && this.SofaPrefabID < 21) {
+                this.SofaSitDown = [0, 0]
+                this.isTarget = [false, false]
+            } else {
+                this.SofaSitDown = [0]
+                this.isTarget = [false]
+            }
+        })
+        this.NodeBarrierDragComp = this.node.getComponent(BarrierDrag)
+    }
+
+
+    NowSitDownisok() {
+        if (this.NodeBarrierDragComp.MyisDouble()) {
+            if (this.SofaSitDown[0] == 0 || this.SofaSitDown[1] == 0) {
+                return true
+            }
+        } else {
+            if (this.SofaSitDown[0] == 0) {
+                return true
+            }
+        }
+        return false
+    }
+
+    getSitDownMapIndex() {
+
+        let pathPos = []
+
+        // if (this.NodeBarrierDragComp.isLock) {
+        //     return pathPos
+        // }
+
+        let NowMapPos = this.NodeBarrierDragComp.getNodeMapPos(this.node.x, this.node.y)
+
+        let CheckPos = (x, y, isleft) => {
+
+            var slefNode = this.node
+            //上下左右
+            if (x >= 0 && x < tableData[0].length &&
+                y >= 0 && y < tableData.length
+            ) {
+                if (tableData[y][x] > 0) {
+                    return null
+                } else {
+                    return { x, y, isleft, slefNode }
+                }
+            }
+        }
+        //2个位置的
+        if (this.NodeBarrierDragComp.MyisDouble()) {
+            //满人了
+            if (this.SofaSitDown[0] == 1 && this.SofaSitDown[1] == 1) {
+                return pathPos
+            }
+
+            if (this.Sofadir === SofaDir.正) {
+                //右边
+                if (CheckPos(NowMapPos.x + 2, NowMapPos.y, 2) && this.SofaSitDown[1] == 0) {
+                    pathPos.push(CheckPos(NowMapPos.x + 2, NowMapPos.y, 2))
+                }
+                //左边
+                if (CheckPos(NowMapPos.x - 1, NowMapPos.y, 1) && this.SofaSitDown[0] == 0) {
+
+                    pathPos.push(CheckPos(NowMapPos.x - 1, NowMapPos.y, 1))
+                }
+                //左上边
+                if (CheckPos(NowMapPos.x, NowMapPos.y + 1, 1) && this.SofaSitDown[0] == 0) {
+                    pathPos.push(CheckPos(NowMapPos.x, NowMapPos.y + 1, 1))
+                }
+                //右上边
+                if (CheckPos(NowMapPos.x + 1, NowMapPos.y + 1, 2) && this.SofaSitDown[1] == 0) {
+                    pathPos.push(CheckPos(NowMapPos.x + 1, NowMapPos.y + 1, 2))
+                }
+
+            } else {
+                //右边
+                if (CheckPos(NowMapPos.x + 2, NowMapPos.y, 2) && this.SofaSitDown[1] == 0) {
+                    pathPos.push(CheckPos(NowMapPos.x + 2, NowMapPos.y, 2))
+                }
+                //左边
+                if (CheckPos(NowMapPos.x - 1, NowMapPos.y, 1) && this.SofaSitDown[0] == 0) {
+                    pathPos.push(CheckPos(NowMapPos.x - 1, NowMapPos.y, 1))
+                }
+                //左上边
+                if (CheckPos(NowMapPos.x, NowMapPos.y - 1, 1) && this.SofaSitDown[0] == 0) {
+                    pathPos.push(CheckPos(NowMapPos.x, NowMapPos.y - 1, 1))
+                }
+                //右上边
+                if (CheckPos(NowMapPos.x + 1, NowMapPos.y - 1, 2) && this.SofaSitDown[1] == 0) {
+                    pathPos.push(CheckPos(NowMapPos.x + 1, NowMapPos.y - 1, 2))
+                }
+            }
+
+        } else {
+            //1个位置的
+
+            //满人了
+            if (this.SofaSitDown[0] == 1) {
+                return pathPos
+            }
+            //右边
+            if (CheckPos(NowMapPos.x + 1, NowMapPos.y, 0)) {
+                pathPos.push(CheckPos(NowMapPos.x + 1, NowMapPos.y, 0))
+            }
+
+            //左边
+            if (CheckPos(NowMapPos.x - 1, NowMapPos.y, 0)) {
+                pathPos.push(CheckPos(NowMapPos.x - 1, NowMapPos.y, 0))
+            }
+            //上边
+            if (CheckPos(NowMapPos.x, NowMapPos.y + 1, 0) && this.Sofadir == SofaDir.正) {
+                pathPos.push(CheckPos(NowMapPos.x, NowMapPos.y + 1, 0))
+            }
+            //下
+            if (CheckPos(NowMapPos.x, NowMapPos.y - 1, 0) && this.Sofadir == SofaDir.反) {
+                pathPos.push(CheckPos(NowMapPos.x, NowMapPos.y - 1, 0))
+            }
+        }
+        return pathPos
+    }
+
+
+
+
+    @ButtonLock(1, null)
+    NoMoveAnim() {
+        if (this.NodeBarrierDragComp.MyisDouble()) {
+            cc.tween(this.node)
+                .by(0.03, { x: 15 })
+                .by(0.03, { x: -15 })
+                .by(0.02, { x: 8 })
+                .by(0.02, { x: -8 })
+                .by(0.01, { x: 4 })
+                .by(0.01, { x: -4 })
+                .start()
+        } else {
+            cc.tween(this.node)
+                .to(0.03, { angle: 15 })
+                .to(0.03, { angle: -15 })
+                .to(0.03, { angle: 8 })
+                .to(0.01, { angle: -4 })
+                .to(0.01, { angle: 0 })
+                .start()
+        }
+
+        Sdk.getInstance().Vibrate(VibrateType.Short, null)
+    }
+}

+ 10 - 0
assets/Script/GameLogic/Sofa.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "7e5c85f3-d3e9-4a22-bfa8-89a386b9705d",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 236 - 0
assets/Script/GameLogic/aStar.ts

@@ -0,0 +1,236 @@
+import { tableData } from "./DataConfig"
+import { bindShowFindPos } from "./game"
+
+
+const  enum DirectionType {
+    FOURTH_DIR,
+    EIGHT_DIR
+}
+
+export class AStartStep {
+    g: number = 0
+    h: number = 0
+    private _f: number
+    get f() {
+        return this.g + this.h
+    }
+    set f(n) {
+        this._f = n
+    }
+
+    pos: cc.Vec2 = cc.v2()
+
+    last: AStartStep = null
+
+    constructor(MapPos) {
+        // if(arguments.length>0 && arguments[0] instanceof cc.Vec2){
+        //     this.pos=arguments[0]
+        // }
+        this.pos = MapPos
+
+    }
+
+    equalTo(other: AStartStep) {
+        if (other instanceof AStartStep) {
+            return this.pos.x === other.pos.x && this.pos.y === other.pos.y
+        }
+    }
+
+}
+
+export class AStar {
+
+    //默认是 四方向的
+    _moveDirection = DirectionType.FOURTH_DIR
+    _isShowProcess = false
+    _openList: AStartStep[]
+    _closeList: AStartStep[]
+
+    constructor() {
+        this._openList = []
+        this._closeList = []
+    }
+
+    private findeIndexOfStepList = (v: cc.Vec2, stepList: AStartStep[]) => {
+
+        for (let i = 0; i < stepList.length; i++) {
+            if (v.x === stepList[i].pos.x && v.y === stepList[i].pos.y)
+                return i
+        }
+        return -1
+    }
+
+    insetStepToOpen(step: AStartStep) {
+        let i = 0
+        for (; i < this._openList.length; ++i) {
+
+            if (step.f <= this._openList[i].f) {
+                break
+            }
+        }
+
+        // cc.log('---ToOpen----',i,step.f,step.pos.x,this._openList[i]?.f,this._openList[i]?.pos.x)
+
+        this._openList.splice(i, 0, step)
+    }
+
+    setIsShowProcess(_isShowProcess: boolean) {
+        this._isShowProcess = _isShowProcess
+    }
+
+
+    changeDeriction() {
+        this._moveDirection = this._moveDirection === DirectionType.EIGHT_DIR ? DirectionType.FOURTH_DIR : DirectionType.EIGHT_DIR
+    }
+
+    //每个砖块的消耗
+    _costToMoveStep(left, right) {
+        // 不是直走
+        return (left.x !== right.x) && left.y !== right.y ? 14 : 10
+    }
+
+    _getH(current, finish) {
+        return (Math.abs(current.x - finish.x) + Math.abs(current.y - finish.y)) * 10
+    }
+
+    // 判断是否
+
+    // 获得可加入的点  zhe一步不管是否已经加入到开放列表,只管周围是否可通行
+    _getNextCanMovePos(currentPos) {
+
+        let funPushPos = (pos, list) => {
+            if (tableData[pos.y][pos.x] === 0) {
+                list.push(pos)
+            }
+        }
+
+        let results = []
+        let left = cc.v2(currentPos.x - 1, currentPos.y)
+        if (left.x >= 0) {
+            // 左三
+            funPushPos(left, results)
+            if (this._moveDirection === DirectionType.EIGHT_DIR) {
+                let leftTop = cc.v2(currentPos.x - 1, currentPos.y + 1)
+                if (leftTop.y < tableData.length) {
+                    funPushPos(leftTop, results)
+                }
+                let leftBottom = cc.v2(currentPos.x - 1, currentPos.y - 1)
+                if (leftBottom.y >= 0) {
+                    funPushPos(leftBottom, results)
+                }
+            }
+
+        }
+        // 右三
+        let right = cc.v2(currentPos.x + 1, currentPos.y)
+        if (right.x < tableData[0].length) {
+            // 左三
+            funPushPos(right, results)
+            if (this._moveDirection === DirectionType.EIGHT_DIR) {
+                let rightTop = cc.v2(currentPos.x + 1, currentPos.y + 1)
+                if (rightTop.y < tableData.length) {
+                    funPushPos(rightTop, results)
+                }
+                let rightBottom = cc.v2(currentPos.x + 1, currentPos.y - 1)
+                if (rightBottom.y >= 0) {
+                    funPushPos(rightBottom, results)
+                }
+
+            }
+
+        }
+        // 上下
+        let top = cc.v2(currentPos.x, currentPos.y + 1)
+        if (top.y < tableData.length) {
+            funPushPos(top, results)
+        }
+        let bottom = cc.v2(currentPos.x, currentPos.y - 1)
+        if (bottom.y >= 0) {
+            funPushPos(bottom, results)
+        }
+        return results
+    }
+
+
+
+    async findePaths(start, finish) {
+        // cc.log('----start--finish-',start,finish)
+        this._openList = []
+        this._closeList = []
+        let tempOpenPos = []
+
+        let paths = []
+        this._openList.push(new AStartStep(start))
+        let pathFound = false
+
+        do {
+            let currentStep = this._openList.shift()
+            this._closeList.push(currentStep)
+            if (this._isShowProcess) {
+                await this.sleep(1)
+                this.findPos(currentStep.pos)
+            }
+
+            // cc.log('----currentStep-',currentStep.pos.x,currentStep.pos.y)
+
+            if (currentStep.pos.x === finish.x && currentStep.pos.y === finish.y) {
+                pathFound = true
+                do {
+                    // to do 测试效率
+                    paths.unshift(currentStep.pos)
+                    currentStep = currentStep.last
+                } while (currentStep !== null)
+                break
+            }
+            // 根据当前点,找到下一个点
+            let canMoveList = this._getNextCanMovePos(currentStep.pos)
+            // 找到需要加列表的点加入后比较
+            for (let i = 0; i < canMoveList.length; ++i) {
+                let pos1 = canMoveList[i]
+                if (this.findeIndexOfStepList(pos1, this._closeList) != -1) {
+                    canMoveList.splice(i, 1)
+                    i--;
+                    continue
+                }
+                // 不在的话,判断是否放入开放列表中
+                let step = new AStartStep(pos1)
+                let costMove = this._costToMoveStep(pos1, currentStep.pos)
+                let openIndex = this.findeIndexOfStepList(pos1, this._openList)
+                if (openIndex === -1) {
+                    step.last = currentStep
+                    step.g = currentStep.g + costMove
+                    step.h = this._getH(pos1, finish)
+                    this.insetStepToOpen(step)
+
+
+                    tempOpenPos.push([currentStep.pos.x, currentStep.pos.y])
+
+                } else {
+                    // 如果open列表中有的,直接用、
+                    let stepOp = this._openList[openIndex]
+                    // 也可以用f 
+                    if (currentStep.g + costMove < stepOp.g) {
+                        stepOp.g = currentStep.g + costMove;
+                        stepOp.last = currentStep
+                        // 先删除 再插入,因为插入事可以排序
+                        this._openList.splice(openIndex, 1)
+                        this.insetStepToOpen(stepOp)
+                    }
+                }
+            }
+        } while (this._openList.length > 0)
+
+        return [pathFound, paths, tempOpenPos, this._closeList]
+    }
+
+    findPos(pos: cc.Vec2) {
+        // cc.log('--findPos---',pos)
+    }
+
+    private async sleep(time) {
+        return new Promise((resolve) => {
+            setTimeout(resolve, time);
+        });
+    }
+
+}

+ 10 - 0
assets/Script/GameLogic/aStar.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "4e641093-d6f8-4059-b8c2-9b6602e11956",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 836 - 0
assets/Script/GameLogic/barrierDrag.ts

@@ -0,0 +1,836 @@
+/**
+ *   拖拽障碍物到
+ */
+
+import EventName, { SofaColor } from "../EventName/EventName";
+import AudioManager from "../GameUI/AudioManager";
+import HonorManger, { CheckSeatType } from "../GameUI/HonorManger";
+import Sdk, { VibrateType } from "../SDK/SDK";
+import LocalData, { WorkState } from "../Template/LocalData";
+import MyComponent from "../Template/MyComponent";
+import { GraySitDownColor, leftButtomStatPos, tableData, tableDataX, tableDataY, tiledSize } from "./DataConfig";
+import Role from "./Role";
+import Sofa from "./Sofa";
+import Game from "./game";
+
+//禁止多点触控
+cc.macro.ENABLE_MULTI_TOUCH = false;
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class BarrierDrag extends MyComponent {
+    /**
+     * 是否在地图中
+     * 
+     */
+    isInMap: boolean = false
+    startPos: cc.Vec3
+    lastPos: cc.Vec3
+
+    @property(cc.Node)
+    barrierLayer: cc.Node = null
+
+
+
+    //出生时候的位置
+    BronPos: cc.Vec2 = null
+
+
+    //移动沙发用时
+    moveSeatHasTime = 0
+
+
+    public Myid: number = 0
+
+
+
+    SofaComp: Sofa = null
+
+    // onLoad () {}
+
+    static PlayEditer: boolean = false
+
+
+    //是否在跳跃模式
+    static PlayJump: boolean = false
+
+
+    //当前跳跃的缓动
+    NowTween: cc.Tween<cc.Node> = null
+
+    //当前选中的缓动
+    NowMoveTween: cc.Tween<cc.Node> = null
+
+    onLoad() {
+        super.onLoad();
+        this.SofaComp = this.node.getComponent(Sofa)
+        this.regEvent(EventName.NowSitDowninSeat, this.NowSitDowninSeat, this)
+        this.regEvent(EventName.StopNowSitDowninSeatAnim, this.StopNowSitDowninSeatAnim, this)
+
+
+
+        this.BronPos = this.getNodeMapPos(this.node.x, this.node.y)
+
+
+    }
+    StopNowSitDowninSeatAnim() {
+
+
+        let Select = this.node.getChildByName("Select")
+
+        if (Select) {
+            Select.active = false
+        }
+
+
+        if (this.NowTween) {
+            this.NowTween.stop()
+            this.node.scale = 1
+        }
+    }
+
+
+    cloneNode: cc.Node = null
+    cloneMe() {
+        this.deleteCloneMe()
+        this.cloneNode = cc.instantiate(new cc.Node())
+
+        this.cloneNode.scale = this.node.scale
+
+        this.cloneNode.anchorX = this.node.anchorX
+        this.cloneNode.anchorY = this.node.anchorY
+
+        this.cloneNode.addComponent(cc.Sprite).spriteFrame = this.node.getComponent(cc.Sprite).spriteFrame
+        this.cloneNode.setPosition(this.node.position)
+
+        this.cloneNode.opacity = 120
+
+        this.cloneNode.parent = this.node.parent
+
+
+        if (!this.MyisDouble()) {
+            this.NowMoveTween = cc.tween(this.node).repeatForever(
+                cc.tween()
+                    .to(0.21, { scale: 1.05 })
+                    .to(0.21, { scale: 1 })
+            ).start();
+        }
+    }
+
+    deleteCloneMe() {
+
+        if (cc.isValid(this.cloneNode)) {
+            this.cloneNode?.destroy()
+        }
+
+
+        if (!this.MyisDouble()) {
+            this.NowMoveTween?.stop()
+            this.node.scale = 1
+        }
+    }
+
+    NowSitDowninSeat() {
+        if (this.SofaComp.NowSitDownisok() == false) {
+            return
+        }
+
+
+        let color: number[] = []
+
+        let RoleQueue1 = cc.Canvas.instance.node.getChildByName("RoleQueue").getChildByName("RoleQueue1")
+        let RoleQueue2 = cc.Canvas.instance.node.getChildByName("RoleQueue").getChildByName("RoleQueue2")
+
+        let a = RoleQueue1.children[0]?.getComponent(Role).MyColor
+        let b = RoleQueue2.children[0]?.getComponent(Role).MyColor
+
+        color.push(a)
+        color.push(b)
+
+
+        //两个准备上车的乘客
+        for (let index = 0; index < color.length; index++) {
+            const element = color[index];
+            if (element == this.SofaComp.SofaColor || ((this.SofaComp.SofaColor == SofaColor.灰 && (GraySitDownColor == element)))) {
+                this.NowTween = cc.tween(this.node).repeatForever(
+                    cc.tween()
+                        .to(0.4, { scale: 1.25 })
+                        .to(0.4, { scale: 1 })
+                ).start();
+
+                let Select = this.node.getChildByName("Select")
+
+                if (Select) {
+                    Select.active = true
+                }
+                return
+            }
+        }
+    }
+
+
+    ShowLock() {
+        let Lock = this.node.getChildByName("Lock")
+        if (this.SofaComp.isLock) {
+            if (Lock) {
+                Lock.active = true
+            }
+        } else {
+            if (Lock) {
+                Lock.active = false
+            }
+        }
+    }
+
+    onCollisionEnter(a?, b?) {
+        return
+    }
+
+
+    lastMoveX = 0
+    lastMoveY = 0
+
+
+
+    //玩家手指移动点击的位置
+    ClickPos: cc.Vec2 = null
+
+
+    //玩家手指点击在节点内的位置
+    ClickNodePos: cc.Vec2 = null
+
+    changeTableData(temp: cc.Vec2, tag: number) {
+        if (this.MyisDouble()) {
+            tableData[temp.y][temp.x] = tag
+            tableData[temp.y][temp.x + 1] = tag
+        } else {
+            tableData[temp.y][temp.x] = tag
+        }
+    }
+
+
+    start() {
+
+        this.changeTableData(this.getNodeMapPos(), 2)
+
+        this.node.on(cc.Node.EventType.TOUCH_START, (event: cc.Event.EventTouch) => {
+
+
+            //如果是引导模式
+            if (LocalData.getInstance().getWorkState() === WorkState.引导) {
+                if (HonorManger.getInstance().GuideData[HonorManger.getInstance().GuideStep].bronPos.x == this.BronPos.x &&
+                    HonorManger.getInstance().GuideData[HonorManger.getInstance().GuideStep].bronPos.y == this.BronPos.y
+                ) {
+                } else {
+                    return
+                }
+            }
+
+
+            ///如果在跳跃模式
+            if (BarrierDrag.PlayJump == true) {
+                //如果有鸭子目标是这个沙发 那就不能跳跃
+                if (this.SofaComp.isTarget[0] || this.SofaComp.isTarget[1]) {
+                    this.SofaComp.NoMoveAnim()
+                    return
+                }
+
+                if (this.MyisDouble()) {
+                    if (this.SofaComp.SofaSitDown[0] == 1 && this.SofaComp.SofaSitDown[1] == 1) {
+                        return
+                    }
+                } else {
+                    if (this.SofaComp.SofaSitDown[0] == 1) {
+                        return
+                    }
+                }
+
+
+                let isleft = 0
+                if (this.MyisDouble()) {
+                    const touchLocation = event.getLocation();
+                    const localPos = this.node.convertToNodeSpaceAR(touchLocation);
+                    if (localPos.x >= 40) {
+                        console.log('再右边');
+                        isleft = 2
+                    } else {
+                        console.log('再左边');
+                        isleft = 1
+                    }
+                }
+
+
+                cc.systemEvent.emit(EventName.NowSitDowninSeatAnim, this.node, isleft, this.SofaComp.SofaColor, this.SofaComp.Sofadir)
+                return
+            }
+
+
+            if (this.iSMove() == false) {
+                return
+            }
+            BarrierDrag.PlayEditer = true
+
+            this.ClickPos = this.node.parent.convertToNodeSpaceAR(event.getLocation())
+            this.OKMove = true
+
+            this.moveSeatHasTime = cc.sys.now()
+            event.stopPropagation()
+
+
+
+            this.startPos = cc.v3(this.node.x, this.node.y)
+            this.lastPos = cc.v3(this.node.x, this.node.y)
+
+            this.MoveIndex = this.getNodeMapPos(this.node.x, this.node.y)
+
+            let StartMapPos = this.getNodeMapPos(this.node.x, this.node.y)
+
+
+
+            this.changeTableData(StartMapPos, 0)
+
+            this.isSofaPlaceOK = true
+
+            const touchLocation = event.getLocation();
+            this.ClickNodePos = this.node.convertToNodeSpaceAR(touchLocation);
+
+
+            this.cloneMe()
+
+            AudioManager.instance.playEffect(AudioManager.seat_click_start)
+            Sdk.getInstance().Vibrate(VibrateType.Short, null)
+
+            //选中的是最上面的 不应该被别的遮挡
+            // this.node.zIndex = 200
+
+
+            this.logtableData('开始')
+            return
+        })
+
+        this.node.on(cc.Node.EventType.TOUCH_MOVE, (event: cc.Event.EventTouch) => {
+
+            if (this.iSMove() == false) {
+                return
+            }
+            if (this.OKMove == false) {
+                return
+            }
+            BarrierDrag.PlayEditer = true
+
+            cc.systemEvent.emit(EventName.UpdataRender)
+
+
+            let ddddx = event.getLocation().x + event.getDelta().x
+            let ddddy = event.getLocation().y + event.getDelta().y
+
+            this.ClickPos = this.node.parent.convertToNodeSpaceAR(cc.v2(ddddx, ddddy))
+        })
+
+        this.node.on(cc.Node.EventType.TOUCH_END, (event: cc.Event.EventTouch) => {
+            this.OKMove = false
+            this.ClickPos = null
+            if (this.iSMove() == false) {
+                return
+            }
+            event.stopPropagation()
+            BarrierDrag.PlayEditer = false
+
+            this.deleteCloneMe()
+            this.SofaPlace()
+
+            cc.systemEvent.emit(EventName.UpdataRender)
+            return
+        })
+
+        this.node.on(cc.Node.EventType.TOUCH_CANCEL, (event: cc.Event.EventTouch) => {
+            this.OKMove = false
+            this.ClickPos = null
+            if (this.iSMove() == false) {
+                return
+            }
+            event.stopPropagation()
+            BarrierDrag.PlayEditer = false
+
+
+            this.deleteCloneMe()
+            this.SofaPlace()
+            cc.systemEvent.emit(EventName.UpdataRender)
+        })
+
+
+    }
+    //当前是否还可以手指移动障碍物
+    OKMove = false
+
+    //记录手指移动的可以放置的下标
+    MoveIndex: cc.Vec2 = new cc.Vec2(0, 0)
+
+
+
+    logtableData(st) {
+
+        return
+        let count = 0
+
+        for (let index = 16; index >= 0; index--) {
+            if (tableData[index]) {
+                console.log(tableData[index]?.toString() + '                ' + index);
+            }
+        }
+
+        // 初始化地图中的障碍物
+        for (let i = 0; i < tableData.length; i++) {
+            for (let j = 0; j < tableData[0].length; j++) {
+                let v = tableData[i][j]
+                if (v > 0) {
+                    count++
+                }
+            }
+        }
+        console.error('↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑');
+        console.error(st, '个数:', count);
+    }
+
+
+
+    //沙发移动
+    SofaMove(eventx: number, eventy: number) {
+        // console.log('xx', eventx);
+        // console.log('yy', eventy);
+
+        if (this.moveYouHua(eventx, eventy)) {
+            // console.error('左右皆不可移动一丝');
+            return false
+        }
+
+        //-----------------------------------
+        //上一次的触点
+        let endPos = this.getEndPosInMap()
+        if (!endPos) {
+            console.log('超出地图范围额了');
+            this.node.x -= this.lastMoveX
+            this.node.y -= this.lastMoveY
+            return false
+        }
+
+
+
+        //如果不超出地图范围
+        this.lastPos = cc.v3(this.node.x, this.node.y)
+        //开始地图下标
+        let MoveIndexMapPos = this.getNodeMapPos(endPos.x, endPos.y)
+
+        //检测这个点是否可以放置
+        if (this.MyisDouble()) {
+            if (tableData[MoveIndexMapPos.y][MoveIndexMapPos.x] == 0 &&
+                tableData[MoveIndexMapPos.y][MoveIndexMapPos.x + 1] == 0 &&
+                MoveIndexMapPos.x <= tableData[0].length - 2
+            ) {
+                this.MoveIndex.x = MoveIndexMapPos.x
+                this.MoveIndex.y = MoveIndexMapPos.y
+            } else {
+            }
+        } else {
+            if (tableData[MoveIndexMapPos.y][MoveIndexMapPos.x] > 0) {
+
+            } else {
+                this.MoveIndex.x = MoveIndexMapPos.x
+                this.MoveIndex.y = MoveIndexMapPos.y
+            }
+        }
+        return true
+    }
+
+
+    update(dt: number): void {
+        if (this.ClickPos) {
+            let x = this.ClickPos.x - this.node.x - this.ClickNodePos.x
+            let y = this.ClickPos.y - this.node.y - this.ClickNodePos.y
+            // let isMOve = this.SofaMove((x / 8), (y / 8))//每次步进 八分之一  不限制速度的版本
+
+            //最大步进速度
+            let step = 15
+            let xx = (x / 8)
+            if (xx > 0) {
+                xx = xx > step ? step : xx
+            }
+            if (xx < 0) {
+                xx = xx < -step ? -step : xx
+            }
+            let yy = (y / 8)
+            if (yy > 0) {
+                yy = yy > step ? step : yy
+            }
+            if (yy < 0) {
+                yy = yy < -step ? -step : yy
+            }
+
+
+
+
+            // let isMOve = this.SofaMove(xx, yy)//每次步进 八分之一
+
+
+            while (!this.SofaMove(xx, yy)) {
+                if (xx == 0 && yy == 0) {
+                    break
+                }
+                xx = xx / 2
+                yy = yy / 2
+
+                if (xx <= 1) {
+                    xx = 0
+                }
+
+                if (yy <= 1) {
+                    yy = 0
+                }
+            }
+
+        }
+    }
+
+    moveYouHua(eventx: number, eventy: number) {
+
+        if (this.CheckRect(eventx, 0) && !this.CheckRect(0, eventy)) {
+            this.node.y += eventy
+            return false
+        }
+
+        if (!this.CheckRect(eventx, 0) && this.CheckRect(0, eventy)) {
+            this.node.x += eventx
+            return false
+        }
+
+        if (!this.CheckRect(eventx, 0) && !this.CheckRect(0, eventy)) {
+            this.node.x += eventx
+            this.node.y += eventy
+            return false
+        }
+        return true
+    }
+
+    getFivePointsOnLine(point1: cc.Vec2, point2: cc.Vec2): cc.Vec2[] {
+        const points: cc.Vec2[] = [];
+        for (let i = 0; i < 10; i++) {//1/3   1/5 
+            const t = i / 20;
+            const x = point1.x + t * (point2.x - point1.x);
+            const y = point1.y + t * (point2.y - point1.y);
+
+            points.push(new cc.Vec2(x, y));
+        }
+        return points;
+    }
+
+    CheckRect(MoveX: number, MoveY: number): boolean {
+
+        let xx = this.node.position.x + MoveX
+        let yy = this.node.position.y + MoveY
+
+        if (this.MyisDouble()) {
+            if (xx < this.node.getContentSize().width / 4) {
+                //  console.log('地图左');
+                return true
+            }
+            if (xx > tableData[0].length * tiledSize.width - ((this.node.getContentSize().width / 4) * 3)) {
+                //  console.log('地图右');
+                return true
+            }
+
+            if (yy < this.node.getContentSize().height / 2) {
+                // console.log('地图下');
+                return true
+            }
+
+            if (yy > tableData.length * tiledSize.height - (this.node.getContentSize().height / 2)) {
+                //  console.log('地图上');
+                return true
+            }
+        } else {
+            if (xx < this.node.getContentSize().width / 2) {
+                // console.log('地图左');
+                return true
+            }
+            if (xx > tableData[0].length * tiledSize.width - (this.node.getContentSize().width / 2)) {
+                // console.log('地图右');
+                return true
+            }
+
+            if (yy < this.node.getContentSize().height / 2) {
+                // console.log('地图下');
+                return true
+            }
+
+            if (yy > tableData.length * tiledSize.height - (this.node.getContentSize().height / 2)) {
+                //   console.log('地图上');
+                return true
+            }
+        }
+
+
+        const pointA = new cc.Vec2(xx, yy);
+        const pointB = new cc.Vec2(this.lastPos.x, this.lastPos.y);
+        const fivePoints = this.getFivePointsOnLine(pointA, pointB);
+
+
+        // let pathLayer = cc.Canvas.instance.node.getChildByName("gameLayer").getChildByName("MapLayer").getChildByName("pathLayer")
+
+        // let gp = pathLayer.getComponent(cc.Graphics)
+        // gp.clear()
+
+        //////////////////////////////////////////////////////////// 可用版本
+        const scale = 0.82
+        const Other_OneNode_scale = 1
+        for (let kkk = 0; kkk < 3; kkk++) {
+            const element = fivePoints[kkk];
+
+            let MyNode_Rect = new cc.Rect(
+                element.x + ((1 - scale) * 0.5 * this.node.getContentSize().width),
+                element.y + ((1 - scale) * 0.5 * this.node.getContentSize().height),
+                this.node.getContentSize().width * scale,
+                this.node.getContentSize().height * scale)
+            for (let index = 0; index < this.node.parent.childrenCount; index++) {
+                let Other_OneNode = this.node.parent.children[index]
+                if (Other_OneNode && Other_OneNode != this.node && Other_OneNode != this.cloneNode) {
+                    let Other_OneRect = new cc.Rect(
+                        Other_OneNode.x + ((1 - Other_OneNode_scale) * 0.5 * Other_OneNode.getContentSize().width),
+                        Other_OneNode.y + ((1 - Other_OneNode_scale) * 0.5 * Other_OneNode.getContentSize().height),
+                        Other_OneNode.getContentSize().width * Other_OneNode_scale,
+                        Other_OneNode.getContentSize().height * Other_OneNode_scale)
+
+
+
+
+                    // gp.fillRect(Other_OneRect.x, Other_OneRect.y, Other_OneRect.width, Other_OneRect.height)
+                    // gp.strokeColor = new cc.Color().fromHEX('#B23FAB');
+
+                    // gp.fillRect(MyNode_Rect.x, MyNode_Rect.y, MyNode_Rect.width, MyNode_Rect.height)
+                    // gp.strokeColor = new cc.Color().fromHEX('#B23FAB');
+
+                    // gp.stroke()
+
+
+                    if (cc.Intersection.rectRect(MyNode_Rect, Other_OneRect)) {
+
+                        // console.log("矩形相交", index, kkk);
+
+
+                        // // //上下左右  
+                        // // let NowMapPos = this.getNodeMapPos(this.node.x, this.node.y)
+                        // // console.log(NowMapPos.x, NowMapPos.y);
+                        // // return true
+
+                        // let CurrentPos = this.getTargetPosInMap(this.MoveIndex)
+                        // let CurrentRect = new cc.Rect(CurrentPos.x, CurrentPos.y, this.node.getContentSize().width * scale, this.node.getContentSize().height * scale)
+                        // if (cc.Intersection.rectRect(CurrentRect, Other_OneRect)) {
+                        //     //相交
+                        // } else {
+                        //     // 不相交
+
+
+                        //     const distance = CurrentPos.subtract(cc.v3(Other_OneRect.x, Other_OneRect.y)).len()
+
+                        //     console.log(distance);
+
+                        //     if (distance < 100) {
+
+                        //     } else {
+                        //         this.node.position = this.getTargetPosInMap(this.MoveIndex)
+                        //     }
+
+
+                        //     // this.node.position = CurrentPos
+                        //     return true
+                        // }
+
+
+
+
+
+
+                        return true
+                    } else {
+                        // console.log("矩形不相交");
+                    }
+                }
+            }
+        }
+        return false
+    }
+
+
+    isSofaPlaceOK = false
+
+    //沙发放置  
+    SofaPlace(event?: cc.Event.EventTouch) {
+        if (this.isSofaPlaceOK == false) {
+            return
+        }
+        this.isSofaPlaceOK = false
+
+        let NowMapPos = this.getNodeMapPos(this.node.x, this.node.y)
+        let startPos = this.getNodeMapPos(this.startPos.x, this.startPos.y)
+
+
+
+
+        //如果是引导模式
+        if (LocalData.getInstance().getWorkState() === WorkState.引导) {
+            if (HonorManger.getInstance().GuideData[HonorManger.getInstance().GuideStep].bronPos.x == this.BronPos.x &&
+                HonorManger.getInstance().GuideData[HonorManger.getInstance().GuideStep].bronPos.y == this.BronPos.y &&
+                HonorManger.getInstance().GuideData[HonorManger.getInstance().GuideStep].NowPos.x == NowMapPos.x &&
+                HonorManger.getInstance().GuideData[HonorManger.getInstance().GuideStep].NowPos.y == NowMapPos.y
+            ) {
+
+            } else {
+
+                this.changeTableData(startPos, 3)
+                this.node.position = this.getTargetPosInMap(startPos)
+                AudioManager.instance.playEffect(AudioManager.seat_click_end)
+                Sdk.getInstance().Vibrate(VibrateType.Short, null)
+                return
+            }
+        }
+
+
+
+
+        //移动记录
+        if (startPos &&
+            startPos.x == NowMapPos.x &&
+            startPos.y == NowMapPos.y
+        ) {
+
+        } else {
+            //移动到新的位置
+
+            //1  开始倒计时
+            cc.systemEvent.emit(EventName.StartCountDown)
+
+
+            //2 检测这个移动用时 
+
+            let temp: CheckSeatType = {
+                'uuid': this.node.uuid,
+                'BronPos': this.BronPos,
+                'NowPos': NowMapPos,
+                'MoveSeatTime': cc.sys.now() - this.moveSeatHasTime,
+
+
+
+            }
+            HonorManger.getInstance().UpSeatMove(temp)
+        }
+
+
+        this.changeTableData(this.MoveIndex, 3)
+        this.node.position = this.getTargetPosInMap(this.MoveIndex)
+
+
+        AudioManager.instance.playEffect(AudioManager.seat_click_end)
+        Sdk.getInstance().Vibrate(VibrateType.Short, null)
+        this.logtableData('结束')
+    }
+
+
+
+    getTargetPosInMap(MapPos: cc.Vec2) {
+        return cc.v3(leftButtomStatPos.x + MapPos.x * tiledSize.width + tiledSize.width / 2, leftButtomStatPos.y + MapPos.y * tiledSize.height + tiledSize.height / 2)
+    }
+
+    /**
+     * 判断是否可以 放置
+     *   只能房子 表格的空格中
+     *  */
+    getEndPosInMap(x?: number, y = 0) {
+
+
+        let MapPos = cc.v2(x, y)
+
+        if (x === undefined) {
+            MapPos = this.getNodeMapPos()
+        }
+        if (MapPos) {
+            return cc.v3(leftButtomStatPos.x + MapPos.x * tiledSize.width + tiledSize.width / 2, leftButtomStatPos.y + MapPos.y * tiledSize.height + tiledSize.height / 2)
+        }
+        return null
+
+    }
+
+    /**
+     *  判断节点在地图中的位置 不在地图内,返回null
+     */
+    getNodeMapPos(x?: number, y?: number): cc.Vec2 | null {
+        x = x ?? this.node.x
+        y = y ?? this.node.y
+
+        // 注意 *** 先转换为世界坐标  世界坐标跟节点坐标不能简单等价,一定要转换成节点坐标才能用
+        let woldPos = this.node.parent.convertToWorldSpaceAR(cc.v2(x, y))
+        // 一定要加上这句
+        let rootPos = cc.find("Canvas/gameLayer/MapLayer").convertToNodeSpaceAR(woldPos)
+        x = rootPos.x
+        y = rootPos.y
+
+        // console.log('---tableData.length--', tableData.length, x, y)
+        // 这样判断,虽然写着复杂,但是比直接算出所有虚拟位置再比较效率高
+        if (x > leftButtomStatPos.x && x < (leftButtomStatPos.x + tableData[0].length * tiledSize.width) && y > leftButtomStatPos.y && y < leftButtomStatPos.y + tableData.length * tiledSize.height) {
+            let x1 = Math.floor((x - leftButtomStatPos.x) / tiledSize.width)
+            let y1 = Math.floor((y - leftButtomStatPos.y) / tiledSize.height)
+            // cc.log('mapPos=', x1, y1)
+            return cc.v2(x1, y1)
+        }
+
+
+        return null
+    }
+
+    audioPlay(path: string, loop = false) {
+        return new Promise((resolve, reject) => {
+            resolve(0)
+            return
+        })
+    }
+
+
+    MyisDouble() {
+        //余数
+        var yushu = this.Myid % 1000
+
+        if (yushu > 10 && yushu <= 20) {
+            return true
+        }
+        return false
+    }
+
+
+
+
+    //不能移动的ID
+    NotMoveID = [61, 99]
+
+    iSMove() {
+        for (let index = 0; index < this.SofaComp.isTarget.length; index++) {
+            const element = this.SofaComp.isTarget[index];
+            if (element) {
+                this.SofaComp.NoMoveAnim()
+                return false
+            }
+        }
+
+        if (this.Myid == 99) {
+            return false
+        }
+
+
+        if (this.SofaComp.SofaColor == SofaColor.灰 || this.Myid == 99 || this.Myid == 61 || BarrierDrag.PlayJump == true || this.SofaComp.isLock == true) {
+            this.SofaComp.NoMoveAnim()
+            return false
+        }
+        return true
+    }
+
+
+
+    // update (dt) {}
+}

+ 10 - 0
assets/Script/GameLogic/barrierDrag.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "9b4a6848-f44a-4f82-ba97-aa4d21143776",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 595 - 0
assets/Script/GameLogic/game.ts

@@ -0,0 +1,595 @@
+import EventName from "../EventName/EventName";
+import AudioManager from "../GameUI/AudioManager";
+import GameLevel from "../GameUI/GameLevel";
+import HonorManger from "../GameUI/HonorManger";
+import LocalData, { WorkState } from "../Template/LocalData";
+import MyComponent from "../Template/MyComponent";
+import { AStar } from "./aStar";
+import BarrierDrag from "./barrierDrag";
+import { BusNodeData, BusNodeDataType, BusType, ChangeMapInitOver, leftButtomStatPos, tableData, tiledSize } from "./DataConfig";
+import MapLayer from "./mapLayer";
+import Sofa from "./Sofa";
+
+
+
+const { ccclass, property } = cc._decorator;
+
+// 函数装饰器
+/**
+ * 绑定事件装饰器函数
+ * 函数的传参尽量简洁明确
+ *
+ * @param amount 需要传递的参数数量
+ */
+export function bindShowFindPos(amount?: number): any {
+    return function (
+        target: any,
+        name: string,
+        descriptor: PropertyDescriptor
+    ): PropertyDescriptor {
+        const oriFn = descriptor.value;
+        descriptor.value = function (...data: any[]) {
+            const ret = oriFn.apply(this, data);
+            // cc.log('----测试装饰函数----',data)
+            return ret;
+        };
+        return descriptor;
+    };
+}
+
+
+
+
+
+@ccclass
+export default class Game extends MyComponent {
+
+
+    @property(cc.Node)
+    fllowNode: cc.Node = null
+    @property(cc.Node)
+    BusMod2Node: cc.Node = null
+    @property(cc.Node)
+    BusMod4Node: cc.Node = null
+    @property(cc.Node)
+    BusMod1Node: cc.Node = null
+    @property(cc.Node)
+    BusMod3Node: cc.Node = null
+ 
+
+
+    //人物初始位置
+    playerMapPos = cc.v2(1, 1)
+    targetPos: cc.Vec2
+
+    player: cc.Node
+    barrier: cc.Node
+    barrierLayer: cc.Node
+    MapLayerNode: cc.Node
+    pathLayer: cc.Node
+    // onLoad () {}
+
+    private isShowProcess = false
+
+    private aStar: AStar
+
+    count: number = 0
+
+    _openList = []
+    _closeList = []
+
+
+
+
+    protected onEnable(): void {
+
+
+        //初始化检测游戏勋章系统
+
+        console.log('初始化检测游戏勋章系统');
+
+        HonorManger.getInstance().GameInit()
+
+        this.schedule(() => {
+            HonorManger.getInstance().Game601()
+        }, 1)
+
+
+        if (LocalData.getInstance().getWorkState() === WorkState.引导) {
+            this.schedule(() => {
+                //引导
+                HonorManger.getInstance().Guide1()
+            }, 2, 999999, 0.5)
+        }
+    }
+
+    protected onDisable(): void {
+        this.unscheduleAllCallbacks()
+    }
+
+    onLoad(): void {
+        super.onLoad();
+        var manager = cc.director.getCollisionManager();
+        // manager.enabled = true;
+        // manager.enabledDebugDraw = true;
+
+        this.regEvent(EventName.BronBus, this.BronBus, this)
+        this.regEvent(EventName.BronMap, this.BronMap, this)
+        this.regEvent(EventName.driveBus, this.driveBus, this)
+    }
+    start() {
+        this.initUI()
+
+        AudioManager.instance.playGameBg()
+    }
+
+
+
+    //生成车子预制体
+    async BronBus() {
+        let Pos = BusNodeData[BusType][LocalData.getInstance().getBusSkin() - 1] as BusNodeDataType
+
+        let Nodesqueue: cc.Node[] = []
+        Nodesqueue.push(this.BusMod1Node)
+        Nodesqueue.push(this.BusMod2Node)
+        Nodesqueue.push(this.BusMod3Node)
+        Nodesqueue.push(this.BusMod4Node)
+        // Nodesqueue.push(this.fllowNode)
+
+        for (let index = 0; index < Pos.BusModSp.length; index++) {
+            const element = Pos.BusModSp[index];
+            if (element) {
+                //先动态加载图片
+                let res = await this.LoadBusSpriteFrame('/Skin' + LocalData.getInstance().getBusSkin() + '/' + element) as cc.SpriteFrame
+                Nodesqueue[index].getComponent(cc.Sprite).spriteFrame = res
+            } else {
+                Nodesqueue[index].getComponent(cc.Sprite).spriteFrame = null
+            }
+        }
+
+        let resfllow = await this.LoadBusSpriteFrame('/fllow') as cc.SpriteFrame
+        this.fllowNode.getComponent(cc.Sprite).spriteFrame = resfllow
+
+        //修改缩放
+        this.ChangeNodeScale(Pos)
+
+        //修改位置
+        this.ChangeNodePos()
+
+        cc.systemEvent.emit(EventName.BronMap)
+    }
+
+    ChangeNodeScale(temp: BusNodeDataType) {
+        let Nodesqueue: cc.Node[] = []
+        Nodesqueue.push(this.BusMod1Node)
+        Nodesqueue.push(this.BusMod2Node)
+        Nodesqueue.push(this.BusMod3Node)
+        Nodesqueue.push(this.BusMod4Node)
+
+
+        for (let index = 0; index < Nodesqueue.length; index++) {
+            const element = Nodesqueue[index];
+            element.scale = temp.BusScale
+        }
+
+
+        this.fllowNode.scale = temp.MapScale
+        this.node.scale = temp.MapScale
+
+    }
+
+    ChangeNodePos() {
+        let Pos = BusNodeData[BusType][LocalData.getInstance().getBusSkin() - 1] as BusNodeDataType
+
+        if (Pos.fllow) {
+            this.fllowNode.setPosition(Pos.fllow?.[0], Pos.fllow?.[1])
+        }
+        if (Pos.BusMod2) {
+            this.BusMod2Node.setPosition(Pos.BusMod2?.[0], Pos.BusMod2?.[1])
+            this.BusMod2Node.active = true
+        } else {
+            this.BusMod2Node.active = false
+        }
+        if (Pos.BusMod4) {
+            this.BusMod4Node.setPosition(Pos.BusMod4?.[0], Pos.BusMod4?.[1])
+            this.BusMod4Node.active = true
+        } else {
+            this.BusMod4Node.active = false
+        }
+        if (Pos.BusMod1) {
+            this.BusMod1Node.setPosition(Pos.BusMod1?.[0], Pos.BusMod1?.[1])
+            this.BusMod1Node.active = true
+        } else {
+            this.BusMod1Node.active = false
+        }
+        if (Pos.BusMod3) {
+            this.BusMod3Node.setPosition(Pos.BusMod3?.[0], Pos.BusMod3?.[1])
+            this.BusMod3Node.active = true
+        } else {
+            this.BusMod3Node.active = false
+        }
+        if (Pos.gameLayer) {
+            this.node.setPosition(Pos.gameLayer?.[0], Pos.gameLayer?.[1])
+        }
+
+        if (Pos.BgImage) {
+            // this.BgImage.spriteFrame = Pos.BgImage
+ 
+            
+        }
+
+
+    }
+
+
+    //加载车子图片
+    LoadBusSpriteFrame(spName: string) {
+        return new Promise((resolve, reject) => {
+            let LoadPath = 'res/Bus/' + BusType + spName
+            let bundle = cc.assetManager.getBundle("sub");
+            bundle.load(LoadPath, cc.SpriteFrame, null, (err, Sp: cc.SpriteFrame) => {
+                if (err) {
+                    cc.error(`${LoadPath} 加载失败`)
+                    reject(err)
+                    return
+                }
+                resolve(Sp)
+            })
+        })
+    }
+
+
+
+    BronMap() {
+        this.LoadGameLevel()
+    }
+    async LoadGameLevel() {
+        // 初始化地图中的障碍物
+        for (let i = 0; i < tableData.length; i++) {
+            for (let j = 0; j < tableData[0].length; j++) {
+                let v = tableData[i][j]
+                if (v > 0) {
+                    await this.LoadSofaPrefab(v, i, j)
+
+                }
+            }
+        }
+
+        this.ShowNode()
+    }
+
+
+    refreshShowLabel() {
+        let findexLableLayer = this.node.getChildByName("findexLableLayer")
+        findexLableLayer.removeAllChildren()
+        this.count = 0
+    }
+
+
+    LoadSofaPrefab(BarrierDragtype: number, i: number, j: number,) {
+        return new Promise((resolve, reject) => {
+
+            // //如果是墙就 掠过
+            // if (BarrierDragtype == 99) {
+            //     resolve(0)
+            //     return
+            // }
+
+            //余数
+            var yushu = BarrierDragtype % 1000
+
+            //千位是不是锁
+            var q = parseInt((BarrierDragtype % 100000 % 10000 / 1000).toString())
+
+            let bundle = cc.assetManager.getBundle("sub");
+            bundle.load('res/BarrierDrag/' + yushu, cc.Prefab, null, (err, node: cc.Prefab) => {
+                if (err) {
+                    cc.error(`${BarrierDragtype} 加载${yushu}失败`)
+                    reject(err)
+                    return
+                }
+
+                let newBarrier = cc.instantiate(node)
+                newBarrier.position = this.getNodePosByMapPos(j, i)
+                newBarrier.parent = this.barrierLayer
+
+                newBarrier.addComponent(BarrierDrag).isInMap = true
+
+                let BarrierDragComonent = newBarrier.getComponent(BarrierDrag)
+
+                BarrierDragComonent.Myid = BarrierDragtype
+
+                let SofaComonent = newBarrier.addComponent(Sofa)
+
+                SofaComonent.init(BarrierDragtype, yushu, q)
+
+
+                BarrierDragComonent.onLoad()
+                BarrierDragComonent.ShowLock()
+                resolve(0)
+            })
+        })
+    }
+
+    initUI() {
+        this.MapLayerNode = this.node.getChildByName("MapLayer")
+        this.barrier = this.MapLayerNode.getChildByName("UILayer").getChildByName("barrier")
+        this.barrierLayer = this.MapLayerNode.getChildByName('barrierLayer')
+        this.pathLayer = this.MapLayerNode.getChildByName('pathLayer')
+
+        // this.refreshLabe()
+    }
+
+
+    refreshLabe() {
+        let MapLayer = this.node.getChildByName("MapLayer")
+        let UILayer = MapLayer.getChildByName("UILayer")
+        UILayer.position = cc.v3(this.getNodePosByMapPos(tableData[0].length + 1, tableData.length - 1))
+        // this.player.position = cc.v3(this.getNodePosByMapPos(this.playerMapPos.x, this.playerMapPos.y))
+    }
+
+
+    async showPathsAndMove() {
+
+        this.refreshShowLabel()
+        console.time('findPath')
+        let resultList = await this.aStar.findePaths(this.playerMapPos, this.targetPos)
+        console.timeEnd('findPath')
+
+        if (resultList[0]) {
+            let mapPosList = <[cc.Vec2]>resultList[1]
+
+            let gp = this.pathLayer.getComponent(cc.Graphics)
+
+            //画openList
+            // let closeList=<any[]>resultList[3]
+            // // cc.log('--openList---',closeList)
+            // for(let i=0;i<closeList.length;i++){
+            //     let nodePos=this.getNodePosByMapPos(closeList[i].pos.x,closeList[i].pos.y)
+            //     gp.fillRect(nodePos.x-tiledSize.width/2,nodePos.y-tiledSize.height/2,tiledSize.width,tiledSize.height)
+            //     gp.strokeColor = new cc.Color().fromHEX('##B23FAB');
+            //     gp.stroke()
+            // }
+
+            // 画路径
+            // for (let i = 0; i < mapPosList.length; i++) {
+            //     let nodePos = this.getNodePosByMapPos(mapPosList[i].x, mapPosList[i].y)
+            //     gp.fillRect(nodePos.x - tiledSize.width / 2, nodePos.y - tiledSize.height / 2, tiledSize.width, tiledSize.height)
+            //     gp.strokeColor = new cc.Color().fromHEX('#4B64BC9A');
+            //     gp.stroke()
+
+            // }
+
+            this.playerMove(mapPosList, gp)
+
+        } else {
+            // cc.log('----找不到路径---')
+            // let tip = cc.find('Canvas/tips').getComponent(cc.Label)
+            // tip.node.active = true
+            // tip.node.scale = 0
+            // tip.node.opacity = 255
+            // tip.string = '此路不通'
+            // cc.tween(tip.node)
+            //     .to(0.3, { scale: 1.2 })
+            //     .to(0.1, { scale: 1 })
+            //     .delay(2)
+            //     .to(0.5, { opacity: 0 })
+            //     .call(() => {
+            //         tip.node.active = false
+            //     }).start()
+        }
+
+        // cc.log('------', resultList)
+    }
+
+
+    playerMove(paths: [cc.Vec2], gp?: cc.Graphics) {
+
+        let quance = []
+        paths.forEach((v) => {
+            let move = cc.moveTo(0.2, cc.v2(this.getNodePosByMapPos(v.x, v.y)))
+            quance.push(move)
+        })
+        let callBack = cc.callFunc(() => {
+            cc.log('---moveEnd--')
+            let targetPos = paths[paths.length - 1]
+            this.playerMapPos = cc.v2(targetPos)
+            if (gp) {
+                // 如果显示过程不清除
+                if (this.isShowProcess) return
+                gp.clear()
+            }
+        })
+        quance.push(callBack)
+        // this.player.stopAllActions()
+        // this.player.runAction(cc.sequence(quance))
+
+    }
+
+
+    /**
+     * 节点坐标转为 地图坐标
+     * @param x 
+     * @param y 
+     * @returns 
+     */
+    getMapPosByNodePos(x?: number, y?: number): cc.Vec2 | null {
+        x = x ?? this.node.x
+        y = y ?? this.node.y
+
+        // 这样判断,虽然写着复杂,但是比直接算出所有虚拟位置再比较效率高
+        if (x > leftButtomStatPos.x && x < (leftButtomStatPos.x + tableData[0].length * tiledSize.width) && y > leftButtomStatPos.y && y < leftButtomStatPos.y + tableData.length * tiledSize.height) {
+            let x1 = Math.floor((x - leftButtomStatPos.x) / tiledSize.width)
+            let y1 = Math.floor((y - leftButtomStatPos.y) / tiledSize.height)
+            cc.log('mapPos=', x1, y1)
+            return cc.v2(x1, y1)
+        }
+        return null
+    }
+
+
+    /**
+     *  地图坐标转为节点坐标
+     * @param x 
+     * @param y 
+     * @returns 
+     */
+    getNodePosByMapPos(x: number, y: number) {
+        x = Math.floor(x)
+        y = Math.floor(y)
+        let nodePos = cc.v3(leftButtomStatPos.x + x * tiledSize.width + tiledSize.width / 2, leftButtomStatPos.y + y * tiledSize.height + tiledSize.height / 2)
+        return nodePos
+    }
+
+
+    // 改变 寻路方向  4 向 和8向
+    changeMoveDriction() {
+        this.aStar.changeDeriction()
+        this.refreshLabe()
+    }
+
+    changIsShowpross() {
+        this.isShowProcess = !this.isShowProcess
+        this.aStar.setIsShowProcess(this.isShowProcess)
+    }
+
+    addMapTable() {
+        if (tableData.length < 20) {
+            tableData.forEach((v, index) => {
+                v.push(0)
+            })
+            //增加竖向
+            let list = new Array(tableData[0].length).fill(0)
+            tableData.push(list)
+            let mapLayerCom = this.MapLayerNode.getComponent(MapLayer)
+            mapLayerCom.initMap()
+            this.refreshLabe()
+
+        }
+
+        console.log('---tableData.length--', tableData.length)
+    }
+    reduceMapTable() {
+        cc.log('----tableData---', tableData)
+        if (tableData.length > 5) {
+            //主角重置
+            this.playerMapPos = cc.v2(3, 3)
+
+            tableData.forEach((v, _index) => {
+                let num = v.splice(v.length - 1, 1)
+
+                if (num[0] > 0) {
+
+                    // 需要删除对应的障碍物
+                    let Pos = cc.v2(v.length, _index)
+                    this.barrierLayer.children.forEach((child) => {
+                        if (child.name === `${Pos.x}_${Pos.y}`) {
+                            child.destroy()
+                        }
+                    })
+                }
+            }
+            )
+            // 横向的也要删除
+            let list = tableData.splice(tableData.length - 1, 1)
+            list[0].forEach((v, _index) => {
+                if (v > 0) {
+                    // 需要删除对应的障碍物
+                    let Pos = cc.v2(_index, tableData.length)
+                    this.barrierLayer.children.forEach((child) => {
+                        if (child.name === `${Pos.x}_${Pos.y}`) {
+                            child.destroy()
+                        }
+                    })
+                }
+            })
+
+
+            let mapLayerCom = this.MapLayerNode.getComponent(MapLayer)
+            mapLayerCom.initMap()
+            this.refreshLabe()
+        }
+
+        console.log('---tableData.length--', tableData.length)
+
+    }
+
+    exitGame() {
+        cc.game.end()
+    }
+
+
+    ClearMap() {
+        //清除沙发和人物
+        this?.barrierLayer?.children?.forEach(e => { e?.destroy() })
+    }
+
+    ShowNode() {
+        let yPos = 1300//GameLevel.gameLevel
+
+        let ytime = 1.3
+
+        for (let index = 0; index < this.ShowQueueNode.length; index++) {
+            const element = this.ShowQueueNode[index];
+            this.Run(element, index, ytime, yPos)
+        }
+    }
+
+    Run(element: cc.Node, index: number, time: number, yPos: number) {
+        cc.tween(element)
+            .by(0, { y: -yPos })
+            .call(() => {
+                element.opacity = 255
+            })
+            .by(time, { y: yPos })
+            .call(() => {
+                if (index == 0) {
+                    cc.systemEvent.emit(EventName.driveBusOver)
+                    ChangeMapInitOver(true)
+                }
+            })
+            .start()
+    }
+
+
+    ShowQueueNode = []
+
+    driveBus(time = 1.5, NextCoustom = true) {
+
+
+
+        let fllow = this.node.parent.getChildByName("fllow")
+        let BusMod2 = this.node.parent.getChildByName("BusMod2")
+        let BusMod4 = this.node.parent.getChildByName("BusMod4")
+        let BusMod1 = this.node.parent.getChildByName("BusMod1")
+        let BusMod3 = this.node.parent.getChildByName("BusMod3")
+        let gameLayer = this.node.parent.getChildByName("gameLayer")
+
+        let fff = []
+        fff.push(fllow)
+        fff.push(BusMod2)
+        fff.push(BusMod4)
+        fff.push(BusMod1)
+        fff.push(BusMod3)
+        fff.push(gameLayer)
+        this.ShowQueueNode = fff
+
+        for (let index = 0; index < fff.length; index++) {
+            const element = fff[index];
+            cc.tween(element)
+                .by(time, { y: 1500 })
+                .call(() => {
+                    element.opacity = 0
+                    if (index == 0) {
+                        this.ClearMap()
+
+                        if (NextCoustom) {
+                            //开车到一半
+                            cc.systemEvent.emit(EventName.driveBusMind)
+                        }
+                    }
+                })
+                .start()
+        }
+    }
+}

+ 10 - 0
assets/Script/GameLogic/game.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "44da5a72-a5eb-4c73-8a81-b1113e3b2d88",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 69 - 0
assets/Script/GameLogic/indexManager.ts

@@ -0,0 +1,69 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName from "../EventName/EventName";
+import MyComponent from "../Template/MyComponent";
+import BarrierDrag from "./barrierDrag";
+
+const { ccclass, property } = cc._decorator;
+//负责子节点的 层级排序
+@ccclass
+export default class indexManager extends MyComponent {
+
+
+
+    // LIFE-CYCLE CALLBACKS:
+
+    onLoad() {
+        super.onLoad();
+
+        this.regEvent(EventName.UpdataRender, this.up, this)
+    }
+
+
+    up() {
+        // //玩家不再编辑中  才排序 
+        // if (!BarrierDrag.PlayEditer && this.node.children.length > 0) {
+        //     // this.node.setSiblingIndex(this.node.parent.childrenCount)
+
+        //     for (let index = 0; index < this.node.children.length; index++) {
+        //         const element = this.node.children[index];
+        //         let tempBarrierDrag = element.getComponent(BarrierDrag)
+
+        //         if (tempBarrierDrag) {
+        //             let MapPos = tempBarrierDrag.getNodeMapPos()
+
+        //             element.zIndex = (200 - (MapPos.x + MapPos.y * 6))
+        //         }
+        //     }
+        // }
+
+
+        //玩家不再编辑中  才排序 
+        if (this.node.children.length > 0) {
+            // this.node.setSiblingIndex(this.node.parent.childrenCount)
+
+            for (let index = 0; index < this.node.children.length; index++) {
+                const element = this.node.children[index];
+                let tempBarrierDrag = element.getComponent(BarrierDrag)
+
+                if (tempBarrierDrag) {
+                    let MapPos = tempBarrierDrag.getNodeMapPos()
+
+                    element.zIndex = (200 - (MapPos.x + MapPos.y * 6))
+                }
+            }
+        }
+    }
+
+    onDestroy(): void {
+
+        super.onDestroy()
+        this.unscheduleAllCallbacks()
+    }
+    // update (dt) {}
+}

+ 10 - 0
assets/Script/GameLogic/indexManager.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "8f087a88-61ec-44cc-a455-f8062515cef0",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 50 - 0
assets/Script/GameLogic/mapLayer.ts

@@ -0,0 +1,50 @@
+
+
+import { leftButtomStatPos, tableData, tiledSize } from "./DataConfig";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class MapLayer extends cc.Component {
+
+    graphics: cc.Graphics
+
+    start() {
+
+        this.initMap()
+
+    }
+
+    public initMap() {
+        this.graphics = this.node.getChildByName('floorLayer').getComponent(cc.Graphics)
+        this.graphics.clear()
+        //1.底板
+        this.graphics.rect(leftButtomStatPos.x, leftButtomStatPos.y, tiledSize.width * tableData[0].length, tiledSize.height * tableData.length)
+        this.graphics.fill()
+        this.graphics.close()
+        this.graphics.stroke()
+        this.graphics.strokeColor = new cc.Color().fromHEX('#33A70A');
+
+        // 2画地图表格
+        for (let i = 1; i < tableData[0].length; i++) {
+            for (let j = 1; j < tableData.length; j++) {
+                let row1 = cc.v2(leftButtomStatPos.x + 0, j * tiledSize.height + leftButtomStatPos.y)
+                let row2 = cc.v2(leftButtomStatPos.x + tableData[0].length * tiledSize.width, j * tiledSize.height + leftButtomStatPos.y)
+                this.graphics.moveTo(row1.x, row1.y)
+                this.graphics.lineTo(row2.x, row2.y)
+                let line1 = cc.v2(leftButtomStatPos.x + i * tiledSize.width, leftButtomStatPos.y)
+                let line2 = cc.v2(leftButtomStatPos.x + i * tiledSize.width, tableData.length * tiledSize.height + leftButtomStatPos.y)
+                this.graphics.moveTo(line1.x, line1.y)
+                this.graphics.lineTo(line2.x, line2.y)
+            }
+        }
+
+        this.graphics.stroke()
+
+    }
+
+
+
+
+    // update (dt) {}
+}

+ 10 - 0
assets/Script/GameLogic/mapLayer.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "45b29a33-76b5-40f8-8663-a3e1b13d16b2",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/Script/GameUI.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "07c8af04-e631-4a42-89f4-831319bf65ab",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 99 - 0
assets/Script/GameUI/AudioManager.ts

@@ -0,0 +1,99 @@
+
+import LocalData from "../Template/LocalData";
+
+export default class AudioManager {
+    public static readonly instance: AudioManager = new AudioManager();
+    public static HALL_BG_MUSIC = "res/Audio/hall";
+    public static Game_BG_MUSIC = "res/Audio/game";
+
+
+
+    public static BUTTON_EFFECT1 = "res/Audio/btn1";
+
+    public static seat_click_start = "res/Audio/seat_anzhu";
+    public static seat_click_end = "res/Audio/seat_songkai";
+
+
+
+    public bgPath = null;
+    public playOnlyOnceAudioRecord: object = null;
+
+
+    constructor() {
+        this.UpdateVolume()
+    }
+    public UpdateVolume() {
+        if (LocalData.getInstance().getMusic()) {
+            cc.audioEngine.setMusicVolume(1)
+        } else {
+            cc.audioEngine.setMusicVolume(0)
+        }
+
+        if (LocalData.getInstance().getEffects()) {
+            cc.audioEngine.setEffectsVolume(1)
+        } else {
+            cc.audioEngine.setEffectsVolume(0)
+        }
+    }
+
+
+    public getSoundUrl(path: string): Promise<cc.AudioClip> {
+        return new Promise<cc.AudioClip>((re, rj) => {
+
+            let bundle = cc.assetManager.getBundle("sub");
+            // bundle.load(path, (err, Asset: T) => {
+
+            bundle.load(path, cc.AudioClip, (error: Error, resource: cc.AudioClip) => {
+                if (!error) {
+                    re(resource);
+                } else {
+                    re(null);
+                }
+            });
+        })
+    }
+    public playBg(path: string) {
+        cc.audioEngine.stopMusic();
+        (async () => {
+            let au = await this.getSoundUrl(path);
+            if (cc.isValid(au)) {
+                let audioId = cc.audioEngine.playMusic(au, true);
+            }
+        })();
+    }
+    public playEffect(effectName: string) {
+        (async () => {
+            let au = await this.getSoundUrl(effectName);
+            if (cc.isValid(au)) {
+                let audioId = cc.audioEngine.playEffect(au, false);
+            }
+        })();
+    }
+
+    public playGameBg() {
+        this.playBg(AudioManager.Game_BG_MUSIC);
+    }
+    public playHallBg() {
+        this.playBg(AudioManager.HALL_BG_MUSIC);
+    }
+
+    public playBtnEffect(effectType: number = 0) {
+        switch (effectType) {
+            case 0:
+                this.playEffect(AudioManager.BUTTON_EFFECT1);
+                break;
+            case 1:
+                break;
+            case 2:
+                break;
+            default:
+                break;
+        }
+    }
+
+
+    public static stopBg() {
+        cc.audioEngine.stopMusic();
+    }
+
+}

+ 10 - 0
assets/Script/GameUI/AudioManager.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "c6bc3543-773d-4f37-a05a-4e07ea1aac6e",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 49 - 0
assets/Script/GameUI/Collect.ts

@@ -0,0 +1,49 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { ItemName } from "../EventName/EventName";
+import PopComponet from "../Template/PopComponet";
+import CollectManger from "./CollectManger";
+import Collectitem from "./Collectitem";
+import PopManger from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Collect extends PopComponet {
+
+
+    @property(cc.Node)
+    Itemparent: cc.Node = null
+
+
+    protected onEnable(): void {
+        this.init_progress()
+        this.init_item()
+    }
+
+    init_progress() {
+        let _progress = CollectManger.getInstance().HoldNum / CollectManger.getInstance().Total
+        this.node.getComponentInChildren(cc.ProgressBar).progress = _progress
+        this.node.getComponentInChildren(cc.ProgressBar).node.getComponentInChildren(cc.Label).string =
+            `已收集${CollectManger.getInstance().HoldNum}/${CollectManger.getInstance().Total}`
+    }
+
+
+    init_item() {
+        CollectManger.getInstance().AllCollectList.forEach(element => {
+            PopManger.getInstance().LoadAssets<cc.Prefab>(ItemName.Collectitem).then((Prefab) => {
+                let subPrefab = cc.instantiate(Prefab)
+                subPrefab.getComponent(Collectitem).MyType = element
+                subPrefab.parent = this.Itemparent
+            }).catch((error) => {
+                // 加载失败的处理
+            });
+        })
+    }
+
+}

+ 10 - 0
assets/Script/GameUI/Collect.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "cebc98dc-b428-4258-a04b-dc92973cc570",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 85 - 0
assets/Script/GameUI/CollectManger.ts

@@ -0,0 +1,85 @@
+
+//收藏管理器
+const { ccclass, property } = cc._decorator;
+
+export type CollectDetailsType = {
+    Id: number;
+    Name: string;
+    Picture?: string;
+    PositionLevelId?: number;
+    PositionLevelIName?: string;
+    Condition?: string;//"升级为[实习生]获得此装扮",
+    Description?: string;//"实习生名牌",
+    IsWear?: number; // 0 表示未穿戴,1 表示穿戴
+    IsHold?: number; // 0 表示未拥有,1 表示拥有
+}
+ 
+@ccclass
+export default class CollectManger {
+    private static instance: CollectManger;
+    public static getInstance(): CollectManger {
+        if (!CollectManger.instance) {
+            CollectManger.instance = new CollectManger();
+        }
+        return CollectManger.instance;
+    }
+
+
+    //当前选择的收藏
+    private _SelectCollect: CollectDetailsType[] = [];
+    public get SelectCollect(): CollectDetailsType[] {
+        return this._SelectCollect;
+    }
+    public set SelectCollect(value: CollectDetailsType[]) {
+        this._SelectCollect = value;
+    }
+
+    //已有的收藏数组
+    private _hasCollectList: CollectDetailsType[] = [];
+    public get HasCollectList(): CollectDetailsType[] {
+        return this._hasCollectList;
+    }
+    public set HasCollectList(value: CollectDetailsType[]) {
+        this._hasCollectList = value;
+    }
+
+
+    //全部的收藏数组
+    private _allCollectList: CollectDetailsType[] = [];
+    public get AllCollectList(): CollectDetailsType[] {
+        return this._allCollectList;
+    }
+    public set AllCollectList(value: CollectDetailsType[]) {
+        this._allCollectList = value;
+    }
+
+
+    //拥有的数量
+    HoldNum = 0
+    //总共的数量
+    Total = 0
+
+    init(d) {
+        //初始化
+        this.AllCollectList = d.Data.UserCollects
+
+        this.HasCollectList = d.Data.UserCollects.filter((e: CollectDetailsType) => {
+            return e.IsHold == 1
+        })
+
+        this.SelectCollect = d.Data.UserCollects.filter((e: CollectDetailsType) => {
+            return e.IsWear == 1
+        })
+
+        this.HoldNum = d.Data.HoldNum
+        this.Total = d.Data.Total
+    }
+
+
+
+
+
+
+
+}
+

+ 10 - 0
assets/Script/GameUI/CollectManger.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "17df1c91-c8d0-43ad-be7d-c050ff234918",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 88 - 0
assets/Script/GameUI/Collectitem.ts

@@ -0,0 +1,88 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName, { PopName } from "../EventName/EventName";
+import { ButtonLock } from "../GameLogic/Sofa";
+import HTTPS, { NetGet } from "../Template/HTTPS";
+import MyComponent from "../Template/MyComponent";
+import CollectManger, { CollectDetailsType } from "./CollectManger";
+import PopManger from "./PopManger";
+
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Collectitem extends MyComponent {
+    MyType: CollectDetailsType = null;
+    select: cc.Node = null;
+    sp: cc.Node = null;
+
+
+    isGray = false;
+
+    onLoad(): void {
+        this.sp = this.node.getChildByName("mask").getChildByName("sp")
+        this.select = this.node.getChildByName("select")
+
+
+        this.regEvent(EventName.CollectSelect, this.SetSelect, this)
+    }
+
+    start(): void {
+        let t = this.sp.getComponent(cc.Sprite)
+        let t1 = this.select.getComponent(cc.Sprite)
+        // 成功加载后的处理
+        cc.assetManager.loadRemote(this.MyType.Picture, (err, res: cc.Texture2D) => {
+            if (!err) {
+                t.spriteFrame = new cc.SpriteFrame(res);
+
+                if (this.MyType.IsHold == 1) {
+                    // @ts-ignore 
+                    t.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.SPRITE, null))
+                    // @ts-ignore 
+                    t1.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.SPRITE, null))
+                    this.isGray = false
+                } else {
+                    // @ts-ignore 
+                    t.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.GRAY_SPRITE, null))
+                    // @ts-ignore 
+                    t1.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.GRAY_SPRITE, null))
+                    this.isGray = true
+                }
+
+
+                if (this.MyType.IsWear == 1) {
+                    this.node.parent.children.forEach(e => {
+                        e.getChildByName('select').active = false
+                    })
+                    this.select.active = true
+                }
+            }
+        })
+    }
+
+    SetSelect(id) {
+        if (id == this.MyType.Id) {
+            this.node.parent.children.forEach(e => {
+                e.getChildByName('select').active = false
+            })
+            this.select.active = true
+        }
+    }
+
+    @ButtonLock(0.1, null)
+    ClickMe() {
+        PopManger.getInstance().Pop(PopName.DressUp, {
+            animation: true,
+            Data: {
+                MyType: this.MyType,
+                Sp: this.sp.getComponent(cc.Sprite).spriteFrame
+            },
+        })
+    }
+
+}

+ 10 - 0
assets/Script/GameUI/Collectitem.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "c52671bf-4e56-4f07-967f-83923a627c89",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 106 - 0
assets/Script/GameUI/CurrentLevel.ts

@@ -0,0 +1,106 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import LocalData, { WorkState } from "../Template/LocalData";
+import PopComponet from "../Template/PopComponet";
+import GameLevel from "./GameLevel";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class CurrentLevel extends PopComponet {
+    onLoad() {
+
+    }
+
+    protected onEnable(): void {
+        let Label = this.node.getChildByName("Sp").getChildByName("Label").getComponent(cc.Label)
+        let Node = this.node.getChildByName("Node")
+        Node.active = false
+
+
+        this.weiqi(true)
+
+
+        //现在的关卡状态
+        switch (LocalData.getInstance().getWorkState()) {
+            case WorkState.引导:
+                Label.string = `小鹅巴士`
+                break;
+            case WorkState.上班:
+                if (GameLevel.gameLevel < 5) {
+                    Label.string = `第 ${GameLevel.gameLevel} 车`
+                } else {
+                    Label.string = `最后一车`
+                    this.DifficultyUp_anim()
+                }
+                break;
+            case WorkState.加班:
+                Label.string = `加班车`
+                break;
+            default:
+                cc.error('未知状态');
+                break;
+        }
+    }
+
+
+    protected start(): void {
+        this.scheduleOnce(() => {
+            if (this.isValid) {
+                super.Surpclose()
+            }
+        }, 2)
+
+        this.bus_anim()
+    }
+
+    bus_anim() {
+        let Sp = this.node.getChildByName("Sp")
+        Sp.setPosition(-1000, 0)
+        cc.tween(Sp)
+            .to(0.5, { x: 0 }, { easing: 'quadOut' })// quadOut2次方  cubicOut3次方  //quartOut 4次方
+            .call(() => {
+                this.weiqi(false)
+            })
+            .delay(1)
+            .to(0.5, { x: 1000 }, { easing: 'quadIn' })
+            .start()
+        let Mask = this.node.getChildByName("Mask")
+        Mask.opacity = 155
+        cc.tween(Mask)
+            .to(0.5, { opacity: 220 })
+            .delay(1)
+            .to(0.5, { opacity: 155 })
+            .start()
+    }
+
+
+
+    //难度飙升
+    DifficultyUp_anim() {
+        let Node = this.node.getChildByName("Node")
+        Node.active = true
+
+        let image = Node.getChildByName("image")
+        cc.tween(image)
+            .to(0.5, { scale: 1.2 })
+            .to(0.5, { scale: 1 })
+            .to(0.5, { scale: 1.2 })
+            .to(0.5, { scale: 1 })
+            .start()
+    }
+
+
+
+    weiqi(is: boolean) {
+        for (let index = 1; index < 4; index++) {
+            let line3 = this.node.getChildByName("Sp").getChildByName("line" + index)
+            line3.active = is
+        }
+    }
+}

+ 10 - 0
assets/Script/GameUI/CurrentLevel.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "b946bc75-30bd-4655-abff-e63e56bfe738",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 25 - 0
assets/Script/GameUI/DifficultyUp.ts

@@ -0,0 +1,25 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import PopComponet from "../Template/PopComponet";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class DifficultyUp extends PopComponet {
+
+
+    protected start(): void {
+        this.scheduleOnce(() => {
+            if (this.isValid) {
+                super.Surpclose()
+            }
+        }, 2)
+    }
+
+
+}

+ 10 - 0
assets/Script/GameUI/DifficultyUp.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "5abe3d8a-3981-422e-a9f5-199899b7fdb9",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 131 - 0
assets/Script/GameUI/Down.ts

@@ -0,0 +1,131 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName, { PopName } from "../EventName/EventName";
+import RoleQueue from "../GameLogic/RoleQueue";
+import BarrierDrag from "../GameLogic/barrierDrag";
+import HTTPS, { NetPost } from "../Template/HTTPS";
+import LocalData from "../Template/LocalData";
+import MyComponent from "../Template/MyComponent";
+import PopManger from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Down extends MyComponent {
+
+    pauseTime = 10
+
+
+    //现在是否正在弹射
+    static NowJumping: boolean = false
+
+
+    @property(cc.Label)
+    TimeStop: cc.Label = null
+
+    @property(cc.Label)
+    NowInSeat: cc.Label = null
+
+
+    onLoad(): void {
+        Down.NowJumping = false
+
+
+        this.init()
+
+        this.regEvent(EventName.UserPropTime, this.UserPropTime, this)
+        this.regEvent(EventName.UserPropJump, this.UserPropJump, this)
+
+        this.regEvent(EventName.UpdataPropCount, this.UpdataPropCount, this)
+    }
+
+    init() {
+        // {
+        //     "Version": "1.0.0",
+        //     "Code": 200,
+        //     "Message": "操作成功。",
+        //     "Data": 14,
+        //     "DataCount": 0,
+        //     "PageCount": 0,
+        //     "Mac": "",
+        //     "Timestamp": "2024-11-06T17:52:15.88151+08:00"
+        // }
+        HTTPS.Instance.post(NetPost.GetUserProp, {}).then(resp => {
+            if (resp.Data.Prop1) {
+                LocalData.getInstance().setTimeStopCount(resp.Data.Prop1)
+            } else {
+                LocalData.getInstance().setTimeStopCount(0)
+            }
+
+
+            if (resp.Data.Prop2) {
+                LocalData.getInstance().setNowSitDownCount(resp.Data.Prop2)
+            } else {
+                LocalData.getInstance().setNowSitDownCount(0)
+            }
+        })
+    }
+
+    UpdataPropCount() {
+        this.TimeStop.string = LocalData.getInstance().getNowSitDownCount().toString()
+        this.NowInSeat.string = LocalData.getInstance().getNowSitDownCount().toString()
+    }
+
+    UserPropTime() {
+        LocalData.getInstance().LessTimeStopCount()
+        console.log('执行时间停止一次');
+        // let btn = event.target as cc.Node
+        // btn.getComponent(cc.Button).interactable = false
+
+        PopManger.getInstance().Pop(PopName.TimePause)
+        //暂停
+        cc.systemEvent.emit(EventName.PauseCountDown)
+        this.scheduleOnce(() => {
+            if (this.isValid) {
+                cc.systemEvent.emit(EventName.RestoreCountDown)
+            }
+        }, this.pauseTime)
+    }
+
+    UserPropJump() {
+        LocalData.getInstance().LessNowSitDownCount()
+        console.log('执行弹射入座一次');
+
+        Down.NowJumping = true
+        // let btn = event.target as cc.Node
+        // btn.getComponent(cc.Button).interactable = false
+        BarrierDrag.PlayJump = true
+        cc.systemEvent.emit(EventName.NowSitDowninSeat)
+    }
+
+    clickTimeStopBtn(event: cc.Event.EventTouch) {
+        if (LocalData.getInstance().getTimeStopCount() > 0) {
+            let TimeStop = this.node.getChildByName("TimeStop").getComponent(cc.Button)
+            TimeStop.interactable = false
+
+            cc.systemEvent.emit(EventName.UserPropTime)
+        } else {
+            // //看广告
+            PopManger.getInstance().Pop(PopName.UserProp, { PropType: 0 })
+        }
+    }
+
+    clickNowSitDownBtn(event: cc.Event.EventTouch) {
+        if (LocalData.getInstance().getNowSitDownCount() > 0) {
+            let NowInSeat = this.node.getChildByName("NowInSeat").getComponent(cc.Button)
+            NowInSeat.interactable = false
+
+            cc.systemEvent.emit(EventName.UserPropJump)
+        } else {
+            // //看广告
+            PopManger.getInstance().Pop(PopName.UserProp, { PropType: 1 })
+        }
+    }
+
+    // update (dt) {}
+}

+ 10 - 0
assets/Script/GameUI/Down.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "9fc6389b-b088-44df-8b95-e05d90122ce9",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 84 - 0
assets/Script/GameUI/DressUp.ts

@@ -0,0 +1,84 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName from "../EventName/EventName";
+import { ButtonLock } from "../GameLogic/Sofa";
+import HTTPS, { NetGet } from "../Template/HTTPS";
+import PopComponet from "../Template/PopComponet";
+import { CollectDetailsType } from "./CollectManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class DressUp extends PopComponet {
+
+
+    @property(cc.SpriteFrame)
+    Dress_Sp: cc.SpriteFrame = null
+
+
+
+
+    @property(cc.Sprite)
+    image: cc.Sprite = null
+
+    @property(cc.Node)
+    Btn: cc.Node = null
+
+    @property(cc.Label)
+    Label: cc.Label = null
+
+
+    @property(cc.Label)
+    Name: cc.Label = null
+
+
+    protected start(): void {
+        let d = <CollectDetailsType>this.Options.Data.MyType
+
+        this.image.spriteFrame = this.Options.Data.Sp
+
+        this.Name.string = d.Name
+
+        if (d.IsHold == 1) {
+            //拥有
+            this.Btn.active = true
+
+            this.image.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.SPRITE, null))
+
+            this.Label.string = d.Description
+
+            if (d.IsWear == 0) {
+                this.Btn.getComponent(cc.Sprite).spriteFrame = this.Dress_Sp
+            }
+        } else {
+            //未拥有
+            this.Btn.active = false
+
+            this.image.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.GRAY_SPRITE, null))
+
+            this.Label.string = d.Condition
+        }
+    }
+    @ButtonLock(1, null)
+    Click() {
+        let d = <CollectDetailsType>this.Options.Data.MyType
+        if (d.IsHold == 1) {
+            HTTPS.Instance.get(NetGet.UserWearCollect + d.Id).then((resp) => {
+                cc.systemEvent.emit(EventName.CollectSelect, d.Id)
+                this.Surpclose()
+            })
+        }
+
+    }
+
+
+
+
+
+
+}

+ 10 - 0
assets/Script/GameUI/DressUp.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "48368c8a-8607-45b8-a6f2-2cf78bd9826a",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 84 - 0
assets/Script/GameUI/EmployeeReferral.ts

@@ -0,0 +1,84 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName from "../EventName/EventName";
+import Sdk from "../SDK/SDK";
+import HTTPS, { NetPost } from "../Template/HTTPS";
+import PopComponet from "../Template/PopComponet";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class EmployeeReferral extends PopComponet {
+
+
+    static RedPoint = 0
+
+    start(): void {
+
+        console.error(this.Options.Data);
+
+        this.initCount()
+    }
+
+
+    initCount() {
+        let LabelComp = this.node.getChildByName("Node").getChildByName("yanchang").getChildByName("Label").getComponent(cc.Label)
+
+        let temp = 0
+
+        if (EmployeeReferral.RedPoint >= 3) {
+            temp = 3
+            LabelComp.string = '领取奖励'
+        } else {
+            temp = EmployeeReferral.RedPoint
+            LabelComp.string = '立即邀请'
+        }
+
+        let ProgressBarComp = this.getComponentInChildren(cc.ProgressBar)
+
+        ProgressBarComp.progress = temp / 3
+
+        ProgressBarComp.getComponentInChildren(cc.Label).string = `邀请人数${temp}/3`
+
+
+        ///
+
+
+        let Label = this.node.getChildByName("Node").getChildByName("image").getChildByName("Label").getComponent(cc.Label)
+
+        // this.Options.Data.Reward  //装扮 0未获取 1已获取
+        // this.Options.Data.Reward1  //道具
+
+        console.error(this.Options.Data);
+
+
+        if (this.Options.Data.resp.Reward == 0) {
+            Label.string = `1个装扮${this.Options.Data.resp.Reward1}个游戏道具`
+        } else {
+            Label.string = `${this.Options.Data.resp.Reward1}个游戏道具`
+        }
+    }
+
+    yaoqing() {
+        if (EmployeeReferral.RedPoint >= 3) {
+            // LabelComp.string = '领取奖励'
+            HTTPS.Instance.post(NetPost.ReceiveInvitation, {}).then((resp) => {
+                if (resp.Code == 200) {
+                    //领取奖励 成功
+
+                    cc.systemEvent.emit(EventName.UpdateOnce)
+
+                    this.node.destroy()
+                }
+            })
+        } else {
+            // LabelComp.string = '立即邀请'
+            Sdk.getInstance().Share()
+        }
+    }
+}

+ 10 - 0
assets/Script/GameUI/EmployeeReferral.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "4d1f6b0e-c290-43da-a5a7-4b72377e4e7e",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 276 - 0
assets/Script/GameUI/GameLevel.ts

@@ -0,0 +1,276 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName, { ItemName, PopName, SofaColor } from "../EventName/EventName";
+import { BusNodeData, BusType, ChangeCountDown, ChangeGraySitDownColor, ChangeMapInitOver, ChangeRoloInitOver, ChangeRoloQueues, ChangetableData, ChangetableDataBusType, ChangetableDataMen, MapData, MapDataBusTypes, MapDataBusTypes_ByYinDao, MapDataCountDown, MapDataCountDown_ByYinDao, MapDataGraySitDownColor, MapDataGraySitDownColor_ByYinDao, MapDataRoloQueues, MapDataRoloQueues_ByYinDao, MapData_ByYinDao, MapInitOver, MenPos, RoloInitOver, tableData } from "../GameLogic/DataConfig";
+import HTTPS, { NetPost } from "../Template/HTTPS";
+import LocalData, { WorkState } from "../Template/LocalData";
+import MyComponent from "../Template/MyComponent";
+import PopManger, { GameOver } from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class GameLevel extends MyComponent {
+
+    //当前游戏关卡
+    static gameLevel: number = 1
+
+
+    @property(cc.SpriteFrame)
+    sp_on: cc.SpriteFrame = null
+    @property(cc.SpriteFrame)
+    sp_off: cc.SpriteFrame = null
+
+
+    protected onEnable(): void {
+        GameLevel.gameLevel = 1
+        cc.systemEvent.emit(EventName.driveBus, 0)
+    }
+
+    onLoad(): void {
+        super.onLoad();
+
+        this.regEvent(EventName.NextCoustomGame, this.NextCoustomGame, this)
+        this.regEvent(EventName.driveBusOver, this.driveBusOver, this)
+        this.regEvent(EventName.driveBusMind, this.driveBusMind, this)
+
+
+        this.setGameSlider()
+
+    }
+
+
+    //开车结束了
+    driveBusOver() {
+        //生成车门
+        cc.systemEvent.emit(EventName.BronDoor)
+    }
+
+    //开车到一半了
+    driveBusMind() {
+
+        PopManger.getInstance().Pop(PopName.CurrentLevel)
+        ChangeRoloInitOver(false)
+        ChangeMapInitOver(false)
+
+
+        //现在的关卡状态
+        let _WorkState = LocalData.getInstance().getWorkState()
+
+        switch (_WorkState) {
+            case WorkState.引导:
+                console.log('当前是引导关卡');
+                //改变地图数据
+                this.changeMap_ByYinDao()
+                break;
+            case WorkState.上班:
+                console.log('当前是上班关卡');
+                //改变地图数据
+                this.changeMap()
+                break;
+            case WorkState.加班:
+                console.log('当前是加班关卡');
+
+                GameLevel.gameLevel = 6
+
+                //改变地图数据
+                this.changeMap()
+                break;
+            default:
+                cc.error('未知状态');
+                break;
+        }
+
+        //加载人物
+        this.loadRole()
+
+        //加载车子皮肤 设置位置
+        this.loadMapBg()
+        //加载车子皮肤 设置位置
+        this.loadBus()
+        //加载地图
+        this.loadMap()
+    }
+
+
+
+    //下一关
+    NextCoustomGame() {
+        //现在的关卡状态
+        let _WorkState = LocalData.getInstance().getWorkState()
+
+        switch (_WorkState) {
+            case WorkState.引导:
+                cc.systemEvent.emit(EventName.driveBus, 1.5, false)
+
+                PopManger.getInstance().Pop(PopName.Successfully)
+
+                LocalData.getInstance().setWorkState(WorkState.上班)
+                break;
+            case WorkState.上班:
+                //关卡++
+                GameLevel.gameLevel++
+
+                if (GameLevel.gameLevel == 6) {
+                    this.GameSecceed()
+                } else {
+                    //恢复时间
+                    cc.systemEvent.emit(EventName.RestoreCountDown)
+                    //开始发车
+                    cc.systemEvent.emit(EventName.driveBus)
+                }
+                break;
+            case WorkState.加班:
+                cc.systemEvent.emit(EventName.driveBus, 1.5, false)
+                PopManger.getInstance().Pop(PopName.Successfully)
+
+
+
+
+                //发送服务器游戏成功or 失败
+                PopManger.getInstance().GameOver(GameOver.succeed)
+                break;
+            default:
+                cc.error('未知状态');
+                break;
+        }
+    }
+
+
+    GameSecceed() {
+        PopManger.getInstance().Pop(PopName.Successfully)
+
+        LocalData.getInstance().setWorkState(WorkState.加班)
+
+        //发送服务器游戏成功or 失败
+        PopManger.getInstance().GameOver(GameOver.succeed)
+        //加班
+        console.error('游戏通关了');
+        console.error('执行加班处理');
+    }
+    protected update(dt: number): void {
+
+        if (RoloInitOver && MapInitOver) {
+            ChangeRoloInitOver(false)
+            ChangeMapInitOver(false)
+
+            cc.systemEvent.emit(EventName.InitCountDown)
+            cc.systemEvent.emit(EventName.RoleStartBus)
+        }
+    }
+
+    setGameSlider() {
+        let Level_Array = this.node.getComponentsInChildren(cc.Sprite);
+        // 进度
+        for (let i = 0; i < Level_Array.length; i++) {
+            if (i < GameLevel.gameLevel) {
+                Level_Array[i].spriteFrame = this.sp_on;  // 根据游戏级别设置为开启状态
+            } else {
+                Level_Array[i].spriteFrame = this.sp_off; // 其余的设置为关闭状态
+            }
+        }
+    }
+
+
+
+    //#region 引导关卡初始化
+    changeMap_ByYinDao() {
+        //加载地图数据 在加载车子
+        ChangetableData(MapData_ByYinDao[0])
+        //加载车子类型
+        ChangetableDataBusType(MapDataBusTypes_ByYinDao[0])
+        //修改车门位置
+        ChangetableDataMen(MenPos[BusType])
+        //加载灰色座位数据
+        ChangeGraySitDownColor(MapDataGraySitDownColor_ByYinDao[0])
+        //加载乘客数据
+        ChangeRoloQueues(MapDataRoloQueues_ByYinDao[0])
+        //加载倒计时时间
+        ChangeCountDown(MapDataCountDown_ByYinDao[0])
+    }
+    //#endregion
+
+
+
+
+
+    //#region 上班关卡初始化
+    changeMap() {
+        //加载地图数据 在加载车子
+        ChangetableData(MapData[GameLevel.gameLevel - 1])
+        //加载车子类型
+        ChangetableDataBusType(MapDataBusTypes[GameLevel.gameLevel - 1])
+        //修改车门位置
+        ChangetableDataMen(MenPos[BusType])
+        //加载灰色座位数据
+        ChangeGraySitDownColor(MapDataGraySitDownColor[GameLevel.gameLevel - 1])
+        //加载乘客数据
+        ChangeRoloQueues(MapDataRoloQueues[GameLevel.gameLevel - 1])
+        //加载倒计时时间
+        ChangeCountDown(MapDataCountDown[GameLevel.gameLevel - 1])
+    }
+
+
+    //#endregion
+
+    loadRole() {
+        //初始化排队人群位置
+        cc.systemEvent.emit(EventName.initRoleQueuePos)
+
+        //生成人物
+        cc.systemEvent.emit(EventName.BronRole)
+    }
+    //加载车子皮肤
+    loadBus() {
+        //生成车子皮肤
+        cc.systemEvent.emit(EventName.BronBus)
+    }
+
+    //加载地图
+    loadMap() {
+        this.setGameSlider()
+    }
+
+    loadMapBg() {
+        let bgNode = this.node.parent.getChildByName('background')
+
+        let path = BusNodeData[BusType][LocalData.getInstance().getBusSkin() - 1].BgImage
+
+        PopManger.getInstance().LoadAssets<cc.Texture2D>(path).then((sp) => {
+            if (sp) {
+                bgNode.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(sp)
+            }
+        }).catch((error) => {
+            // 加载失败的处理
+        });
+
+        let Rail = BusNodeData[BusType][LocalData.getInstance().getBusSkin() - 1].Rail
+
+        if (Rail) {
+            for (let index = 0; index < bgNode.children.length; index++) {
+                const sub_bgNode = bgNode.children[index];
+                const element = Rail[index];
+
+                if (element) {
+                    sub_bgNode.setPosition(element[0], element[1])
+                    sub_bgNode.setScale(element[2], element[3])
+
+                    sub_bgNode.active = true
+                } else {
+                    sub_bgNode.active = false
+                }
+
+
+            }
+        } else {
+            bgNode.children.forEach(e => { e.active = false })
+        }
+
+    }
+
+}

+ 10 - 0
assets/Script/GameUI/GameLevel.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "8a31b700-95bf-485f-841e-0b3507b2723f",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 125 - 0
assets/Script/GameUI/GameOverEnd.ts

@@ -0,0 +1,125 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { PopName } from "../EventName/EventName";
+import LocalData from "../Template/LocalData";
+import PopComponet from "../Template/PopComponet";
+import GameLevel from "./GameLevel";
+import PopManger, { GameOver } from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class GameOverEnd extends PopComponet {
+
+
+    //人物预制体
+    @property(cc.Label)
+    FreeCount: cc.Label = null
+
+
+    @property(cc.Label)
+    LevelNameLabel: cc.Label = null
+
+
+
+    @property(cc.Label)
+    NextLevelNameLabel: cc.Label = null
+
+    onLoad(): void {
+        super.onLoad()
+
+    }
+
+
+    Surpclose() {
+        super.Surpclose()
+        cc.director.loadScene("Start")
+        //发送服务器游戏成功or 失败
+        PopManger.getInstance().GameOver(GameOver.fail)
+
+ 
+
+    }
+
+
+
+    setGameSlider() {
+        //应该置灰关卡
+        let totalLevel = 5
+
+        for (let index = totalLevel; index > 0; index--) {
+
+            let GrayNode = this.node.getChildByName("GameLevel").getChildByName("Level" + index.toString())
+
+            //置灰
+            if (index > (GameLevel.gameLevel)) {
+
+                GrayNode.getComponent(cc.Sprite).enabled = false
+                GrayNode.getChildByName("null").active = true
+            } else {
+                GrayNode.getComponent(cc.Sprite).enabled = true
+                GrayNode.getChildByName("null").active = false
+            }
+        }
+
+        let Label2 = this.node.getChildByName("Label1").getChildByName("Label2")
+        Label2.getComponent(cc.Label).string = (totalLevel - GameLevel.gameLevel).toString()
+    }
+
+
+
+    ClickStartBtn() {
+
+        if (LocalData.getInstance().getFreeGameCount() <= 0) {
+            PopManger.getInstance().Pop(PopName.JustAgain)
+        } else {
+            LocalData.getInstance().setFreeGameCount(LocalData.getInstance().getFreeGameCount() - 1)
+
+            //来个动画 执行预加载场景
+            PopManger.getInstance().loadScene_Game()
+        }
+    }
+
+
+
+
+    setFreeLabel() {
+        //现在免费的次数
+        let NowCout = LocalData.getInstance().getFreeGameCount()
+        //今天免费的次数
+        let TotalCout = LocalData.getInstance().FreePlayCount
+        if (NowCout > 0) {
+            this.FreeCount.string = `今日免费 ${NowCout} / ${TotalCout}`
+            this.FreeCount.enabled = true
+        } else {
+            this.FreeCount.enabled = true
+        }
+    }
+
+
+
+    setLevelName() {
+        let curr = LocalData.getInstance().getMyWorkplaceLevel_Name(LocalData.getInstance().getMyWorkplaceLevel())
+        let next = LocalData.getInstance().getMyWorkplaceLevel_Name(LocalData.getInstance().getMyWorkplaceLevel() + 1)
+
+        if (curr) {
+            this.LevelNameLabel.string = '当前职级: ' + curr
+        }
+        if (next) {
+            this.NextLevelNameLabel.string = '下一职级: ' + next
+        }
+    }
+
+    onEnable() {
+        this.setFreeLabel()
+        this.setGameSlider()
+        this.setLevelName()
+    }
+}
+
+

+ 10 - 0
assets/Script/GameUI/GameOverEnd.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "b5b717b3-90d7-4a20-8f74-d29b3628b0ae",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 32 - 0
assets/Script/GameUI/GameOverMid.ts

@@ -0,0 +1,32 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { PopName } from "../EventName/EventName";
+import PopComponet from "../Template/PopComponet";
+import PopManger from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class GameOverMid extends PopComponet {
+
+    protected start(): void {
+        // this.scheduleOnce(() => {
+        //     if (this.isValid) {
+        //         this.Surpclose()
+        //     }
+        // }, 2)
+    }
+
+    Surpclose() {
+        super.Surpclose()
+
+
+        PopManger.getInstance().Pop(PopName.GameOverEnd)
+    }
+
+}

+ 10 - 0
assets/Script/GameUI/GameOverMid.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "a4955bab-53f4-4658-8306-25e03d1a12be",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 91 - 0
assets/Script/GameUI/GamePause.ts

@@ -0,0 +1,91 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import LocalData from "../Template/LocalData";
+import PopComponet from "../Template/PopComponet";
+import AudioManager from "./AudioManager";
+import PopManger, { GameOver } from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class GamePause extends PopComponet {
+
+    @property(cc.SpriteFrame)
+    Open: cc.SpriteFrame = null
+
+    @property(cc.SpriteFrame)
+    Close: cc.SpriteFrame = null
+
+
+    @property(cc.Node)
+    Music: cc.Node = null
+    @property(cc.Node)
+    Effects: cc.Node = null
+    @property(cc.Node)
+    Shake: cc.Node = null
+
+
+    static GamePause = false
+
+    onEnable(): void {
+        this.initBtn()
+
+        GamePause.GamePause = true
+    }
+
+
+    ClickMusic() {
+        //音乐
+        LocalData.getInstance().setMusic(!LocalData.getInstance().getMusic())
+        this.initBtn()
+    }
+    ClickSoundEffects() {
+        //音效
+        LocalData.getInstance().setEffects(!LocalData.getInstance().getEffects())
+        this.initBtn()
+    }
+    ClickShake() {
+        //震动
+        LocalData.getInstance().setVibrate(!LocalData.getInstance().getVibrate())
+        this.initBtn()
+    }
+
+    initBtn() {
+        this.Music.getComponent(cc.Sprite).spriteFrame = LocalData.getInstance().getMusic() ? this.Open : this.Close
+        this.Effects.getComponent(cc.Sprite).spriteFrame = LocalData.getInstance().getEffects() ? this.Open : this.Close
+        this.Shake.getComponent(cc.Sprite).spriteFrame = LocalData.getInstance().getVibrate() ? this.Open : this.Close
+
+
+
+
+        AudioManager.instance.UpdateVolume()
+
+
+    }
+
+
+    onDisable(): void {
+        GamePause.GamePause = false
+    }
+
+
+
+    //继续游戏
+    GameContinue() {
+        this.Surpclose()
+    }
+
+    //放弃认输
+    GiveUp() {
+        this.Surpclose()
+        cc.director.loadScene("Start")
+
+        //发送服务器游戏成功or 失败
+        PopManger.getInstance().GameOver(GameOver.fail)
+    }
+}

+ 10 - 0
assets/Script/GameUI/GamePause.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "8da8264d-cb09-4944-8be6-26ef0b8cffe6",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 216 - 0
assets/Script/GameUI/GameTime.ts

@@ -0,0 +1,216 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName, { PopName } from "../EventName/EventName";
+import { GlobalCountDownTime } from "../GameLogic/DataConfig";
+import MyComponent from "../Template/MyComponent";
+import GameLevel from "./GameLevel";
+import GamePause from "./GamePause";
+import HonorManger from "./HonorManger";
+import PopManger from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class GameTime extends MyComponent {
+
+
+    //人物预制体
+    @property(cc.Label)
+    countdown: cc.Label = null
+
+
+    @property(cc.Sprite)
+    sp_progress: cc.Sprite = null
+
+
+    //当前死亡次数
+    CurrentDieCount = 0
+
+    onLoad(): void {
+        super.onLoad();
+
+        this.CurrentDieCount = 0
+
+        this.regEvent(EventName.InitCountDown, this.InitCountDown, this)
+        this.regEvent(EventName.StartCountDown, this.StartCountDown, this)
+        this.regEvent(EventName.PauseCountDown, this.PauseCountDown, this)
+        this.regEvent(EventName.RestoreCountDown, this.RestoreCountDown, this)
+        this.regEvent(EventName.ADDCountDown, this.ADDCountDown, this)
+        this.regEvent(EventName.RestartCurrentLevel, this.RestartCurrentLevel, this)
+
+
+
+        this.regEvent(EventName.GameOver, this.GameOver, this)
+
+        this.regEvent(EventName.NextCoustomGame, this.NextCoustomGame, this)
+        this.regEvent(EventName.NextCoustomGameStop, this.NextCoustomGameStop, this)
+    }
+
+
+    ADDCountDown() {
+        this.CountDownTime = 20
+        //恢复暂停
+        GamePause.GamePause = false
+    }
+
+    RestartCurrentLevel() {
+        //恢复暂停
+        GamePause.GamePause = false
+    }
+
+    NextCoustomGameStop() {
+        this.unschedule(this.updateCountdown);
+    }
+    InitCountDown() {
+        this.CountDownTime = GlobalCountDownTime
+        this.sp_progress.fillRange = -1 * (this.CountDownTime / GlobalCountDownTime)
+        this.setTime()
+        this.begin = true
+    }
+
+    begin = false
+
+    StartCountDown() {
+        if (this.begin == true) {
+            this.begin = false
+            ///
+            this.CountDownTime = GlobalCountDownTime
+            this.schedule(this.updateCountdown, 1, cc.macro.REPEAT_FOREVER, 0.01);
+            this.Shake()
+            if (GameLevel.gameLevel > 1) {
+                // // 暂时先关闭
+                // this.timeShow = 2
+            }
+        }
+
+    }
+
+    PauseCountDown() {
+        this.PauseTime = true
+        this.updateCountdown()
+    }
+
+    RestoreCountDown() {
+        this.PauseTime = false
+    }
+    NextCoustomGame() {
+
+        HonorManger.getInstance().Game602()
+        HonorManger.getInstance().Game604()
+        // HonorManger.getInstance().Game605()
+
+
+        this.unschedule(this.updateCountdown);
+        //恢复
+        this.RestoreCountDown()
+    }
+    GameOver() {
+        HonorManger.getInstance().Game603()
+        this.unschedule(this.updateCountdown);
+        //恢复
+        this.RestoreCountDown()
+    }
+
+
+    //展示几秒闯关时间已重置
+    timeShow = -1;
+
+    //更新截止时间
+    CountDownTime: number = 30
+    //是否暂停
+    PauseTime: boolean = false
+
+
+
+    setTime() {
+        const minutes = Math.floor(this.CountDownTime / 60);
+        const remainingSeconds = this.CountDownTime % 60;
+        this.countdown.string = `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
+
+    }
+
+    private updateCountdown() {
+        if (GamePause.GamePause == true) {
+            return
+        }
+
+
+        this.setTime()
+        HonorManger.getInstance().remainder = this.CountDownTime
+        HonorManger.getInstance().ElapsedTime = GlobalCountDownTime - this.CountDownTime
+
+        if (!this.PauseTime) {
+
+            if (this.CountDownTime > 0) {
+                let Step = 0
+                this.schedule(() => {
+                    Step = Step + 0.2
+                    this.sp_progress.fillRange = -1 * ((this.CountDownTime + 1 - Step) / GlobalCountDownTime)
+                }, 0.2, 4, 0.1)//3
+            }
+
+            // this.sp_progress.fillRange = -1 * (this.CountDownTime / GlobalCountDownTime)
+            this.CountDownTime--
+
+        }
+
+        if (this.CountDownTime < 0) {
+            this.countdown.string = "00:00";
+
+            //先暂停
+            GamePause.GamePause = true
+
+            switch (this.CurrentDieCount++) {
+                case 0:
+                    //推送延迟20s
+                    PopManger.getInstance().Pop(PopName.TimeOver_1)
+                    break;
+                case 1:
+                    //再次挑战本关卡
+                    PopManger.getInstance().Pop(PopName.TimeOver_2)
+                    break;
+                default:
+                    cc.systemEvent.emit(EventName.GameOver)
+                    PopManger.getInstance().Pop(PopName.GameOverMid)
+                    break;
+            }
+        }
+
+        if (this.CountDownTime == 20) {
+            this.Shake()
+        }
+        if (this.timeShow >= 0) {
+            this.timeShow--
+            this.countdown.string = '已重置'
+        }
+    }
+
+
+
+    Shake() {
+        let x = this.node.x;
+        let y = this.node.y;
+
+        let action = cc.repeatForever(
+            cc.sequence(
+                cc.scaleTo(0.018, 1.05, 1.05),
+                cc.scaleTo(0.018, 1.08, 1.08),
+                cc.scaleTo(0.018, 1.1, 1.1),
+                cc.scaleTo(0.018, 1.08, 1.08),
+                cc.scaleTo(0.018, 1.05, 1.05),
+                cc.scaleTo(0.018, 1, 1),
+            )
+        )
+        this.node.runAction(action);
+
+        this.scheduleOnce(() => {
+            this.node.stopAction(action);
+            this.node.x = x; this.node.y = y;
+        }, 1)
+    }
+}

+ 10 - 0
assets/Script/GameUI/GameTime.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "e4330c2c-78e0-4832-9e57-536c2876ae5b",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 44 - 0
assets/Script/GameUI/GameUI.ts

@@ -0,0 +1,44 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName, { PopName } from "../EventName/EventName";
+import MyComponent from "../Template/MyComponent";
+import GamePause from "./GamePause";
+import PopManger from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class GameUI extends MyComponent {
+
+    onLoad(): void {
+        super.onLoad();
+        GamePause.GamePause = false
+
+
+
+        this.regEvent(EventName.PauseCountDown, () => {
+            this.node.getChildByName("bing").active = true
+
+        }, this)
+        this.regEvent(EventName.RestoreCountDown, () => {
+            this.node.getChildByName("bing").active = false
+        }, this)
+
+
+    }
+
+
+    Clickset() {
+        //set
+        PopManger.getInstance().Pop(PopName.Seting)
+    }
+    Clickpause() {
+        //pause
+        PopManger.getInstance().Pop(PopName.GamePause)
+    }
+}

+ 10 - 0
assets/Script/GameUI/GameUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "6bb5d231-fefc-465e-a40e-6c3bd0179083",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 70 - 0
assets/Script/GameUI/Guide.ts

@@ -0,0 +1,70 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { PopName } from "../EventName/EventName";
+import { leftButtomStatPos, tableData, tiledSize } from "../GameLogic/DataConfig";
+import PopComponet from "../Template/PopComponet";
+import PopManger from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Guide extends cc.Component {
+
+
+
+    @property(cc.Node)
+    barrierLayer: cc.Node = null
+
+
+    @property(cc.SpriteFrame)
+    sp: cc.SpriteFrame[] = []
+
+    //播放引导动画
+    playAni(bron: { x, y }, target: { x, y }) {
+        let GuideHand = this.node.getChildByName("GuideHand")
+
+
+        let bronNodePos = this.getTargetPosInMap(cc.v2(bron.x, bron.y))
+        let targetNodePos = this.getTargetPosInMap(cc.v2(target.x, target.y))
+
+
+        let bronWordPos = this.barrierLayer.convertToWorldSpaceAR(bronNodePos)
+        let targetWordPos = this.barrierLayer.convertToWorldSpaceAR(targetNodePos)
+
+
+
+        let bronPos = this.node.convertToNodeSpaceAR(bronWordPos)
+        let targetPos = this.node.convertToNodeSpaceAR(targetWordPos)
+
+
+        GuideHand.getComponent(cc.Sprite).spriteFrame = this.sp[0]
+        cc.tween(GuideHand)
+            .to(0, { position: cc.v3(bronPos.x, bronPos.y) })
+            .to(0, { opacity: 255 })
+            .delay(0.4)
+            .call(() => { GuideHand.getComponent(cc.Sprite).spriteFrame = this.sp[1] })
+ 
+            .delay(0.2)
+
+            .to(1, { position: cc.v3(targetPos.x, targetPos.y) }, { easing: 'quadOut' })
+
+            .call(() => { GuideHand.getComponent(cc.Sprite).spriteFrame = this.sp[0] })
+            .delay(0.4)
+
+            .to(0, { opacity: 0 })
+            .start()
+
+
+    }
+
+
+    getTargetPosInMap(MapPos: cc.Vec2) {
+        return cc.v3(leftButtomStatPos.x + MapPos.x * tiledSize.width + tiledSize.width / 2, leftButtomStatPos.y + MapPos.y * tiledSize.height + tiledSize.height / 2)
+    }
+
+}

+ 10 - 0
assets/Script/GameUI/Guide.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "d6699515-9079-462d-b31e-7417621353dc",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 156 - 0
assets/Script/GameUI/HallScrollView.ts

@@ -0,0 +1,156 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import EventName from "../EventName/EventName";
+import HTTPS, { NetPost } from "../Template/HTTPS";
+import LocalData from "../Template/LocalData";
+import MyComponent from "../Template/MyComponent";
+import PopManger from "./PopManger";
+
+interface ResponseData {
+    Version: string;
+    Code: number;
+    Message: string;
+    Data: RoleData[];
+    DataCount: number;
+    PageCount: number;
+    Mac: string;
+    Timestamp: string;
+}
+
+interface RoleData {
+    Id: number;
+    Name: string;
+    TotalNumber: number;
+    List: UserData[];
+}
+
+interface UserData {
+    UserId: number;
+    Picture: string | null; // 可能是 null
+    CollectId: number;
+    CollectPicture: string;
+    FullBodyPhoto: string;
+}
+
+
+
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class HallScrollView extends MyComponent {
+
+
+
+    @property(cc.Node)
+    content: cc.Node = null
+
+
+    MyScrollView: cc.ScrollView = null
+
+
+    onLoad() {
+        super.onLoad();
+        this.MyScrollView = this.node.getComponent(cc.ScrollView)
+
+        this.regEvent(EventName.WhereMy, this.WhereMy, this)
+
+
+        // this.content.children.forEach((e, index) => {
+        //     e.children.forEach((e1) => {
+        //         console.error(index);
+
+        //         if (index == 13) {
+
+        //         } else {
+        //             this.ddddd(e1)
+        //         }
+        //     })
+        // })
+    }
+
+
+    start() {
+        this.req()
+    }
+
+
+    Retrycount = 5
+
+    req() {
+        HTTPS.Instance.post(NetPost.GetPositionLevelRanking,
+            {}).then((resp: ResponseData) => {
+
+                for (let index = 0; index < resp.Data.length; index++) {
+                    const Data = resp.Data[index];
+                    const Node = this.content.children[index];
+
+                    for (let k = 0; k < Node.children.length; k++) {
+                        const RoleNode = Node.children[k];
+                        const RoleInfo = Data.List[k];
+
+                        if (RoleInfo) {
+
+                            // CollectPicture  半身
+                            // FullBodyPhoto    全身
+                            cc.assetManager.loadRemote(RoleInfo.FullBodyPhoto, (err, res: cc.Texture2D) => {
+                                if (!err) {
+                                    RoleNode.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(res);
+                                    RoleNode.active = true
+                                }
+                            })
+                        } else {
+                            RoleNode.active = false
+                        }
+                    }
+                }
+            })
+            .catch((error) => {
+                console.error('error');
+                console.error(error);
+                if (this.Retrycount-- > 0) {
+                    this.req()
+                }
+            })
+    }
+
+    WhereMy() {
+        this.MyScrollView.stopAutoScroll()
+
+        let contentNode = this.node.getChildByName("view").getChildByName("content")
+
+        contentNode.height
+
+
+        let index = LocalData.getInstance().getMyWorkplaceLevel()
+
+
+        const y = contentNode.getChildByName(index + '').getPosition().y
+
+        this.MyScrollView.scrollToOffset(cc.v2(0, Math.abs(y)), 0.3)
+    }
+
+    // ddddd(node: cc.Node) {
+    //     let path = 'Texture/Start/Desk/1/CEO' + this.getRandomNumber(1, 28)
+
+    //     PopManger.getInstance().LoadAssets<cc.Texture2D>(path).then((sp) => {
+    //         if (sp) {
+    //             node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(sp)
+    //         }
+    //     }).catch((error) => {
+    //         // 加载失败的处理
+    //     });
+    // }
+
+    // getRandomNumber(min: number, max: number): number {
+    //     return Math.floor(Math.random() * (max - min + 1)) + min;
+    // }
+
+
+    // update (dt) {}
+}

+ 10 - 0
assets/Script/GameUI/HallScrollView.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "403d5a71-8d7e-4bfd-ad90-7758e9cc9c9b",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 402 - 0
assets/Script/GameUI/HonorManger.ts

@@ -0,0 +1,402 @@
+import HTTPS, { NetGet, NetPost } from "../Template/HTTPS";
+import LocalData, { WorkState } from "../Template/LocalData";
+import Guide from "./Guide";
+
+export type HonorWallDetailsType = {
+    Id: number;
+    Name: string;
+    Picture?: string;
+    Description?: string;
+    IsWear?: number; // 0 表示未穿戴,1 表示穿戴
+    IsHold?: number; // 0 表示未拥有,1 表示拥有
+}
+
+export type CheckSeatType = {
+    uuid?: string,//移动座位节点的UUID
+    MoveSeatTime?: number,//移动座位的单个耗时 毫秒
+    BronPos?: cc.Vec2,//座位出生时候的位置
+    NowPos?: cc.Vec2,//现在座位的位置
+}
+
+
+//荣誉管理器
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class HonorManger {
+    private static instance: HonorManger;
+    public static getInstance(): HonorManger {
+        if (!HonorManger.instance) {
+            HonorManger.instance = new HonorManger();
+        }
+        return HonorManger.instance;
+    }
+
+    HonorWallDetails_Shangban: HonorWallDetailsType[] = [
+        // {
+        //     Id: 1,
+        //     Name: '全勤员工',
+        //     Description: '连续一周每天都过关',
+        // },
+        // {
+        //     Id: 2,
+        //     Name: '搞小团体',
+        //     Description: '邀请满3人加入上班游戏',
+        // },
+        // {
+        //     Id: 3,
+        //     Name: '最佳新人',
+        //     Description: '第一次成功过关',
+        // },
+        // {
+        //     Id: 4,
+        //     Name: '带资进组',
+        //     Description: '全部道具用完才上班成功',
+        // },
+        // {
+        //     Id: 5,
+        //     Name: '福布斯top 30',
+        //     Description: '连续14天挑战成功',
+        // },
+        // {
+        //     Id: 6,
+        //     Name: '卷王',
+        //     Description: '连续3天偷偷加班',
+        // },
+        // {
+        //     Id: 7,
+        //     Name: '强东的兄弟',
+        //     Description: '连续7天偷偷加班',
+        // },
+    ]
+
+    HonorWallDetails_ChiDao: HonorWallDetailsType[] = [
+        // {
+        //     Id: 301,
+        //     Name: '老油条',
+        //     Description: '连续1天每天都迟到',
+        // },
+        // {
+        //     Id: 302,
+        //     Name: '摸鱼高手',
+        //     Description: '连续3天每天都迟到',
+        // },
+        // {
+        //     Id: 303,
+        //     Name: '永远在路上',
+        //     Description: '连续7天每天都迟到',
+        // },
+        // {
+        //     Id: 304,
+        //     Name: '司机等等我',
+        //     Description: '累计旷工1天',
+        // },
+        // {
+        //     Id: 305,
+        //     Name: '病假王',
+        //     Description: '累计旷工3天',
+        // },
+        // {
+        //     Id: 306,
+        //     Name: '公司蛀虫',
+        //     Description: '累计旷工7天',
+        // },
+        // {
+        //     Id: 307,
+        //     Name: '混吃等死',
+        //     Description: '累计旷工14天',
+        // },
+    ]
+
+    HonorWallDetails_Qita: HonorWallDetailsType[] = [
+        // {
+        //     Id: 601,
+        //     Name: '金手指',
+        //     Description: '1秒内移动3个座位',
+        // },
+        // {
+        //     Id: 602,
+        //     Name: '差点被门夹住',
+        //     Description: '最后1秒内通过成功',
+        // },
+        // {
+        //     Id: 603,
+        //     Name: '痛苦追车人',
+        //     Description: '最后一个人没登上车导致通关失败',
+        // },
+        // {
+        //     Id: 604,
+        //     Name: '上班最速传说',
+        //     Description: '开局5秒内成功通关',
+        // },
+        // {
+        //     Id: 605,
+        //     Name: '游艇趴DJ',
+        //     Description: '首次通过游艇关卡',
+        // },
+    ]
+    // 需要的数据    
+    //1  结束剩余的时间  
+    //2  结束剩余的乘客  
+    //3  当前通关的关卡类型  
+
+    //当前选择的荣誉
+    private _SelectHonorM: number = 0;
+    public get SelectHonorM(): number {
+        return this._SelectHonorM;
+    }
+    public set SelectHonorM(value: number) {
+        this._SelectHonorM = value;
+    }
+
+    //已有的荣誉数组
+    private _HonorMList: number[] = [];
+    public get HonorMList(): number[] {
+        return this._HonorMList;
+    }
+    public set HonorMList(value: number) {
+        if (!this._HonorMList.includes(value)) {
+            this._HonorMList.push(value)
+        }
+        console.log('当前拥有的勋章数组为', this.HonorMList);
+        console.log('当前应该检测的ID数组为', this.GameCheckID);
+    }
+
+    init(d: ResponseData) {
+        //初始化
+        HonorManger.getInstance().HonorWallDetails_Shangban = d.Data.List1
+        HonorManger.getInstance().HonorWallDetails_ChiDao = d.Data.List2
+        HonorManger.getInstance().HonorWallDetails_Qita = d.Data.List3
+        //设置已经拥有的荣誉数组
+        let All = [
+            ...HonorManger.getInstance().HonorWallDetails_Shangban,
+            ...HonorManger.getInstance().HonorWallDetails_ChiDao,
+            ...HonorManger.getInstance().HonorWallDetails_Qita];
+        let temp = All.filter(e => { return e.IsHold == 1 })
+        temp.forEach(e => { this.HonorMList = e.Id })
+        //设置当前选择的荣誉
+        this.SelectHonorM = d?.Data?.UserHonor?.Id
+    }
+
+    //游戏内最近移动的座位数据
+    private SeatMoveList: CheckSeatType[] = [];// uuid    time  对象
+    UpSeatMove(temp: CheckSeatType) {
+        //601
+        this.SeatMoveList.push(temp)
+        if (this.SeatMoveList.length > 10) {
+            this.SeatMoveList.shift();
+        }
+    }
+
+
+    //游戏内已用时间
+    ElapsedTime: number = 0;
+    //游戏内剩余时间
+    remainder: number = -1;
+    //游戏内剩余乘客
+    remainingpassengers: number = -1;
+
+    //游戏内需要检测的ID
+    GameCheckID: number[] = []
+
+
+
+    intervalId: number = 0
+    GameInit() {
+        this.GameCheckID = []
+        for (let i = 0; i < this.HonorWallDetails_Qita.length; i++) {
+            const element = this.HonorWallDetails_Qita[i];
+            if (!this.HonorMList.includes(element.Id)) {
+                this.GameCheckID.push(element.Id)
+            }
+        }
+        console.log('当前拥有的勋章数组为', this.HonorMList);
+        console.log('当前应该检测的ID数组为', this.GameCheckID);
+    }
+
+    //
+
+    Game601() {
+        if (LocalData.getInstance().getWorkState() == WorkState.引导) {
+            return
+        }
+
+
+        if (!this.GameCheckID.includes(601)) {
+            return
+        }
+
+        let adjacentTriplets = this.getAdjacentTriplets(this.SeatMoveList);
+        if (!adjacentTriplets) {
+            return
+        }
+        for (let index = 0; index < adjacentTriplets.length; index++) {
+            const element = adjacentTriplets[index];
+            if (element[0].uuid !== element[1].uuid && element[1].uuid !== element[2].uuid) {
+                let total = element[0].MoveSeatTime + element[1].MoveSeatTime + element[2].MoveSeatTime
+
+                if (total <= 1000) {
+                    console.log('三个最短耗时', total);
+                    this.GameCheckID = this.GameCheckID.filter(item => item !== 601);
+
+                    this.HonorMList = 601
+                    //发送完成勋章
+                    this.SendCompleteHonor(601)
+                    return
+                }
+            }
+        }
+
+    }
+
+    Game602() {
+        if (LocalData.getInstance().getWorkState() == WorkState.引导) {
+            return
+        }
+        if (!this.GameCheckID.includes(602)) {
+            return
+        }
+        if (this.remainingpassengers == 0 && this.remainder == 1) {
+            console.log('差点被门夹住-最后1秒内通过成功');
+            this.GameCheckID = this.GameCheckID.filter(item => item !== 602);
+            this.HonorMList = 602
+            //发送完成勋章
+            this.SendCompleteHonor(602)
+        }
+    }
+
+    Game603() {
+        if (LocalData.getInstance().getWorkState() == WorkState.引导) {
+            return
+        }
+        if (!this.GameCheckID.includes(603)) {
+            return
+        }
+
+        if (this.remainingpassengers == 1 && this.remainder == 0) {
+            console.log('痛苦追车人-最后一个人没登上车导致通关失败');
+            this.GameCheckID = this.GameCheckID.filter(item => item !== 603);
+            this.HonorMList = 603
+            //发送完成勋章
+            this.SendCompleteHonor(603)
+        }
+    }
+
+    Game604() {
+        if (LocalData.getInstance().getWorkState() == WorkState.引导) {
+            return
+        }
+        if (!this.GameCheckID.includes(604)) {
+            return
+        }
+        if (this.ElapsedTime != 0 && this.ElapsedTime <= 5) {
+            console.log('上班最速传说-开局5秒内成功通关', this.ElapsedTime);
+            this.GameCheckID = this.GameCheckID.filter(item => item !== 604);
+            this.HonorMList = 604
+            //发送完成勋章
+            this.SendCompleteHonor(604)
+        }
+    }
+
+
+
+    //发送完成勋章
+    SendCompleteHonor(ID: number) {
+        HTTPS.Instance.post(NetPost.AddToBenotified, {
+            "State": 1,
+            "Type": 2,
+            "Id": ID
+        }).then((resp) => {
+            // 初始化地图数据
+
+        })
+    }
+
+
+
+    //#region 引导关卡
+
+    GuideStep = 0
+    GuideData = [{
+        bronPos: { x: 3, y: 6 },
+        NowPos: { x: 0, y: 6 }
+    }, {
+        bronPos: { x: 0, y: 5 },
+        NowPos: { x: 3, y: 5 }
+    }, {
+        bronPos: { x: 1, y: 0 },
+        NowPos: { x: 0, y: 2 }
+    }, {
+        bronPos: { x: 2, y: 0 },
+        NowPos: { x: 0, y: 0 }
+    },]
+
+
+    Guide1() {
+        if (LocalData.getInstance().getWorkState() === WorkState.引导) {
+            if (this.GuideStep > this.GuideData.length - 1) {
+                //引导完毕
+                return
+            }
+
+
+
+            for (let index = 0; index < this.SeatMoveList.length; index++) {
+                const element = this.SeatMoveList[index];
+                if (element.BronPos.x == this.GuideData[this.GuideStep].bronPos.x && element.BronPos.y == this.GuideData[this.GuideStep].bronPos.y &&
+                    element.NowPos.x == this.GuideData[this.GuideStep].NowPos.x && element.NowPos.y == this.GuideData[this.GuideStep].NowPos.y
+                ) {
+                    this.GuideStep++
+                    return
+                }
+            }
+
+            //手指出现
+            let GuideComp = cc.Canvas.instance.node.getChildByName("Guide").getComponent(Guide)
+            GuideComp.playAni(this.GuideData[this.GuideStep].bronPos, this.GuideData[this.GuideStep].NowPos)
+            // console.log(this.SeatMoveList);
+        }
+    }
+
+    //#endregion
+
+
+    //数组取全部相邻的三个数
+    getAdjacentTriplets<T>(arr: T[]): T[][] {
+        const result: T[][] = [];
+        if (arr.length < 3) {
+            return null;
+        }
+        for (let i = 0; i < arr.length - 2; i++) {
+            result.push([arr[i], arr[i + 1], arr[i + 2]]);
+        }
+        return result;
+    }
+}
+
+
+
+interface ResponseData {
+    Version: string;
+    Code: number;
+    Message: string;
+    Data: {
+        List1: HonorItem[];
+        List2: HonorItem[];
+        List3: HonorItem[];
+        UserHonor: HonorItem; // 'UserHonor' 的具体类型不明确,暂时用 any
+    };
+    DataCount: number;
+    PageCount: number;
+    Mac: string;
+    Timestamp: string;
+}
+
+interface HonorItem {
+    Id: number;
+    Name: string;
+    Picture: string;
+    Description: string;
+    IsWear: number; // 0 表示未穿戴,1 表示穿戴
+    IsHold: number; // 0 表示未保持,1 表示保持
+}

+ 10 - 0
assets/Script/GameUI/HonorManger.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "098c5252-ca83-4e0f-b715-5c9a19a747ee",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 137 - 0
assets/Script/GameUI/HonorWall.ts

@@ -0,0 +1,137 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { ItemName, PopName } from "../EventName/EventName";
+import HTTPS, { NetGet } from "../Template/HTTPS";
+import PopComponet from "../Template/PopComponet";
+import HonorManger, { HonorWallDetailsType } from "./HonorManger";
+import HonorWallitem from "./HonorWallitem";
+import PopManger from "./PopManger";
+import Privacy from "./Privacy";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class HonorWall extends PopComponet {
+
+    @property(cc.Node)
+    Itemparent: cc.Node = null
+
+    @property(cc.Label)
+    progressLabel: cc.Label = null
+
+
+
+
+    onLoad() {
+        this.node.on('ClickItem', this.ClickItem, this)
+    }
+    onDestroy(): void {
+        this.node.off('ClickItem', this.ClickItem, this)
+    }
+
+
+    ClickItem(event) {
+        // 处理事件
+        let data = event.getUserData(); // 获取自定义数据
+        let Title = this.node.getChildByName("Title")
+        let Bg = Title.getChildByName("Bg")
+        let Sp = Title.getChildByName("Sp")
+        let Name = Title.getChildByName("Name")
+        let Detail = Title.getChildByName("Detail")
+
+        Bg.active = true
+        Sp.active = true
+        Name.active = true
+        Detail.active = true;
+
+        Name.getComponent(cc.Label).string = (<HonorWallDetailsType>data.MyType).Name
+        Detail.getComponent(cc.Label).string = (<HonorWallDetailsType>data.MyType).Description
+        Sp.getComponent(cc.Sprite).spriteFrame = (<cc.Sprite>data.sp).spriteFrame
+
+        if ((<boolean>data.Gray)) {
+            // @ts-ignore 
+            Sp.getComponent(cc.Sprite).setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.GRAY_SPRITE, null))
+            Bg.getComponent(cc.Sprite).setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.GRAY_SPRITE, null))
+        } else {
+            // @ts-ignore 
+            Sp.getComponent(cc.Sprite).setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.SPRITE, null))
+            Bg.getComponent(cc.Sprite).setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.SPRITE, null))
+        }
+
+
+    }
+
+
+    start() {
+        this.init()
+    }
+
+    init() {
+
+
+        this.initDisPlay()
+        this.initIconItem()
+    }
+
+    initDisPlay() {
+        let HonorDataAll = [
+            ...HonorManger.getInstance().HonorWallDetails_Shangban,
+            ...HonorManger.getInstance().HonorWallDetails_ChiDao,
+            ...HonorManger.getInstance().HonorWallDetails_Qita];
+
+        let d = HonorDataAll.filter(e => { return HonorManger.getInstance().SelectHonorM == e.Id })
+        let Title = this.node.getChildByName("Title")
+        let Bg = Title.getChildByName("Bg")
+        let Sp = Title.getChildByName("Sp")
+        let Name = Title.getChildByName("Name")
+        let Detail = Title.getChildByName("Detail")
+
+        //如果有值
+        if (HonorManger.getInstance().SelectHonorM > 0) {
+            Bg.active = true
+            Sp.active = true
+            Name.active = true
+            Detail.active = true
+
+            Name.getComponent(cc.Label).string = d[0].Name
+            Detail.getComponent(cc.Label).string = d[0].Description
+        } else {
+            Bg.active = false
+            Sp.active = false
+            Name.active = false
+            Detail.active = false
+        }
+    }
+
+
+    initIconItem() {
+        let HonorDataAll = [
+            ...HonorManger.getInstance().HonorWallDetails_Shangban,
+            ...HonorManger.getInstance().HonorWallDetails_ChiDao,
+            ...HonorManger.getInstance().HonorWallDetails_Qita];
+
+        this.progressLabel.string = `已获得 ${HonorManger.getInstance().HonorMList.length}/${HonorDataAll.length}`;
+
+        for (let j = 0; j < HonorDataAll.length; j++) {
+            const element = HonorDataAll[j];
+
+            PopManger.getInstance().LoadAssets<cc.Prefab>(ItemName.HonorItem).then((Prefab) => {
+                let subPrefab = cc.instantiate(Prefab)
+                subPrefab.getComponent(HonorWallitem).MyType = element
+                subPrefab.parent = this.Itemparent
+            }).catch((error) => {
+                // 加载失败的处理
+            });
+        }
+    }
+
+
+    ClickDelete() {
+        this.node.destroy()
+    }
+}

+ 10 - 0
assets/Script/GameUI/HonorWall.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "e3ccf5ad-bc1d-4ae4-80a0-fe7ac14aed50",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 101 - 0
assets/Script/GameUI/HonorWallitem.ts

@@ -0,0 +1,101 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { ButtonLock } from "../GameLogic/Sofa";
+import HTTPS, { NetGet } from "../Template/HTTPS";
+import HonorManger, { HonorWallDetailsType } from "./HonorManger";
+
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class HonorWallitem extends cc.Component {
+
+
+
+    MyType: HonorWallDetailsType = null;
+
+
+    sp: cc.Node = null;
+    select: cc.Node = null;
+    labelNode: cc.Node = null;
+
+    isGray = false;
+
+    onLoad(): void {
+        this.sp = this.node.getChildByName("sp")
+        this.select = this.node.getChildByName("select")
+        this.labelNode = this.node.getChildByName("Label")
+    }
+
+    start(): void {
+        let t = this.sp.getComponent(cc.Sprite)
+        let t1 = this.select.getComponent(cc.Sprite)
+        // 成功加载后的处理
+        cc.assetManager.loadRemote(this.MyType.Picture, (err, res: cc.Texture2D) => {
+            if (!err) {
+                t.spriteFrame = new cc.SpriteFrame(res);
+                if (HonorManger.getInstance().HonorMList.includes(this.MyType.Id)) {
+                    // @ts-ignore 
+                    t.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.SPRITE, null))
+                    // @ts-ignore 
+                    t1.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.SPRITE, null))
+
+                    this.isGray = false
+                } else {
+                    // @ts-ignore 
+                    t.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.GRAY_SPRITE, null))
+                    // @ts-ignore 
+                    t1.setMaterial(0, cc.MaterialVariant.createWithBuiltin(cc.Material.BUILTIN_NAME.GRAY_SPRITE, null))
+
+                    this.isGray = true
+                }
+
+
+                let spLabel = this.labelNode.getComponent(cc.Label)
+                spLabel.string = this.MyType.Name
+
+
+                if (this.MyType.IsWear == 1) {
+                    this.ClickMe()
+                }
+            }
+        })
+    }
+
+
+    @ButtonLock(0.1, null)
+    ClickMe() {
+        //hide all
+        this.node.parent.children.forEach(e => {
+            e.getChildByName('select').active = false
+        })
+
+        //show
+        this.select.active = true
+
+        //show
+        // 创建一个自定义事件
+        let event = new cc.Event.EventCustom('ClickItem', true); // true 表示事件可冒泡
+        event.setUserData({
+            MyType: this.MyType,
+            Gray: this.isGray,
+            sp: this.sp.getComponent(cc.Sprite)
+        }); // 传递自定义数据
+        this.node.dispatchEvent(event); // 派发事件
+
+        if (this.MyType.IsHold == 1) {
+            HTTPS.Instance.get(NetGet.UserWearHonor + this.MyType.Id).then((resp) => {
+  
+            })
+        }
+
+    }
+
+
+
+}

+ 10 - 0
assets/Script/GameUI/HonorWallitem.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "5b96e99b-567f-412b-829c-eaabe0350879",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 108 - 0
assets/Script/GameUI/IDcard.ts

@@ -0,0 +1,108 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { PopName } from "../EventName/EventName";
+import Sdk from "../SDK/SDK";
+import HTTPS, { NetPost } from "../Template/HTTPS";
+import PopComponet from "../Template/PopComponet";
+import CollectManger from "./CollectManger";
+import PopManger from "./PopManger";
+
+
+export enum IDcardType {
+    My = 0,
+    Firend = 1,
+}
+
+
+interface UserData {
+    Name: string | null;
+    Tel: string | null;
+    Picture: string | null;
+    CollectId: number;
+    Collect: string;
+    PositionLevelId: number;
+    PositionLevelName: string;
+    Area: string | null;
+    Day: number;
+}
+
+
+
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class IDcard extends PopComponet {
+
+
+
+    TitleArray = ['我的工卡', '大鹅公司']
+    @property(cc.Label)
+    Title: cc.Label = null
+
+    @property(cc.Sprite)
+    image: cc.Sprite = null
+
+    @property(cc.Label)
+    name1: cc.Label = null
+
+    @property(cc.Label)
+    level: cc.Label = null
+
+    @property(cc.Label)
+    succeedWork: cc.Label = null
+
+    start(): void {
+        let res = <UserData>this.Options.Data.resp
+
+        //title
+        this.Title.string = this.TitleArray[this.Options.Data.IDcardType]
+
+
+        let UserINfo = this.node.getChildByName("Node").getChildByName("UserINfo")
+
+
+
+
+        if (res.Name || res.Picture) {
+            //授权了
+            this.name1.string = res.Name
+            UserINfo.active = false
+        } else {
+            UserINfo.active = true
+            //没授权
+            this.name1.string = '待授权'
+        }
+
+
+        this.level.string = res.PositionLevelName
+
+
+        this.succeedWork.string = `累计成功上班 ${res.Day}次`
+
+        if (res.Collect) {
+            cc.assetManager.loadRemote(res.Collect, (err, res: cc.Texture2D) => {
+                if (!err) {
+                    this.image.spriteFrame = new cc.SpriteFrame(res)
+                }
+            })
+        }
+    }
+
+    click() {
+        HTTPS.Instance.post(NetPost.GetUserCollectList, {}).then((resp) => {
+            CollectManger.getInstance().init(resp)
+            PopManger.getInstance().Pop(PopName.Collect)
+        })
+    }
+
+    shouquan() {
+        Sdk.getInstance().ShouQuan()
+    }
+
+}

+ 10 - 0
assets/Script/GameUI/IDcard.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "5204ccf2-3810-417c-bec4-05e299f683d8",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 30 - 0
assets/Script/GameUI/JustAgain.ts

@@ -0,0 +1,30 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import { PopName } from "../EventName/EventName";
+import PopComponet from "../Template/PopComponet";
+import PopManger from "./PopManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class JustAgain extends PopComponet {
+    NoThanks() {
+        this.Surpclose()
+    }
+
+
+    GetProp() {
+        //来个动画 执行预加载场景
+        if (cc.director.getScene().name == 'Game') {
+            PopManger.getInstance().loadScene_Game()
+        } else {
+            PopManger.getInstance().Pop(PopName.StartAnim, { animation: false })
+        }
+
+    }
+}

+ 10 - 0
assets/Script/GameUI/JustAgain.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "723fe135-609c-42db-acb0-4fa9655a8d17",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/Script/GameUI/Notice.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "afbb91ca-5fd9-4fec-a9d0-9218df521b1e",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 72 - 0
assets/Script/GameUI/Notice/DressUpPop.ts

@@ -0,0 +1,72 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import HTTPS, { NetPost } from "../../Template/HTTPS";
+import PopComponet from "../../Template/PopComponet";
+import NoticeManger from "../NoticeManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class HrNotice extends PopComponet {
+
+    data: {
+        Id: number;
+        Name: string;
+        Picture: string;
+    }
+
+
+    protected start(): void {
+
+
+
+        try {
+            this.data = JSON.parse(this.Options.Data.Data)
+        } catch (error) {
+
+        }
+        this.Loadimage()
+    }
+
+    Loadimage() {
+
+        if (!this.data) {
+            return
+        }
+        cc.assetManager.loadRemote(this.data.Picture, (err, res: cc.Texture2D) => {
+            if (!err) {
+                let image = this.node.getChildByName("Node").getChildByName("mask").getChildByName("image").getComponent(cc.Sprite)
+                image.spriteFrame = new cc.SpriteFrame(res);
+            }
+        })
+
+        let label = this.node.getChildByName("Node").getChildByName("2").getChildByName("str").getComponent(cc.Label)
+
+        label.string = `恭喜荣获${this.data.Name}`
+
+
+        let name = this.node.getChildByName("Node").getChildByName("name").getComponent(cc.Label)
+
+        name.string = `${this.data.Name}`
+
+
+    }
+
+    // update (dt) {}
+    onDestroy(): void {
+        NoticeManger.getInstance().Pop()
+
+        HTTPS.Instance.post(NetPost.EditToBenotified,
+            { Id: this.Options.Data.Id }).then((resp) => {
+
+            })
+    }
+
+
+
+}

+ 10 - 0
assets/Script/GameUI/Notice/DressUpPop.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "3d584def-877d-43cc-9b2e-222803589bc5",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 63 - 0
assets/Script/GameUI/Notice/FullAttendance.ts

@@ -0,0 +1,63 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import HTTPS, { NetPost } from "../../Template/HTTPS";
+import PopComponet from "../../Template/PopComponet";
+import NoticeManger from "../NoticeManger";
+
+const { ccclass, property } = cc._decorator;
+
+
+@ccclass
+export default class FullAttendance extends PopComponet {
+
+    data: {
+        Id: number;
+        Name: string;
+        Picture: string;
+    }
+
+
+    protected start(): void {
+        this.Options.Data.Id
+
+        try {
+            this.data = JSON.parse(this.Options.Data.Data)
+        } catch (error) {
+
+        }
+
+        this.Loadimage()
+    }
+
+    Loadimage() {
+
+        if (!this.data) {
+            return
+        }
+        cc.assetManager.loadRemote(this.data.Picture, (err, res: cc.Texture2D) => {
+            if (!err) {
+                let Node = this.node.getChildByName("Node").getComponent(cc.Sprite)
+                Node.spriteFrame = new cc.SpriteFrame(res);
+            }
+        })
+
+        let label = this.node.getChildByName("2").getChildByName("label").getComponent(cc.Label)
+        label.string = `恭喜荣获${this.data.Name}`
+
+    }
+
+    // update (dt) {}
+    onDestroy(): void {
+        NoticeManger.getInstance().Pop()
+
+        HTTPS.Instance.post(NetPost.EditToBenotified,
+            { Id: this.Options.Data.Id }).then((resp) => {
+
+            })
+    }
+}

+ 10 - 0
assets/Script/GameUI/Notice/FullAttendance.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "b4178aef-bbc3-413a-bb65-cc5de721afb1",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 90 - 0
assets/Script/GameUI/Notice/HrDetails.ts

@@ -0,0 +1,90 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import HTTPS, { NetPost } from "../../Template/HTTPS";
+import PopComponet from "../../Template/PopComponet";
+import NoticeManger from "../NoticeManger";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class HrNotice extends PopComponet {
+    data: {
+        Id: number;
+        Name: string;
+        Picture: string;
+    }
+
+
+    protected start(): void {
+        try {
+            this.data = JSON.parse(this.Options.Data.Data)
+        } catch (error) {
+
+        }
+
+        this.Loadimage()
+    }
+
+    Loadimage() {
+
+        if (!this.data) {
+            return
+        }
+        cc.assetManager.loadRemote(this.data.Picture, (err, res: cc.Texture2D) => {
+            if (!err) {
+                let image = this.node.getChildByName("Node").getChildByName("mask").getChildByName("image").getComponent(cc.Sprite)
+                image.spriteFrame = new cc.SpriteFrame(res);
+
+            }
+        })
+
+
+
+        let Label1 = this.node.getChildByName("Node").getChildByName("str1").getChildByName("Label1").getComponent(cc.Label)
+        let str2 = this.node.getChildByName("Node").getChildByName("str2").getComponent(cc.Label)
+        let Label2 = this.node.getChildByName("Node").getChildByName("str2").getChildByName("Label2").getComponent(cc.Label)
+
+
+
+        Label1.string = `${this.data.Name}`
+
+
+
+        let sss = ''
+        if (this.Options.Data.State == 1) {
+            //获得
+            sss = `亲爱的同事 :
+            由于您昨天旷工,你的职级降级
+        为`
+        } else {
+            //失去
+            sss = `亲爱的同事 :
+            由于您积极工作,你的职级升级
+        为`
+        }
+        str2.string = sss
+
+        Label2.string = `[ ${this.data.Name} ]`
+    }
+
+
+
+
+    // update (dt) {}
+    onDestroy(): void {
+        NoticeManger.getInstance().Pop()
+        HTTPS.Instance.post(NetPost.EditToBenotified,
+            { Id: this.Options.Data.Id }).then((resp) => {
+
+            })
+    }
+}
+
+
+
+

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff