Citrus 1 рік тому
коміт
5b2d34a336
100 змінених файлів з 6652 додано та 0 видалено
  1. 51 0
      .gitignore
  2. 36 0
      README.en.md
  3. 37 0
      README.md
  4. 13 0
      assets/Scene.meta
  5. 476 0
      assets/Scene/Main.fire
  6. 8 0
      assets/Scene/Main.fire.meta
  7. 13 0
      assets/anim.meta
  8. 37 0
      assets/anim/win_effect_anim.anim
  9. 6 0
      assets/anim/win_effect_anim.anim.meta
  10. 13 0
      assets/code.meta
  11. 156 0
      assets/code/Ad.ts
  12. 10 0
      assets/code/Ad.ts.meta
  13. 31 0
      assets/code/GameMain.ts
  14. 10 0
      assets/code/GameMain.ts.meta
  15. 127 0
      assets/code/Main.ts
  16. 10 0
      assets/code/Main.ts.meta
  17. 20 0
      assets/code/TTSdkComponent.ts
  18. 10 0
      assets/code/TTSdkComponent.ts.meta
  19. 13 0
      assets/code/datas.meta
  20. 10 0
      assets/code/datas/AudioPath.ts
  21. 10 0
      assets/code/datas/AudioPath.ts.meta
  22. 31 0
      assets/code/datas/CatInfo.ts
  23. 10 0
      assets/code/datas/CatInfo.ts.meta
  24. 9 0
      assets/code/datas/DirectionType.ts
  25. 10 0
      assets/code/datas/DirectionType.ts.meta
  26. 13 0
      assets/code/items.meta
  27. 57 0
      assets/code/items/CatItem.ts
  28. 10 0
      assets/code/items/CatItem.ts.meta
  29. 33 0
      assets/code/items/Grass.ts
  30. 10 0
      assets/code/items/Grass.ts.meta
  31. 13 0
      assets/code/manager.meta
  32. 42 0
      assets/code/manager/AudioMgr.ts
  33. 10 0
      assets/code/manager/AudioMgr.ts.meta
  34. 69 0
      assets/code/manager/DataMgr.ts
  35. 10 0
      assets/code/manager/DataMgr.ts.meta
  36. 155 0
      assets/code/manager/LocalData.ts
  37. 10 0
      assets/code/manager/LocalData.ts.meta
  38. 13 0
      assets/code/uis.meta
  39. 59 0
      assets/code/uis/FailUI.ts
  40. 10 0
      assets/code/uis/FailUI.ts.meta
  41. 1159 0
      assets/code/uis/GameUI.ts
  42. 10 0
      assets/code/uis/GameUI.ts.meta
  43. 83 0
      assets/code/uis/HomeUI.ts
  44. 10 0
      assets/code/uis/HomeUI.ts.meta
  45. 122 0
      assets/code/uis/Load.ts
  46. 10 0
      assets/code/uis/Load.ts.meta
  47. 113 0
      assets/code/uis/LoginDog.ts
  48. 10 0
      assets/code/uis/LoginDog.ts.meta
  49. 118 0
      assets/code/uis/PauseUI.ts
  50. 10 0
      assets/code/uis/PauseUI.ts.meta
  51. 94 0
      assets/code/uis/SettingUI.ts
  52. 10 0
      assets/code/uis/SettingUI.ts.meta
  53. 67 0
      assets/code/uis/ShopSkinItem.ts
  54. 10 0
      assets/code/uis/ShopSkinItem.ts.meta
  55. 46 0
      assets/code/uis/ShopUI.ts
  56. 10 0
      assets/code/uis/ShopUI.ts.meta
  57. 57 0
      assets/code/uis/StepOverUI.ts
  58. 10 0
      assets/code/uis/StepOverUI.ts.meta
  59. 56 0
      assets/code/uis/TimeOverUI.ts
  60. 10 0
      assets/code/uis/TimeOverUI.ts.meta
  61. 61 0
      assets/code/uis/TipsUI.ts
  62. 10 0
      assets/code/uis/TipsUI.ts.meta
  63. 64 0
      assets/code/uis/WinUI.ts
  64. 10 0
      assets/code/uis/WinUI.ts.meta
  65. 41 0
      assets/code/uis/rankUI.ts
  66. 10 0
      assets/code/uis/rankUI.ts.meta
  67. 13 0
      assets/code/utils.meta
  68. 332 0
      assets/code/utils/Palt.ts
  69. 10 0
      assets/code/utils/Palt.ts.meta
  70. 90 0
      assets/code/utils/SubLoad.ts
  71. 10 0
      assets/code/utils/SubLoad.ts.meta
  72. 36 0
      assets/code/utils/UIbase.ts
  73. 10 0
      assets/code/utils/UIbase.ts.meta
  74. 13 0
      assets/code/utils/manager.meta
  75. 40 0
      assets/code/utils/manager/PrefabUtil.ts
  76. 10 0
      assets/code/utils/manager/PrefabUtil.ts.meta
  77. 13 0
      assets/code/utils/util.meta
  78. 43 0
      assets/code/utils/util/GameUtil.ts
  79. 10 0
      assets/code/utils/util/GameUtil.ts.meta
  80. 30 0
      assets/code/utils/util/Log.ts
  81. 10 0
      assets/code/utils/util/Log.ts.meta
  82. 94 0
      assets/code/utils/wx.d.ts
  83. 6 0
      assets/code/utils/wx.d.ts.meta
  84. 13 0
      assets/i18n.meta
  85. 76 0
      assets/i18n/I18n.ts
  86. 10 0
      assets/i18n/I18n.ts.meta
  87. 53 0
      assets/i18n/I18nLable.ts
  88. 10 0
      assets/i18n/I18nLable.ts.meta
  89. 13 0
      assets/i18n/language.meta
  90. 12 0
      assets/i18n/language/En.ts
  91. 10 0
      assets/i18n/language/En.ts.meta
  92. 12 0
      assets/i18n/language/Zh.ts
  93. 10 0
      assets/i18n/language/Zh.ts.meta
  94. 13 0
      assets/load.meta
  95. BIN
      assets/load/1@2x.png
  96. 38 0
      assets/load/1@2x.png.meta
  97. BIN
      assets/load/Bg.jpg
  98. 38 0
      assets/load/Bg.jpg.meta
  99. 1684 0
      assets/load/LoadScene.fire
  100. 8 0
      assets/load/LoadScene.fire.meta

+ 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/

+ 36 - 0
README.en.md

@@ -0,0 +1,36 @@
+# helpAnimal
+
+#### Description
+救救动物们
+
+#### Software Architecture
+Software architecture description
+
+#### Installation
+
+1.  xxxx
+2.  xxxx
+3.  xxxx
+
+#### Instructions
+
+1.  xxxx
+2.  xxxx
+3.  xxxx
+
+#### Contribution
+
+1.  Fork the repository
+2.  Create Feat_xxx branch
+3.  Commit your code
+4.  Create Pull Request
+
+
+#### Gitee Feature
+
+1.  You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
+2.  Gitee blog [blog.gitee.com](https://blog.gitee.com)
+3.  Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
+4.  The most valuable open source project [GVP](https://gitee.com/gvp)
+5.  The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
+6.  The most popular members  [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

+ 37 - 0
README.md

@@ -0,0 +1,37 @@
+# helpAnimal
+
+#### 介绍
+救救动物们
+
+#### 软件架构
+软件架构说明
+
+
+#### 安装教程
+
+1.  xxxx
+2.  xxxx
+3.  xxxx
+
+#### 使用说明
+
+1.  xxxx
+2.  xxxx
+3.  xxxx
+
+#### 参与贡献
+
+1.  Fork 本仓库
+2.  新建 Feat_xxx 分支
+3.  提交代码
+4.  新建 Pull Request
+
+
+#### 特技
+
+1.  使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
+2.  Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
+3.  你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
+4.  [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
+5.  Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
+6.  Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

+ 13 - 0
assets/Scene.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 476 - 0
assets/Scene/Main.fire

@@ -0,0 +1,476 @@
+[
+  {
+    "__type__": "cc.SceneAsset",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "scene": {
+      "__id__": 1
+    }
+  },
+  {
+    "__type__": "cc.Scene",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
+    "_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,
+      "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": "2d2f792f-a40c-49bb-a189-ed176a246e49"
+  },
+  {
+    "__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": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        375,
+        667,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "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": "barYpuIgRA0K1BtmMc/cgW"
+  },
+  {
+    "__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": "f5CObYloJB+4h7ywCkFryP"
+  },
+  {
+    "__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": 27,
+      "g": 38,
+      "b": 46,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "e2e0crkOLxGrpMxpbC4iQg1"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 200,
+    "_originalHeight": 150,
+    "_id": "45d1RIeSRCppvkC/MADa6B"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": null,
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "c1WgW+gqFJGpQlRtpQA2B+"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "New Node",
+    "_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": "803XAztvhOUpLnqrAH4vLG"
+  },
+  {
+    "__type__": "cc.Canvas",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_designResolution": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_fitWidth": true,
+    "_fitHeight": false,
+    "_id": "22tTw+z+9IlrL2EK45Ncd2"
+  },
+  {
+    "__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": "0cti0FyJRKyJ6lGU/ly5BR"
+  },
+  {
+    "__type__": "95c3dV9pYlF3Zfr9ci4S3y4",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "catContainer": {
+      "__id__": 8
+    },
+    "_id": "a4NhtE/7FETY02naLtGsL9"
+  }
+]

+ 8 - 0
assets/Scene/Main.fire.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.3.2",
+  "uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49",
+  "importer": "scene",
+  "asyncLoadAssets": false,
+  "autoReleaseAssets": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/anim.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "459f5f67-885e-43ba-bbf9-87fc7d1c0f6d",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 37 - 0
assets/anim/win_effect_anim.anim

@@ -0,0 +1,37 @@
+{
+  "__type__": "cc.AnimationClip",
+  "_name": "win_effect_anim",
+  "_objFlags": 0,
+  "_native": "",
+  "_duration": 0.35,
+  "sample": 60,
+  "speed": 1,
+  "wrapMode": 2,
+  "curveData": {
+    "comps": {
+      "cc.Sprite": {
+        "spriteFrame": [
+          {
+            "frame": 0,
+            "value": {
+              "__uuid__": "4b6c6c7c-511d-4ebe-8a44-12ae2d9a4806"
+            }
+          },
+          {
+            "frame": 0.16666666666666666,
+            "value": {
+              "__uuid__": "70185880-76cd-453f-929b-533579d56055"
+            }
+          },
+          {
+            "frame": 0.3333333333333333,
+            "value": {
+              "__uuid__": "4b6c6c7c-511d-4ebe-8a44-12ae2d9a4806"
+            }
+          }
+        ]
+      }
+    }
+  },
+  "events": []
+}

+ 6 - 0
assets/anim/win_effect_anim.anim.meta

@@ -0,0 +1,6 @@
+{
+  "ver": "2.1.2",
+  "uuid": "8d120edf-a864-4d30-a20a-912b68dd6f09",
+  "importer": "animation-clip",
+  "subMetas": {}
+}

+ 13 - 0
assets/code.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "b8eb017b-af61-4498-b3da-aff7e63abc55",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 156 - 0
assets/code/Ad.ts

@@ -0,0 +1,156 @@
+const { ccclass, property } = cc._decorator;
+
+@ccclass("AdConfigBase")
+class AdConfigBase {
+    @property({ displayName: "广告Id" })
+    codeId: string = "";
+};
+
+@ccclass("RewardedVideoAdConfig")
+class RewardedVideoAdConfig extends AdConfigBase {
+};
+
+@ccclass("BannerAdConfig")
+class BannerAdConfig extends AdConfigBase {
+    @property({ displayName: "宽度" })
+    width: number = 500;
+    @property({ displayName: "高度" })
+    height: number = 300;
+};
+
+@ccclass("InterstitialAdConfig")
+class InterstitialAdConfig extends AdConfigBase {
+};
+
+@ccclass("SplashAdConfig")
+class SplashAdConfig extends AdConfigBase {
+};
+
+@ccclass("Ad")
+export class Ad {
+    @property({ displayName: "应用appId" })
+    appId: string = "";
+    @property({ type: BannerAdConfig, displayName: "Banner广告" })
+    bannerAdConfig: BannerAdConfig = new BannerAdConfig();
+    @property({ type: RewardedVideoAdConfig, displayName: "激励视频广告" })
+    rewardedVideoAdConfig: RewardedVideoAdConfig = new RewardedVideoAdConfig();
+    @property({ type: SplashAdConfig, displayName: "开屏广告" })
+    splashAdConfig: SplashAdConfig = new SplashAdConfig();
+    @property({ type: InterstitialAdConfig, displayName: "插屏广告" })
+    interstitialAdConfig: InterstitialAdConfig = new InterstitialAdConfig();
+
+    private rewardAdCallback: any;
+    private rewardAdCallbackObj: any;
+
+    private static onNativeCallback: any;
+    private static onNativeCallbackObj: any;
+
+    sendToNative(arg0: string, arg1?: string) {
+        console.warn("sendToNative",arg0,arg1);
+        // native.bridge.sendToNative(arg0, arg1);
+        jsb.reflection.callStaticMethod("com/yiyuancoder/ttsdk/TTSdkComponent", "sendToNative", "(Ljava/lang/String;Ljava/lang/String;)V", arg0, arg1);
+        // jsb.reflection.callStaticMethod("com/example/testchaunshanjia/TTSdkComponent", "sendToNative", "(Ljava/lang/String;Ljava/lang/String;)V", arg0, arg1);
+
+    }
+
+    public static onNative(arg0: string, arg1: string) {
+        if (this.onNativeCallback != null) {
+            this.onNativeCallback.call(this.onNativeCallbackObj, arg0, arg1);
+            this.onNativeCallback = null;
+            this.onNativeCallbackObj = null;
+        }
+    }
+
+    async init() {
+        return new Promise((resolve, reject) => {
+            // native.bridge.onNative = (arg0: string, arg1: string): void => {
+            //     if (arg0 == 'onInit') {
+            //         resolve(arg1 == "true");
+            //     }
+            // }
+            Ad.onNativeCallbackObj = this;
+            Ad.onNativeCallback = (arg0: string, arg1: string) => {
+                if (arg0 == 'onInit') {
+                    resolve(arg1 == "true");
+                }
+            }
+            this.sendToNative("init", JSON.stringify({ appId: this.appId }));
+        })
+    }
+
+    /**
+    * 显示Banner广告
+    */
+    showBannerAd(show: boolean): void {
+
+        let width = this.bannerAdConfig.width;
+        let height = this.bannerAdConfig.height;
+        let left = screen.width / 2 - width / 2;
+        let top = screen.height - height;
+        this.sendToNative("showBannerAd", JSON.stringify({ isShow: show, codeId: this.bannerAdConfig.codeId, left: left, top: top, width: width, height: height }));
+    }
+
+    /**
+     * 播放激励视频广告
+     */
+    showRewardedVideoAd(rewardAdCallback: Function, rewardAdCallbackObj: any): void {
+        this.rewardAdCallback = rewardAdCallback;
+        this.rewardAdCallbackObj = rewardAdCallbackObj;
+
+        let that = this;
+        // native.bridge.onNative = (arg0: string, arg1: string): void => {
+        //     if (arg0 == 'onRewardAdCallback') {
+        //         that.onRewardAdCallback(arg1 == "true");
+        //     }
+        // }
+        Ad.onNativeCallbackObj = this;
+        Ad.onNativeCallback = (arg0: string, arg1: string) => {
+            if (arg0 == 'onRewardAdCallback') {
+                //在这里改了,这判断了, 是false ,转bool
+                if(arg1 == "false"){
+                    that.onRewardAdCallback(false);
+                }else{
+                    // 这里字符串,走的字符串
+                    that.onRewardAdCallback1(arg1);
+                }
+              
+            }
+        }
+        console.warn("sendToNative", this.rewardedVideoAdConfig.codeId)
+        this.sendToNative("showRewardVideoAd", JSON.stringify({ codeId: this.rewardedVideoAdConfig.codeId }));
+    }
+
+    /**
+     * 激励视频广告回调
+     */
+    onRewardAdCallback(success: boolean) {
+        if (this.rewardAdCallback) {
+            this.rewardAdCallback.call(this.rewardAdCallbackObj, success);
+            this.rewardAdCallback = null;
+            this.rewardAdCallbackObj = null;
+        }
+    }
+    onRewardAdCallback1(success: string) {
+        if (this.rewardAdCallback) {
+            this.rewardAdCallback.call(this.rewardAdCallbackObj, success);
+            this.rewardAdCallback = null;
+            this.rewardAdCallbackObj = null;
+        }
+    }
+
+    /**
+     * 显示开屏广告
+     */
+    showSplashAd(): void {
+        this.sendToNative("showSplashAd", JSON.stringify({ codeId: this.splashAdConfig.codeId, width: screen.width, height: screen.height }));
+    }
+
+    /**
+     * 显示插屏广告
+     */
+    showFullScreenVideoAd() {
+        // 在适合的场景显示插屏广告
+        this.sendToNative("showFullScreenVideoAd", JSON.stringify({ codeId: this.interstitialAdConfig.codeId }));
+    }
+};
+ window.Ad = Ad;

+ 10 - 0
assets/code/Ad.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "9628a72a-179b-4ca3-be6c-81ba52cfb550",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 31 - 0
assets/code/GameMain.ts

@@ -0,0 +1,31 @@
+
+const {ccclass, property} = cc._decorator;
+import HomeUI from './uis/HomeUI';
+
+
+@ccclass
+export default class GameMain extends cc.Component {
+
+   
+
+    @property(cc.Node)
+    catContainer:cc.Node=null;
+
+
+    onLoad(): void
+    {
+        
+    }
+
+
+    start () {
+
+        HomeUI.inst.showUI();
+    }
+
+
+
+
+    
+
+}

+ 10 - 0
assets/code/GameMain.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "95c3d57d-a589-45dd-97eb-f5c8b84b7cb8",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 127 - 0
assets/code/Main.ts

@@ -0,0 +1,127 @@
+import { Ad } from "./Ad";
+import TTSdkComponent from "./TTSdkComponent";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Main extends cc.Component {
+
+        @property({ type: [cc.SpriteFrame], displayName: "按钮图片" })
+        btnImages: cc.SpriteFrame[] = [];
+        btnColorIndex: number = 0;
+
+        async start() {
+                // //获取穿山甲Sdk组件
+                // let ttSdkComponent = cc.find("TTSdkComponent").getComponent(TTSdkComponent);
+                // //初始化
+                // let inited = await ttSdkComponent.ad.init();
+                // console.log(inited,"广告组件初始化成功");
+                // if (!inited) {
+                //         ttSdkComponent.showToast("广告组件初始化失败");
+                //         return;
+                // }
+
+                // //Banner广告
+                // let btn = this.createBtn("Banner广告");
+                // let bannerAdFlag = true;
+                // btn.on(cc.Node.EventType.TOUCH_END, () => {
+                //         ttSdkComponent.ad.showBannerAd(bannerAdFlag);
+                //         bannerAdFlag = !bannerAdFlag;
+                // }, this);
+
+                //激励视频
+                // btn = this.createBtn("激励视频");
+                // btn.on(cc.Node.EventType.TOUCH_END, () => {
+                //         ttSdkComponent.ad.showRewardedVideoAd((success: boolean) => {
+                //                 ttSdkComponent.showToast(success ? "恭喜获得奖励" : "完整观看视频才能获得奖励哦");
+                //         }, this);
+                // }, this);
+
+                //开屏广告
+                // btn = this.createBtn("开屏广告");
+                // btn.on(cc.Node.EventType.TOUCH_END, () => {
+                //         ttSdkComponent.ad.showSplashAd();
+                // }, this);
+
+                //插屏广告
+                // btn = this.createBtn("插屏广告");
+                // btn.on(cc.Node.EventType.TOUCH_END, () => {
+                //         ttSdkComponent.ad.showFullScreenVideoAd();
+                // }, this);
+        }
+
+        createBtn(name: string) {
+                //按钮预设
+                let BtnPrefab = cc.find("Canvas/BtnsLayout/BtnPrefab");
+
+                let newBtn = cc.instantiate(BtnPrefab);
+                newBtn.active = true;
+                newBtn.parent = BtnPrefab.parent;
+                newBtn.getComponent(cc.Sprite).spriteFrame = this.btnImages[this.btnColorIndex++ % this.btnImages.length];
+                newBtn.getComponentInChildren(cc.Label).string = name;
+                return newBtn;
+        }
+        // async showGG() {
+        //         console.warn("调用激励")
+        //         // new Ad().showRewardedVideoAd((isShow) => {
+        //         //         console.warn("播放结果:"+isShow)
+        //         // }, this)
+        //         //获取穿山甲Sdk组件
+        //         let ttSdkComponent = cc.find("TTSdkComponent").getComponent(TTSdkComponent);
+        //         if(ttSdkComponent!=null){
+        //                 console.warn("彭于晏")
+        //         }else{
+        //                 console.warn("吊毛")
+        //         }
+        //         //初始化
+        //         let inited = await ttSdkComponent.ad.init();
+        //         if (!inited) {
+        //                 ttSdkComponent.showToast("广告组件初始化失败");
+        //                 return;
+        //         }
+        //         ttSdkComponent.ad.showRewardedVideoAd((success: boolean) => {
+        //                 ttSdkComponent.showToast(success ? "恭喜获得奖励" : "完整观看视频才能获得奖励哦");
+        //         }, this);
+        // }
+        
+        async showGG() {
+                try {
+                    console.warn("调用激励");
+                    // let ttSdkComponent = cc.find("TTSdkComponent").getComponent(TTSdkComponent);
+                    let ttSdkComponent = cc.director.getScene().getChildByName("view").getChildByName("TTSdkComponent").getComponent(TTSdkComponent);
+                    console.warn("调用激励",ttSdkComponent);
+
+                //     if (ttSdkComponent != null) {
+                //         console.warn("找到TTSdkComponent组件");
+                //     } else {
+                //         console.warn("TTSdkComponent组件未找到");
+                //         return;
+                //     }
+                //     console.warn("第二部调用成功");
+                    
+                //     let inited = await ttSdkComponent.ad.init();
+                //     if (!inited) {
+                //         ttSdkComponent.showToast("广告组件初始化失败");
+                //         return;
+                //     }
+                    console.warn("第三部调用成功");
+                    ttSdkComponent.ad.showRewardedVideoAd((success) => {
+                        console.warn(success,"调用成功");
+                        if( this.isBoolean(success)){
+                             ttSdkComponent.showToast(success ? "恭喜获得奖励" : "完整观看视频才能获得奖励哦");
+                        }else{
+                            //这里, 这里是字符串的回调,
+                            ttSdkComponent.showToast("恭喜获得奖励:"+ success);
+                        }
+                    }, this);
+                    console.warn('success',"调用成功");
+
+                } catch (error) {
+                    console.error("广告加载失败", error);
+                }
+            }
+
+             isBoolean(value: any): value is boolean {
+                return typeof value === 'boolean';
+            }
+}

+ 10 - 0
assets/code/Main.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "4a022b48-7996-46ab-ac7a-db3111ab8c1b",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 20 - 0
assets/code/TTSdkComponent.ts

@@ -0,0 +1,20 @@
+import { Ad } from "./Ad";
+
+const { ccclass, property } = cc._decorator;
+
+declare var wx: any;
+
+@ccclass
+export default class TTSdkComponent extends cc.Component {
+
+    @property({ type: Ad, displayName: "广告模块" })
+    ad: Ad = new Ad();
+
+    sendToNative(arg0: string, arg1?: string) {
+        jsb.reflection.callStaticMethod("com/yiyuancoder/ttsdk/TTSdkComponent", "sendToNative", "(Ljava/lang/String;Ljava/lang/String;)V", arg0, arg1);
+    }
+
+    showToast(content: string) {
+        this.sendToNative('showToast', JSON.stringify({ content: content }));
+    }
+}

+ 10 - 0
assets/code/TTSdkComponent.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "f3b4b6b1-a004-4e3c-a8af-0e7328ee07ac",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/code/datas.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "e1369f98-f304-4435-aeae-940b242cf972",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 10 - 0
assets/code/datas/AudioPath.ts

@@ -0,0 +1,10 @@
+export default class AudioPath
+{
+
+    public static CLICK:string="";
+    public static SHEEP:string= "";
+    public static LEVELUP:string = "";
+    
+}
+
+   

+ 10 - 0
assets/code/datas/AudioPath.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "f04cd07a-2555-4b29-9fa6-1ae47007c35c",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 31 - 0
assets/code/datas/CatInfo.ts

@@ -0,0 +1,31 @@
+
+
+export default class CatInfo
+{
+
+    public id:number;
+
+    public now_grids:Array<number>=[]
+
+    public dir:number=1;
+
+    public cat:cc.Node=null;
+
+    public last_grids:Array<Array<number>>=[];
+
+    public move_tween:cc.Tween;
+
+    public lastPosition:cc.Vec2;
+
+    public push_last()
+    {
+        this.last_grids.push(this.now_grids.concat());
+    }
+
+    public revoke()
+    {
+        this.now_grids = this.last_grids.pop();
+    }
+}
+
+   

+ 10 - 0
assets/code/datas/CatInfo.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "9edcf01a-1a9f-4c9c-95e8-7f8a217206f1",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 9 - 0
assets/code/datas/DirectionType.ts

@@ -0,0 +1,9 @@
+
+
+export default class DirectionType
+{
+   public static up:number=1;
+   public static left:number=2;
+   public static down:number=3;
+   public static right:number=4;
+}

+ 10 - 0
assets/code/datas/DirectionType.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "362c3373-f4e9-4a84-979e-66e0fbc03e43",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/code/items.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "b738d71e-b84d-4d0a-9b1e-b8901495caec",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 57 - 0
assets/code/items/CatItem.ts

@@ -0,0 +1,57 @@
+// 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 { DataMgr } from "../manager/DataMgr";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class CatItem extends cc.Component {
+
+    @property(cc.Node)
+    cat: cc.Node = null;
+    @property(cc.Sprite)
+    catSprite: cc.Sprite = null
+
+
+    start() {
+
+        this.scheduleOnce(() => {
+            this.play(2);
+        }, 0.1)
+    }
+    protected onLoad(): void {
+       
+    }
+    protected onEnable(): void {
+       
+        const id = DataMgr.ins.getRandomId();
+        cc.resources.load("/cat/cat_skin_" + id, cc.SpriteFrame, (error, frame) => {
+            this.catSprite.spriteFrame = frame
+        })
+    }
+
+    public state = 0;
+
+    public play(state) {
+        if (state == 1)  //默认
+        {
+            cc.tween(this.cat)
+                .to(1, { scaleX: 1.2 })
+                .to(1, { scaleX: 1 })
+                .union()
+                .repeat(1000000)
+                .start();
+        }else{
+            var animationComponent = this.getComponent(cc.Animation)
+            var animState = animationComponent.play('idle');
+            animState.speed = 0.4
+            animState.repeatCount = Infinity;
+        }
+    }
+
+}

+ 10 - 0
assets/code/items/CatItem.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "1788b449-2521-45c6-a0d5-5848ebf12850",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 33 - 0
assets/code/items/Grass.ts

@@ -0,0 +1,33 @@
+const {ccclass, property} = cc._decorator;
+import GameUtil from '../utils/util/GameUtil';
+
+@ccclass
+export default class Grass extends cc.Component
+ {
+
+    private index:number=0;
+
+    public next=GameUtil.randomRange(60,500);
+
+    protected update(dt: number): void {
+
+        this.index++;
+
+        if(this.index>this.next)
+        {
+            this.index=0;
+
+            this.next=GameUtil.randomRange(600,1000);
+        }
+        
+        if(this.index>this.next-5)
+        {
+            this.node.scale=1.2
+        }
+        else
+        {
+            this.node.scale=1;
+        }
+        
+    }
+}

+ 10 - 0
assets/code/items/Grass.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "9a800782-dac2-42af-9508-47b20472290f",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/code/manager.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "b1d00063-05c3-49cf-ac95-28ac0dff1f27",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 42 - 0
assets/code/manager/AudioMgr.ts

@@ -0,0 +1,42 @@
+// 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 "./LocalData";
+
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+export default class AudioMgr
+ {
+
+    public static sounds:any={};
+
+    public static playSound(name)
+    {
+        
+    }
+
+
+    private static bgm_name="";
+
+    public static playBgm()
+    {
+
+        if(LocalData.yy==false)
+        {
+            return;
+        }
+
+
+        
+    }
+    public static stopBgm()
+    {
+        
+    }
+
+}

+ 10 - 0
assets/code/manager/AudioMgr.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "a9130651-cee6-4131-bbff-bb950b67683c",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 69 - 0
assets/code/manager/DataMgr.ts

@@ -0,0 +1,69 @@
+class ILocalData {
+    skins: number[];
+    unlockSkinList: number[]
+}
+
+export class DataMgr {
+    private static _ins: DataMgr;
+    public static get ins(): DataMgr {
+        this._ins = this._ins || new DataMgr()
+        return this._ins;
+    }
+
+    data: ILocalData
+    constructor() {
+        this.load()
+    }
+
+    load() {
+        const local_data_json = localStorage.getItem("local_data_json");
+        if (!local_data_json) {
+            this.data = {
+                skins: [1],
+                unlockSkinList: [1]
+            }
+        } else {
+            this.data = JSON.parse(local_data_json)
+        }
+    }
+    save() {
+        const local_data_json = JSON.stringify(this.data)
+        localStorage.setItem("local_data_json", local_data_json)
+    }
+
+    setSkin(skin: number) {
+        let idx = this.data.skins.indexOf(skin);
+        if (idx != -1)
+        {
+            this.data.skins.splice(idx, 1);
+        }else{
+            this.data.skins.push(skin);
+        }
+        if(this.data.skins.length <= 0){
+            this.data.skins.push(1);
+        }
+        this.save()
+    }
+
+    isUnlockSkin(skin: number) {
+        return this.data.unlockSkinList.includes(skin)
+    }
+
+    unlockSkin(skin: number) {
+        if (this.data.unlockSkinList.includes(skin)) {
+            return;
+        }
+        this.data.unlockSkinList.push(skin)
+        this.save()
+    }
+
+    isUseSkin(skin: number):boolean{
+        return this.data.skins.includes(skin);
+    }
+
+    getRandomId():number{
+        let index = Math.floor(Math.random()*this.data.skins.length);
+        return this.data.skins[index];
+    }
+
+}

+ 10 - 0
assets/code/manager/DataMgr.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "9343ef57-e964-458c-a5b0-954f56a2d1f6",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 155 - 0
assets/code/manager/LocalData.ts

@@ -0,0 +1,155 @@
+
+
+import Plat from "../utils/Palt";
+import GameUtil from "../utils/util/GameUtil";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass("LocalManager")
+
+
+export default class LocalData {
+
+
+
+    //#region  基本函数
+
+    public static str_datas: { [key: string]: string } = {};
+
+    public static getItemToStr(key, val?: string): string {
+        if (this.str_datas[key] == null) {
+            let str = cc.sys.localStorage.getItem(key);
+
+            if (str == null || str == "") {
+                str = "";
+
+                if (val) {
+                    str = val;
+                }
+
+                this.str_datas[key] = str;
+            }
+            else {
+                this.str_datas[key] = str;
+            }
+        }
+
+        return this.str_datas[key];
+    }
+
+    public static setItemToStr(key: string, val: string) {
+        this.str_datas[key] = val;
+        cc.sys.localStorage.setItem(key, val);
+    }
+
+
+
+
+    public static int_datas: { [key: string]: number } = {};
+
+    public static getItemToNumber(key, val?: number): number {
+        if (this.int_datas[key] == null) {
+            let str = cc.sys.localStorage.getItem(key);
+
+            if (str == null || str == "") {
+                let v = 0;
+
+                if (val) {
+                    v = val;
+                }
+
+                this.int_datas[key] = v;
+            }
+            else {
+                this.int_datas[key] = parseInt(str);
+            }
+        }
+
+        return this.int_datas[key];
+
+    }
+
+
+    public static setItemToNumber(key: string, val: number): any {
+        this.int_datas[key] = val;
+        cc.sys.localStorage.setItem(key, val + "");
+    }
+
+    //#endregion
+
+    public static yx: boolean = true;
+    public static yy: boolean = true;
+
+
+    public static set lv(curLevel) {
+        Plat.setRank(curLevel)
+        this.setItemToNumber("curLevel", curLevel)
+    }
+
+    public static get lv() {
+        return this.getItemToNumber("curLevel", 1);
+    }
+
+
+    public static set openid(id) {
+        this.setItemToStr("openid", id);
+    }
+
+    public static get openid() {
+        return this.getItemToStr("openid");
+    }
+
+
+    private static _userinfo: any = null;
+
+    public static set userinfo(info) {
+        this._userinfo = info;
+
+        this.setItemToStr("userinfo", JSON.stringify(info));
+    }
+
+    public static get userinfo() {
+        if (this._userinfo == null) {
+            let str = this.getItemToStr("userinfo");
+
+            if (str == "") {
+                this._userinfo = null;
+            }
+            else {
+                this._userinfo = JSON.parse(str);
+            }
+        }
+
+        return this._userinfo;
+    }
+
+
+    public static set userid(id) {
+        this.setItemToStr("userid", id);
+    }
+
+    public static get userid() {
+        let str = this.getItemToStr("userid");
+
+        if (str == "") {
+            str = "" + Date.now() + GameUtil.randomRange(0, 10000000);
+            this.setItemToStr("userid", str);
+        }
+
+        return str;
+    }
+
+    public static get catSkinList(): number[] {
+        let skinListStr = localStorage.getItem("local_data_list");
+        if (!skinListStr) {
+            skinListStr = "{}"
+        }
+        const skinList = JSON.parse(skinListStr)
+        return skinList
+    }
+
+    public static set catSkinList(v: number[]) {
+
+    }
+    
+}

+ 10 - 0
assets/code/manager/LocalData.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "994d6a52-f240-4722-aaf8-ea78569ae3e3",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/code/uis.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "90d240b2-ea2e-4c66-8bc7-fff220b1cea6",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 59 - 0
assets/code/uis/FailUI.ts

@@ -0,0 +1,59 @@
+const { ccclass, property } = cc._decorator;
+import AudioPath from '../datas/AudioPath';
+import AudioMgr from '../manager/AudioMgr';
+import { DataMgr } from '../manager/DataMgr';
+import PrefabUtil from '../utils/manager/PrefabUtil';
+import Plat from '../utils/Palt';
+import UIbase from '../utils/UIbase';
+import GameUI from './GameUI';
+
+
+@ccclass
+export default class FailUI extends UIbase {
+
+    private static _inst: FailUI;
+
+    public static get inst() {
+        if (this._inst == null) {
+            let v = cc.instantiate(PrefabUtil.get("FailUI"));
+
+            this._inst = v.getComponent(FailUI);
+        }
+
+        return this._inst;
+    }
+
+    @property(cc.Sprite)
+    cat: cc.Sprite = null;
+
+    public showUI(data?: any): void {
+        super.showUI(data)
+        const id = DataMgr.ins.getRandomId();
+        cc.resources.load("/cat/cat_skin_" + id, cc.SpriteFrame, (error, frame) => {
+            this.cat.spriteFrame = frame
+        })
+    }
+
+    protected onShow(): void {
+        Plat.showBanner()
+        Plat.showInterstitialAd()
+    }
+
+    protected onHide(): void {
+        Plat.hideBanner()
+    }
+
+    public onClickStartGame() {
+        this.hideUI();
+        GameUI.inst.onStartGame();
+        AudioMgr.playSound(AudioPath.CLICK);
+    }
+
+    public onClickShare() {
+        Plat.shareAppMessage();
+        AudioMgr.playSound(AudioPath.CLICK);
+    }
+
+
+
+}

+ 10 - 0
assets/code/uis/FailUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "9a232e36-65d6-4d51-9884-399af58919ca",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 1159 - 0
assets/code/uis/GameUI.ts

@@ -0,0 +1,1159 @@
+const { ccclass, property } = cc._decorator;
+import DirectionType from '../datas/DirectionType';
+import CatInfo from '../datas/CatInfo';
+import PrefabUtil from '../utils/manager/PrefabUtil';
+import GameUtil from '../utils/util/GameUtil';
+import UIbase from '../utils/UIbase';
+import TipsUI from './TipsUI';
+import LocalData from '../manager/LocalData';
+import WinUI from './WinUI';
+import FailUI from './FailUI';
+import PauseUI from './PauseUI';
+import StepOverUI from './StepOverUI';
+import TimeOverUI from './TimeOverUI';
+import Plat from '../utils/Palt';
+import AudioPath from '../datas/AudioPath';
+import AudioMgr from '../manager/AudioMgr';
+
+
+@ccclass
+export default class GameUI extends UIbase {
+
+    private static _inst: GameUI;
+
+    public static get inst() {
+        if (this._inst == null) {
+            let v = cc.instantiate(PrefabUtil.get("GameUI"));
+
+            this._inst = v.getComponent(GameUI);
+        }
+
+        return this._inst;
+    }
+
+
+    @property(cc.Node)
+    catContainer: cc.Node = null;
+
+    @property(cc.Node)
+    showNode: cc.Node = null;
+
+    @property(cc.Node)
+    maskNode: cc.Node = null;  //遮罩
+
+    @property(cc.Node)
+    buttonsNode: cc.Node = null;  //按钮组
+
+    @property(cc.Node)
+    selectNode: cc.Node = null;  //选择视图
+
+    @property(cc.Label)
+    timerLabel: cc.Label = null;  //计时器
+
+    @property(cc.Label)
+    curLevel: cc.Label = null;  //关卡
+
+    @property(cc.Label)
+    stepLabel: cc.Label = null;//步数计数器
+
+
+    // public grids:Map<number,GridInfo>=new Map();
+
+    public grid_num_list: Array<number> = []
+
+    public grid_map: Map<number, number> = new Map();
+
+    public cat_info_list: Array<CatInfo> = [];
+
+    public horizontal_count = 20;
+    public vertical_count = 20;
+    public ww = 50;
+
+    public old_cat_pos: Array<CatInfo> = [];
+
+    public is_game_playing = false;
+    public is_game_pause = false;
+
+    private stepCount = 0;
+
+
+    start() {
+        setInterval(() => {
+            this.onTimerUpdate();
+        }, 1000);
+    }
+
+
+    public resetGameData() {
+        this.grid_num_list = [];
+        this.grid_map = new Map();
+
+        this.cat_info_list = [];
+
+
+        this.catContainer.removeAllChildren();
+
+        this.maskNode.parent = this.catContainer;
+        this.selectNode.active = false
+
+    }
+
+    private updateStepStr() {
+        this.stepLabel.string = this.stepCount + ""
+    }
+
+    public addStepCount() {
+        this.stepCount += 60
+        this.updateStepStr()
+        this.is_game_playing = true;
+    }
+
+    private deleteStepCount() {
+        this.stepCount--
+        this.updateStepStr()
+        if (this.stepCount <= 0) {
+            this.onStepOver()
+        }
+    }
+
+    public onTimeOver() {
+        this.is_game_playing = false;
+        // FailUI.inst.showUI();
+        TimeOverUI.inst.showUI()
+    }
+
+    public onStepOver() {
+        this.is_game_playing = false;
+        StepOverUI.inst.showUI()
+    }
+
+
+    public onStartGame() {
+
+        this.is_game_pause = false;
+
+        this.resetGameData();
+
+        this.showUI();
+
+        this.randomCatInfos();
+        this.updateUI();
+
+        this.scheduleOnce(() => {
+            this.checkShow();
+        }, 0.1)
+
+        this.curLevel.string = "第 " + LocalData.lv + " 关";
+
+        this.updateTimeLabel();
+    }
+
+    private setLvData() {
+        let lv = LocalData.lv;
+
+        if (lv == 1) {
+            this.vertical_count = 6;
+            this.horizontal_count = 6;
+
+            this.catContainer.scale = 1.5;
+
+            this.time = 60;
+        }
+        else if (lv == 2) {
+            this.vertical_count = 25;
+            this.horizontal_count = 25;
+
+            this.catContainer.scale = 1;
+
+            this.time = 240;
+        }
+        else {
+            this.vertical_count = 25;
+            this.horizontal_count = 25;
+
+            this.time = 240;
+
+            this.catContainer.scale = 0.8;
+
+        }
+    }
+
+
+    private dirs: Array<number> = [1, 2, 3, 4];
+
+    public randomCatInfos() {
+        this.setLvData();
+
+        this.cat_info_list = [];
+
+        for (let i = 0; i < this.vertical_count; i++) {
+            for (let k = 0; k < this.horizontal_count; k++) {
+                this.grid_num_list.push(i * 10000 + k);
+                this.grid_map.set(i * 10000 + k, 0);
+            }
+        }
+
+        GameUtil.randomRangeSort(this.grid_num_list);
+
+        let index = 0;
+
+
+        while (true) {
+            if (this.grid_num_list.length == 0) {
+                break;
+            }
+
+            GameUtil.randomRangeSort(this.dirs);
+
+            let flag = false;
+
+            if (GameUtil.randomRange(0, 100) < 50) {
+                for (let i = 0; i < 4; i++) {
+                    let id = this.grid_num_list[0];
+
+                    let id2 = this.getNextGrid(id, this.dirs[i]);
+
+                    if (id2 == -1) {
+                        continue;
+                    }
+
+                    if (this.grid_map.get(id2) == 1) {
+                        continue;
+                    }
+
+                    let info = new CatInfo();
+                    info.dir = this.dirs[i];
+                    info.now_grids.push(id);
+                    info.now_grids.push(id2);
+
+                    this.grid_map.set(id, 1);
+                    this.grid_map.set(id2, 1);
+
+                    GameUtil.deleteValue(this.grid_num_list, id);
+                    GameUtil.deleteValue(this.grid_num_list, id2);
+
+                    this.cat_info_list.push(info);
+
+                    flag = true;
+
+                    break;
+                }
+            }
+
+            if (flag == false) {
+                // console.warn("咋回事呀");
+                this.grid_num_list.shift();
+            }
+
+            index++;
+
+            if (index > 10000) {
+                break;
+            }
+        }
+
+
+        if (LocalData.lv == 1 && this.canAllCatOut() == false) {
+            this.randomCatInfos();
+        }
+
+        if (this.cat_info_list.length < 4) {
+            this.randomCatInfos();
+        }
+
+    }
+
+    public getNextGrid(id: number, dir: number) {
+        let i = Math.floor(id / 10000);
+        let k = id % 10000;
+
+        if (dir == DirectionType.up) {
+            k--;
+        }
+        else if (dir == DirectionType.down) {
+            k++;
+        }
+        else if (dir == DirectionType.left) {
+            i--;
+        }
+        else if (dir == DirectionType.right) {
+            i++;
+        }
+
+        let val = i * 10000 + k;
+
+        if (this.grid_map.has(val) == true) {
+            return val;
+        }
+        else {
+            return -1;
+        }
+    }
+
+    public updateUI() {
+        for (let i = 0; i < this.cat_info_list.length; i++) {
+            let cat = this.getCatNode(this.cat_info_list[i]);
+            cat.parent = this.catContainer;
+
+            cat.on(cc.Node.EventType.TOUCH_END, this.onClickCatNode, this)
+
+            this.cat_info_list[i].cat = cat;
+            cat.opacity = 0;
+        }
+    }
+
+    public getCatNode(info: CatInfo): cc.Node {
+
+        let node: cc.Node;
+
+        if (info.cat == null) {
+            node = cc.instantiate(PrefabUtil.get("CatItem"));
+
+            // console.warn("创建的羊---"+(<any>node)._id)
+        }
+        else {
+            node = info.cat;
+        }
+
+
+        let x = Math.floor(info.now_grids[0] / 10000);
+        let y = info.now_grids[0] % 10000;
+
+        x = (x * this.ww - this.ww / 2 * this.vertical_count) + this.ww / 2;
+
+        y = (this.ww / 2 * this.horizontal_count - y * this.ww) - this.ww / 2;
+
+        if (info.dir == DirectionType.up) {
+            y += this.ww / 2;
+            node.angle = 0
+
+        }
+        else if (info.dir == DirectionType.down) {
+            y -= this.ww / 2;
+
+            node.angle = 180
+        }
+        else if (info.dir == DirectionType.left) {
+            x -= this.ww / 2;
+
+            node.angle = 90
+        }
+        else if (info.dir == DirectionType.right) {
+            x += this.ww / 2;
+
+            node.angle = 270
+        }
+
+
+
+        node.x = x;
+        node.y = y;
+
+        return node;
+
+    }
+
+    public onClickCatNode(event: cc.Event.EventTouch) {
+        AudioMgr.playSound(AudioPath.SHEEP);
+        if (this.is_game_playing == false) {
+            return;
+        }
+
+        this.maskNode.active = false;
+        for (let i = 0; i < this.cat_info_list.length; i++) {
+            this.cat_info_list[i].cat.zIndex = 0;
+        }
+
+
+        //   console.warn("被点击的羊---"+(<any>event.target)._id)
+
+        for (let i = 0; i < this.cat_info_list.length; i++) {
+            //   console.warn("被查询的羊---"+(<any>this.yangs[i].cat)._id)
+
+            if (this.cat_info_list[i].cat == event.target) {
+                //  console.warn(this.yangs[i].grids[0]+"的羊被点击了");
+
+                if (this.fz_flag == true) {
+                    this.resetDirection2(this.cat_info_list[i]);
+                }
+                else {
+                    this.onMoveCat(this.cat_info_list[i]);
+                }
+
+                return;
+            }
+        }
+
+
+    }
+
+    //检测出来移动位置
+    public onMoveCat(info: CatInfo) {
+
+        for (let i = 0; i < info.now_grids.length; i++) {
+            this.grid_map.set(info.now_grids[i], 0);
+        }
+
+        let i = Math.floor(info.now_grids[0] / 10000);
+        let k = info.now_grids[0] % 10000;
+        if (info.move_tween && info.lastPosition) {
+            info.move_tween.stop()
+            info.cat.x = info.lastPosition.x;
+            info.cat.y = info.lastPosition.y;
+        }
+        info.lastPosition = new cc.Vec2(info.cat.x, info.cat.y)
+        const startX = info.cat.x;
+        const startY = info.cat.y;
+        let add = 0;
+        this.deleteStepCount()
+        if (info.dir == DirectionType.up) {
+            k -= 1;
+
+            while (true) {
+                add += 1;
+
+                if (k - add < 0) {
+                    add = 100;
+                    break;
+                }
+
+                if (this.grid_map.get(i * 10000 + (k - add)) == 1) {
+                    add -= 1;
+                    break;
+                }
+            }
+
+            if (add != 0) {
+                info.push_last();
+                this.old_cat_pos.push(info);
+            }
+
+            if (add == 100) {
+                //可以消失
+                info.move_tween = cc.tween(info.cat)
+                    .to(0.1, { y: info.cat.y + 15 })
+                    .to(5, { y: info.cat.y + 2000 })
+                    .call(() => {
+                        // console.warn("向上移出完成");
+                        info.move_tween = null;
+                        info.lastPosition = null;
+                    })
+                    .start();
+
+                this.removeCat(info);
+
+            }
+            else {
+                //碰撞
+                info.move_tween = cc.tween(info.cat)
+                    .to(0.1, { y: info.cat.y + 15 })
+                    .to(0.2 * add, { y: info.cat.y + 15 + this.ww * add })
+                    .delay(0.1)
+                    .to(0.1, { y: info.cat.y + 15 + this.ww * add - 15 })
+                    .call(() => {
+                        // console.warn("向上移出完成");
+                        info.move_tween = null;
+                        info.lastPosition = null;
+                    })
+                    .start();
+
+
+                for (let i = 0; i < info.now_grids.length; i++) {
+                    let a = Math.floor(info.now_grids[i] / 10000);
+                    let b = info.now_grids[i] % 10000;
+
+                    b = b - add;
+
+                    info.now_grids[i] = a * 10000 + b;
+
+                    this.grid_map.set(info.now_grids[i], 1);
+                }
+
+
+            }
+        }
+        else if (info.dir == DirectionType.down) {
+            k += 1;
+
+            while (true) {
+                add += 1;
+
+                if (k + add >= this.horizontal_count) {
+                    add = 100;
+                    break;
+                }
+
+                if (this.grid_map.get(i * 10000 + (k + add)) == 1) {
+                    add -= 1;
+                    break;
+                }
+            }
+
+            if (add != 0) {
+                info.push_last();
+                this.old_cat_pos.push(info);
+            }
+
+            if (add == 100) {
+
+                //可以消失
+                info.move_tween = cc.tween(info.cat)
+                    .to(0.1, { y: info.cat.y - 15 })
+                    .to(5, { y: info.cat.y - 2000 })
+                    .call(() => {
+                        // console.warn("向上移出完成");
+                        info.move_tween = null;
+                        info.lastPosition = null;
+
+                    })
+                    .start();
+
+                this.removeCat(info);
+
+            }
+            else {
+                //碰撞
+                info.move_tween = cc.tween(info.cat)
+                    .to(0.1, { y: info.cat.y - 15 })
+                    .to(0.2 * add, { y: info.cat.y - 15 - this.ww * add })
+                    .delay(0.1)
+                    .to(0.1, { y: info.cat.y - 15 - this.ww * add + 15 })
+                    .call(() => {
+                        // console.warn("向下移出完成");
+                        info.move_tween = null;
+                        info.lastPosition = null;
+                    })
+                    .start();
+
+
+                for (let i = 0; i < info.now_grids.length; i++) {
+                    let a = Math.floor(info.now_grids[i] / 10000);
+                    let b = info.now_grids[i] % 10000;
+
+                    b = b + add;
+
+                    info.now_grids[i] = a * 10000 + b;
+
+                    this.grid_map.set(info.now_grids[i], 1);
+                }
+
+            }
+        }
+        else if (info.dir == DirectionType.left) {
+            i -= 1;
+
+            while (true) {
+                add += 1;
+
+                if (i - add < 0) {
+                    add = 100;
+                    break;
+                }
+
+                if (this.grid_map.get((i - add) * 10000 + k) == 1) {
+                    add -= 1;
+                    break;
+                }
+            }
+
+            if (add != 0) {
+                info.push_last();
+                this.old_cat_pos.push(info);
+            }
+
+            if (add == 100) {
+                //可以消失
+                info.move_tween = cc.tween(info.cat)
+                    .to(0.1, { x: info.cat.x - 15 })
+                    .to(5, { x: info.cat.x - 2000 })
+                    .call(() => {
+                        // console.warn("向上移出完成");
+                        info.move_tween = null;
+                        info.lastPosition = null;
+                    })
+                    .start();
+
+                this.removeCat(info);
+            }
+            else {
+                //碰撞
+                info.move_tween = cc.tween(info.cat)
+                    .to(0.1, { x: info.cat.x - 15 })
+                    .to(0.2 * add, { x: info.cat.x - 15 - this.ww * add })
+                    .delay(0.1)
+                    .to(0.1, { x: info.cat.x - 15 - this.ww * add + 15 })
+                    .call(() => {
+                        // console.warn("向上移出完成");
+                        info.move_tween = null;
+                    })
+                    .start();
+
+
+                for (let i = 0; i < info.now_grids.length; i++) {
+
+                    let a = Math.floor(info.now_grids[i] / 10000);
+                    let b = info.now_grids[i] % 10000;
+
+                    a = a - add;
+
+                    info.now_grids[i] = a * 10000 + b;
+
+                    this.grid_map.set(info.now_grids[i], 1);
+                }
+
+
+            }
+        }
+        else if (info.dir == DirectionType.right) {
+            i += 1;
+
+            while (true) {
+                add += 1;
+
+                if (i + add >= this.vertical_count) {
+                    add = 100;
+                    break;
+                }
+
+                if (this.grid_map.get((i + add) * 10000 + k) == 1) {
+                    add -= 1;
+                    break;
+                }
+            }
+
+            if (add != 0) {
+                info.push_last();
+                this.old_cat_pos.push(info);
+            }
+
+            if (add == 100) {
+
+                //可以消失
+                info.move_tween = cc.tween(info.cat)
+                    .to(0.1, { x: info.cat.x + 15 })
+                    .to(5, { x: info.cat.x + 2000 })
+                    .call(() => {
+                        // console.warn("向上移出完成");
+                        info.move_tween = null;
+                        info.lastPosition = null;
+                    })
+                    .start();
+
+                this.removeCat(info);
+
+            }
+            else {
+                //碰撞
+                info.move_tween = cc.tween(info.cat)
+                    .to(0.1, { x: info.cat.x + 15 })
+                    .to(0.2 * add, { x: info.cat.x + 15 + this.ww * add })
+                    .delay(0.1)
+                    .to(0.1, { x: info.cat.x + 15 + this.ww * add - 15 })
+                    .call(() => {
+                        // console.warn("向下移出完成");
+                        info.move_tween = null;
+                        info.lastPosition = null;
+                    })
+                    .start();
+
+
+                for (let i = 0; i < info.now_grids.length; i++) {
+                    let a = Math.floor(info.now_grids[i] / 10000);
+                    let b = info.now_grids[i] % 10000;
+
+                    a = a + add;
+
+                    info.now_grids[i] = a * 10000 + b;
+
+                    this.grid_map.set(info.now_grids[i], 1);
+                }
+
+            }
+        }
+
+    }
+
+    public removeCat(info: CatInfo) {
+        for (let i = 0; i < this.cat_info_list.length; i++) {
+            if (this.cat_info_list[i] == info) {
+                // console.warn("删除的羊---" + (<any>this.cat_info_list[i].cat)._id)
+
+                this.cat_info_list.splice(i, 1);
+            }
+        }
+    }
+
+    //检测展示
+    public checkShow() {
+        let arr = [];
+
+        let show_fw = this.node.convertToWorldSpaceAR(new cc.Vec2(0, 0));
+
+        let up = show_fw.y - this.showNode.height / 2;
+        let down = show_fw.y + this.showNode.height / 2;
+        let left = show_fw.x - this.showNode.width / 2;
+        let right = show_fw.x + this.showNode.width / 2;
+
+        for (let i = 0; i < this.cat_info_list.length; i++) {
+            let cat = this.cat_info_list[i];
+
+            let curr_pos = cat.cat.parent.convertToWorldSpaceAR(cat.cat.position);
+
+            if (curr_pos.x < left) {
+                arr.push(cat);
+                continue;
+            }
+
+            if (curr_pos.x > right) {
+                arr.push(cat);
+                continue;
+            }
+
+            if (curr_pos.y < up) {
+                arr.push(cat);
+                continue;
+            }
+
+            if (curr_pos.y > down) {
+                arr.push(cat);
+                continue;
+            }
+        }
+
+        for (let i = 0; i < arr.length; i++) {
+            for (let k = 0; k < this.cat_info_list.length; k++) {
+                if (this.cat_info_list[k] == arr[i]) {
+                    this.cat_info_list[k].cat.parent = null;
+
+                    for (let a = 0; a < this.cat_info_list[k].now_grids.length; a++) {
+                        this.grid_map.set(this.cat_info_list[k].now_grids[a], 0);
+                    }
+
+                    //   console.warn("不展示的羊---"+(<any>this.yangs[k].cat)._id)
+
+                    this.cat_info_list.splice(k, 1);
+
+                    break;
+                }
+            }
+        }
+
+
+        this.checkDirection();
+
+        for (let i = 0; i < this.cat_info_list.length; i++) {
+            let cat = this.cat_info_list[i];
+            cat.cat.scale = 0;
+            cat.cat.opacity = 255;
+
+            cc.tween(cat.cat)
+                .delay(GameUtil.randomRange(100, 1500) / 1000)
+                .to(0.5, { scale: 1 })
+                .start();
+        }
+
+        this.is_game_playing = true;
+        this.stepCount = this.cat_info_list.length + 20
+        this.updateStepStr()
+    }
+
+
+    //检测可以跑出去的羊
+    public chatCatIsOut(): Array<CatInfo> {
+        let arr: Array<CatInfo> = [];
+
+        for (let a = 0; a < this.cat_info_list.length; a++) {
+            let info = this.cat_info_list[a];
+
+            let i = Math.floor(info.now_grids[0] / 10000);
+            let k = info.now_grids[0] % 10000;
+
+            if (this.grid_map.get(info.now_grids[0]) == 0) {
+                continue;
+            }
+
+            let add = 0;
+
+            if (info.dir == DirectionType.up) {
+                k -= 1;
+
+                while (true) {
+                    add += 1;
+
+                    if (k - add < 0) {
+                        add = 100;
+                        break;
+                    }
+
+                    if (this.grid_map.get(i * 10000 + (k - add)) == 1) {
+                        add -= 1;
+                        break;
+                    }
+                }
+
+                if (add == 100) {
+                    arr.push(info);
+                }
+
+            }
+            else if (info.dir == DirectionType.down) {
+                k += 1;
+
+                while (true) {
+                    add += 1;
+
+                    if (k + add >= this.horizontal_count) {
+                        add = 100;
+                        break;
+                    }
+
+                    if (this.grid_map.get(i * 10000 + (k + add)) == 1) {
+                        add -= 1;
+                        break;
+                    }
+                }
+
+                if (add == 100) {
+                    arr.push(info);
+                }
+
+            }
+            else if (info.dir == DirectionType.left) {
+                i -= 1;
+
+                while (true) {
+                    add += 1;
+
+                    if (i - add < 0) {
+                        add = 100;
+                        break;
+                    }
+
+                    if (this.grid_map.get((i - add) * 10000 + k) == 1) {
+                        add -= 1;
+                        break;
+                    }
+                }
+
+                if (add == 100) {
+                    arr.push(info);
+
+                }
+
+            }
+            else if (info.dir == DirectionType.right) {
+                i += 1;
+
+                while (true) {
+                    add += 1;
+
+                    if (i + add >= this.vertical_count) {
+                        add = 100;
+                        break;
+                    }
+
+                    if (this.grid_map.get((i + add) * 10000 + k) == 1) {
+                        add -= 1;
+                        break;
+                    }
+                }
+
+                if (add == 100) {
+                    arr.push(info);
+                }
+            }
+        }
+
+        return arr;
+    }
+
+
+    public canAllCatOut() {
+
+        let jilu: Array<number> = [];
+
+        while (true) {
+            let aa = this.chatCatIsOut();
+
+            if (aa.length == 0) {
+                // console.error("不可全部消除");
+                break;
+            }
+
+            for (let i = 0; i < aa.length; i++) {
+                for (let k = 0; k < aa[i].now_grids.length; k++) {
+                    jilu.push(aa[i].now_grids[k]);
+                    this.grid_map.set(aa[i].now_grids[k], 0);
+                }
+            }
+
+            if (jilu.length == this.cat_info_list.length * 2) {
+                // console.error("可以全部消除")
+
+                for (let i = 0; i < jilu.length; i++) {
+                    this.grid_map.set(jilu[i], 1);
+                }
+
+                return true;
+            }
+        }
+
+        return false;
+
+    }
+
+
+    //撤回
+    public onClickRevoke() {
+        this.is_game_playing = false
+        Plat.showRewardVideo((success: boolean) => {
+            this.is_game_playing = true;
+            if (success) {
+                if (this.old_cat_pos.length == 0) {
+                    TipsUI.inst.showTips("没有可撤回的操作");
+                    return;
+                }
+
+                let info = this.old_cat_pos.pop();
+
+                if (info.move_tween != null) {
+                    info.move_tween.stop();
+                }
+
+                for (let i = 0; i < info.now_grids.length; i++) {
+                    this.grid_map.set(info.now_grids[i], 0);
+                }
+
+                info.revoke();
+
+                for (let i = 0; i < info.now_grids.length; i++) {
+                    this.grid_map.set(info.now_grids[i], 1);
+                }
+
+                info.cat = this.getCatNode(info);
+
+                if (this.cat_info_list.indexOf(info) == -1) {
+                    this.cat_info_list.push(info);
+                }
+            }
+        })
+    }
+
+    //高亮
+    public onClickLightCat() {
+        this.is_game_playing = false;
+        Plat.showRewardVideo((success: boolean) => {
+            this.is_game_playing = true;
+            if (success) {
+                let arr = this.chatCatIsOut();
+
+                if (arr.length == 0) {
+                    TipsUI.inst.showTips("没有可消除的动物");
+                    return;
+                }
+
+                this.maskNode.active = true;
+
+                this.maskNode.zIndex = 99;
+
+                for (let i = 0; i < arr.length; i++) {
+                    arr[i].cat.zIndex = 100;
+                }
+            }
+        })
+    }
+
+    public fz_flag = false;
+    public onClickResetDirection() {
+        this.is_game_playing = false
+        Plat.showRewardVideo((success: boolean) => {
+            this.is_game_playing = true
+            if (success) {
+                if (this.cat_info_list.length == 0) {
+                    return;
+                }
+
+                this.buttonsNode.active = false;
+
+                this.fz_flag = true;
+
+                this.selectNode.active = true;
+
+                for (let i = 0; i < this.cat_info_list.length; i++) {
+                    this.cat_info_list[i].cat.zIndex = 100;
+                }
+            }
+        })
+
+    }
+
+    public onClickAddTime() {
+        this.time += 60;
+        this.updateTimeLabel();
+        this.is_game_playing = true
+    }
+
+    public resetDirection2(info: CatInfo) {
+        if (this.cat_info_list.length == 0) {
+            return;
+        }
+
+        this.buttonsNode.active = true;
+
+        this.fz_flag = false;
+
+        this.selectNode.active = false;
+
+        this.resetDirection3(info);
+    }
+
+    public resetDirection3(info: CatInfo) {
+        info.dir = (info.dir - 1 + 2) % 4 + 1;
+        info.now_grids.reverse();
+
+        info.cat = this.getCatNode(info);
+    }
+
+    public time = 240;
+
+    private onTimerUpdate() {
+        if (this.is_game_playing == false) {
+            return;
+        }
+
+        if (this.is_game_pause == true) {
+            return;
+        }
+
+        this.time--;
+        if (this.time < 0) {
+            //游戏失败
+            this.is_game_playing = false;
+
+            setTimeout(() => {
+
+                // FailUI.inst.showUI();
+                this.onTimeOver()
+            }, 1000);
+
+            //弹窗
+            return;
+        }
+
+        this.updateTimeLabel();
+    }
+
+    public updateTimeLabel() {
+        let tt = Math.floor(this.time / 60);
+
+        let ss = this.time % 60;
+
+        this.timerLabel.string = "0" + tt + ":" + (ss < 10 ? "0" + ss : ss);
+
+    }
+
+    private checkDirection() {
+
+        let map: Map<number, Array<CatInfo>> = new Map();
+
+        let map2: Map<number, Array<CatInfo>> = new Map();
+
+        for (let i = 0; i < this.cat_info_list.length; i++) {
+            let info = this.cat_info_list[i];
+
+            if (info.dir == DirectionType.left || info.dir == DirectionType.right) {
+                let g = Math.floor(info.now_grids[0] % 10000);
+
+                if (info.dir == DirectionType.right) {
+                    this.resetDirection3(info);
+                }
+
+                if (map.has(g) == false) {
+                    map.set(g, new Array());
+                }
+
+                map.get(g).push(info);
+            }
+            else {
+
+                if (info.dir == DirectionType.down) {
+                    this.resetDirection3(info);
+                }
+
+                let g = Math.floor(info.now_grids[0] / 10000);
+
+                if (map2.has(g) == false) {
+                    map2.set(g, new Array());
+                }
+
+                map2.get(g).push(info);
+
+            }
+        }
+
+        map.forEach((val: Array<CatInfo>, key) => {
+
+            val.sort((v1, v2) => {
+
+                let a1 = Math.floor(v1.now_grids[0] / 10000);
+                let a2 = Math.floor(v2.now_grids[0] / 10000);
+
+                return a1 - a2;
+            })
+
+            let index = GameUtil.randomRange(0, val.length + 1);
+
+            for (let i = index; i < val.length; i++) {
+                this.resetDirection3(val[i]);
+            }
+
+
+        });
+
+        map2.forEach((val: Array<CatInfo>, key) => {
+
+            val.sort((v1, v2) => {
+
+                let a1 = Math.floor(v1.now_grids[0] % 10000);
+                let a2 = Math.floor(v2.now_grids[0] % 10000);
+
+                return a1 - a2;
+            })
+
+            let index = GameUtil.randomRange(0, val.length + 1);
+
+            for (let i = index; i < val.length; i++) {
+                this.resetDirection3(val[i]);
+            }
+
+        });
+    }
+
+    public update() {
+        if (this.is_game_playing == true) {
+            if (this.cat_info_list.length == 0) {
+                this.is_game_playing = false;
+
+                this.onGameOver();
+            }
+        }
+    }
+
+    private onGameOver() {
+        LocalData.lv++;
+
+        setTimeout(() => {
+            AudioMgr.playSound(AudioPath.LEVELUP);
+            WinUI.inst.showUI();
+
+        }, 1000);
+    }
+
+    public onClickPause() {
+        this.is_game_pause = true;
+        AudioMgr.playSound(AudioPath.CLICK);
+        PauseUI.inst.showUI();
+    }
+
+
+}

+ 10 - 0
assets/code/uis/GameUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "5e091b5c-9720-4de2-b7e3-33bb5f136b13",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 83 - 0
assets/code/uis/HomeUI.ts

@@ -0,0 +1,83 @@
+const {ccclass, property} = cc._decorator;
+import PrefabUtil from '../utils/manager/PrefabUtil';
+import UIbase from '../utils/UIbase';
+import GameUI from './GameUI';
+import Plat from '../utils/Palt';
+import SettingUI from './SettingUI';
+import ShopUI from './ShopUI';
+import rankUI from './rankUI';
+import AudioMgr from '../manager/AudioMgr';
+import AudioPath from '../datas/AudioPath';
+
+
+@ccclass
+export default class HomeUI extends UIbase {
+
+    private static _inst:HomeUI;
+
+    public static get inst()
+    {
+        if(this._inst==null)
+        {
+            let v=cc.instantiate(PrefabUtil.get("HomeUI"));
+
+            this._inst=v.getComponent(HomeUI);
+        }
+
+        return this._inst;
+    }
+
+    protected onShow(): void {
+        Plat.showInterstitialAd();
+        Plat.showBanner();
+        AudioMgr.playBgm();
+    }
+
+    protected onHide(): void {
+        Plat.hideBanner()
+    }
+
+    public onClickStartGame()
+    {
+        this.hideUI();
+        GameUI.inst.onStartGame();
+        AudioMgr.playSound(AudioPath.CLICK);
+    }
+    
+
+    public onClickShare()
+    {
+       Plat.shareAppMessage();
+       AudioMgr.playSound(AudioPath.CLICK);
+    }
+
+    public onClickRank()
+    {
+        rankUI.inst.showUI();
+        AudioMgr.playSound(AudioPath.CLICK);
+    }
+
+    public onClickSettingBtn()
+    {
+        SettingUI.inst.showUI();
+        AudioMgr.playSound(AudioPath.CLICK);
+    }
+
+    onClickShop(){
+        ShopUI.inst.showUI();
+        AudioMgr.playSound(AudioPath.CLICK);
+    }
+
+    public onJump(event,appid)
+    {
+         if(Plat.pt.navigateToMiniProgram!=null)
+         {
+            Plat.pt.navigateToMiniProgram({
+                "appId":appid
+            });
+         }
+    }
+
+    
+
+}

+ 10 - 0
assets/code/uis/HomeUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "4cb83071-ce4d-4137-b487-f52c8390f81c",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 122 - 0
assets/code/uis/Load.ts

@@ -0,0 +1,122 @@
+import Plat from "../utils/Palt";
+import SubLoad from "../utils/SubLoad";
+import PrefabUtil from "../utils/manager/PrefabUtil";
+import Log from "../utils/util/Log";
+
+
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export class Load extends cc.Component {
+
+    @property(cc.Sprite)
+    progressBar: cc.Sprite = null;
+
+    @property(cc.Label)
+    gameVersion: cc.Label = null;
+
+    @property(cc.Label)
+    progressLabel: cc.Label = null;
+
+    @property(cc.Sprite)
+    next: cc.Sprite = null;
+
+
+    onLoad() {
+
+        // console.log("第一个脚本--加载脚本--这里执行了哈哈哈111");
+
+        // this.gameVersion.string="v_"+Log.game_version+(Log.test==true?"_测试":"");
+
+        //   cc.sys.localStorage.clear();
+
+        //  cc.debug.setDisplayStats(false);
+
+        this.flags[0] = 0;
+
+        this.scheduleOnce(this.startLoad, 0.2);
+
+
+    }
+
+
+    private flags: Array<number> = new Array();
+    public onnext() {
+        console.log(123123);
+
+    }
+    public startLoad() {
+        SubLoad.loadSub(() => {
+
+
+            PrefabUtil.load((() => {
+
+                // console.warn("预制体全部加载完成");
+
+                cc.director.preloadScene("Main", () => {
+
+                    // Log.info("main场景预加载成功") 
+
+                    this.flags[0] = 1;
+
+                });
+
+
+            }));
+
+
+        })
+
+        Plat.init();
+
+
+
+        // Log.info("---加载开始---")
+
+
+    }
+
+    private p = 40;
+
+    private frame_ok: boolean = false;
+
+    update() {
+
+        this.p += 0.5;
+
+        if (this.p > 98) {
+            this.p = 98;
+        }
+
+        if (this.p < 10) {
+            this.p = 10;
+        }
+
+        // this.progressBar.node.width = 500 * this.p / 100;
+
+        this.progressLabel.string = "加载资源中... " + Math.floor(this.p) + "%";
+
+
+        if (this.p > 90 && this.frame_ok == false) {
+
+            for (var key in this.flags) {
+                if (this.flags[key] != 1) {
+                    return;
+                }
+            }
+
+            cc.director.loadScene("Main", () => {
+
+                // Log.info("main场景加载成功")
+            });
+
+
+            this.frame_ok = true;
+        }
+
+
+    }
+
+}
+

+ 10 - 0
assets/code/uis/Load.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "21e51e8a-dbdf-4610-8ca5-2854760070b9",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 113 - 0
assets/code/uis/LoginDog.ts

@@ -0,0 +1,113 @@
+import Plat from "../utils/Palt";
+import SubLoad from "../utils/SubLoad";
+import PrefabUtil from "../utils/manager/PrefabUtil";
+import Log from "../utils/util/Log";
+
+
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export class LoginDog extends cc.Component {
+
+
+    onLoad() {
+
+        // console.log("第一个脚本--加载脚本--这里执行了哈哈哈111");
+
+        // this.gameVersion.string="v_"+Log.game_version+(Log.test==true?"_测试":"");
+
+        //   cc.sys.localStorage.clear();
+
+        //  cc.debug.setDisplayStats(false);
+
+        this.flags[0] = 0;
+
+        this.scheduleOnce(this.startLoad, 0.2);
+
+
+    }
+
+
+    private flags: Array<number> = new Array();
+    public onnext() {
+        console.log(123123);
+
+    }
+    public startLoad() {
+        SubLoad.loadSub(() => {
+
+
+            PrefabUtil.load((() => {
+
+                // console.warn("预制体全部加载完成");
+
+                cc.director.preloadScene("Main", () => {
+
+                    // Log.info("main场景预加载成功") 
+
+                    this.flags[0] = 1;
+
+                });
+
+
+            }));
+
+
+        })
+
+        Plat.init();
+
+
+
+        // Log.info("---加载开始---")
+
+
+    }
+
+    private p = 40;
+
+    private frame_ok: boolean = false;
+
+    update() {
+
+        this.p += 0.5;
+
+        if (this.p > 98) {
+            this.p = 98;
+        }
+
+        if (this.p < 10) {
+            this.p = 10;
+        }
+
+
+
+        if (this.p > 90 && this.frame_ok == false) {
+
+            for (var key in this.flags) {
+                if (this.flags[key] != 1) {
+                    return;
+                }
+            }
+
+            console.log("================")
+            this.frame_ok = true;
+        }
+
+
+    }
+
+    onClickInGame() {
+        if (!this.frame_ok) {
+            return;
+        }
+        cc.director.loadScene("Main", () => {
+
+            // Log.info("main场景加载成功")
+        });
+
+    }
+
+}
+

+ 10 - 0
assets/code/uis/LoginDog.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "81b5f1eb-ab4c-463c-8c3e-ad038fd056ce",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 118 - 0
assets/code/uis/PauseUI.ts

@@ -0,0 +1,118 @@
+// Created by carolsail
+import UIbase from '../utils/UIbase';
+import LocalData from '../manager/LocalData';
+import PrefabUtil from '../utils/manager/PrefabUtil';
+import AudioMgr from '../manager/AudioMgr';
+import AudioPath from '../datas/AudioPath';
+import GameUI from './GameUI';
+import HomeUI from './HomeUI';
+import Plat from '../utils/Palt';
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class PauseUI extends UIbase {
+
+
+    private static _inst:PauseUI;
+
+    public static get inst()
+    {
+        if(this._inst==null  || this._inst.node==null)
+        {
+            let v=cc.instantiate(PrefabUtil.get("PauseUI"));
+
+            this._inst=v.getComponent(PauseUI);
+        }
+
+        return this._inst;
+    }
+
+    @property(cc.Sprite)
+    musicSprite: cc.Sprite = null
+
+    @property(cc.Sprite)
+    soundSprite: cc.Sprite = null
+
+    // @property(cc.Node)
+    // btnClose: cc.Node = null
+
+    @property(cc.SpriteFrame)
+    openFrame: cc.SpriteFrame = null
+
+    @property(cc.SpriteFrame)
+    closeFrame: cc.SpriteFrame = null
+
+
+    start() {
+       
+        this.updateMusic();
+        this.updateSound();
+    }
+
+    protected onShow(): void {
+        Plat.showBanner()
+    }
+
+    protected onHide(): void {
+        Plat.hideBanner()
+    }
+
+    onClickClose() {
+        AudioMgr.playSound(AudioPath.CLICK)
+      
+        this.hideUI();
+    }
+
+    onClickSound()
+     {
+        AudioMgr.playSound(AudioPath.CLICK)
+        LocalData.yx =  !LocalData.yx
+
+        this.updateSound()
+    }
+
+    onClickMusic() {
+        AudioMgr.playSound(AudioPath.CLICK)
+
+        LocalData.yy =  !LocalData.yy
+
+        if ( LocalData.yy==true)
+         {
+            AudioMgr.playBgm();
+        }
+         else 
+         {
+            AudioMgr.stopBgm();
+        }
+        
+
+        this.updateMusic()
+    }
+
+    updateMusic() {
+        this.musicSprite.spriteFrame = LocalData.yy==true?this.openFrame:this.closeFrame
+     
+    }
+
+    updateSound() {
+        this.soundSprite.spriteFrame = LocalData.yx==true?this.openFrame:this.closeFrame
+    }
+    
+
+    onClickHome()
+    {
+          this.hideUI();
+
+          HomeUI.inst.showUI();
+    }
+
+
+    onClickResume()
+    {
+        GameUI.inst.is_game_pause=false;
+
+        this.hideUI();
+    }
+
+}

+ 10 - 0
assets/code/uis/PauseUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "f391a6d3-9ead-49c6-91da-4238380f9f2d",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 94 - 0
assets/code/uis/SettingUI.ts

@@ -0,0 +1,94 @@
+// Created by carolsail
+import UIbase from '../utils/UIbase';
+import LocalData from '../manager/LocalData';
+import PrefabUtil from '../utils/manager/PrefabUtil';
+import AudioMgr from '../manager/AudioMgr';
+import AudioPath from '../datas/AudioPath';
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class SettingUI extends UIbase {
+
+
+    private static _inst:SettingUI;
+
+    public static get inst()
+    {
+        if(this._inst==null  || this._inst.node==null)
+        {
+            let v=cc.instantiate(PrefabUtil.get("SettingUI"));
+
+            this._inst=v.getComponent(SettingUI);
+        }
+
+        return this._inst;
+    }
+
+
+    @property(cc.Sprite)
+    musicSprite: cc.Sprite = null
+
+    @property(cc.Sprite)
+    soundSprite: cc.Sprite = null
+
+    // @property(cc.Node)
+    // btnClose: cc.Node = null
+
+    @property(cc.SpriteFrame)
+    openFrame: cc.SpriteFrame = null
+
+    @property(cc.SpriteFrame)
+    closeFrame: cc.SpriteFrame = null
+
+
+    start() {
+       
+        this.updateMusic();
+        this.updateSound();
+    }
+
+
+
+    onClickClose() {
+        AudioMgr.playSound(AudioPath.CLICK)
+      
+        this.hideUI();
+    }
+
+    onClickSound()
+     {
+        AudioMgr.playSound(AudioPath.CLICK)
+        LocalData.yx =  !LocalData.yx
+
+        this.updateSound()
+    }
+
+    onClickMusic() {
+        AudioMgr.playSound(AudioPath.CLICK)
+
+        LocalData.yy =  !LocalData.yy
+
+        if ( LocalData.yy==true)
+         {
+            AudioMgr.playBgm();
+        }
+         else 
+         {
+            AudioMgr.stopBgm();
+        }
+        
+
+        this.updateMusic()
+    }
+
+    updateMusic() {
+        this.musicSprite.spriteFrame = LocalData.yy==true?this.openFrame:this.closeFrame
+     
+    }
+
+    updateSound() {
+        this.soundSprite.spriteFrame = LocalData.yx==true?this.openFrame:this.closeFrame
+    }
+
+}

+ 10 - 0
assets/code/uis/SettingUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "d27066e6-6317-4c94-986a-670eb57808c0",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 67 - 0
assets/code/uis/ShopSkinItem.ts

@@ -0,0 +1,67 @@
+// 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 { DataMgr } from "../manager/DataMgr";
+import Plat from "../utils/Palt";
+import PrefabUtil from "../utils/manager/PrefabUtil";
+import ShopUI from "./ShopUI";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class ShopSkinItem extends cc.Component {
+
+    @property(cc.Sprite)
+    sprite: cc.Sprite = null;
+    @property(cc.Node)
+    lockNode: cc.Node = null;
+    @property(cc.Node)
+    useNode: cc.Node = null;
+    @property(cc.Node)
+    usingNode: cc.Node = null;
+    @property(cc.Integer)
+    id: number = 0
+    setData() {
+        cc.resources.load("/cat/cat_skin_" + this.id, cc.SpriteFrame, (error, frame) => {
+            this.sprite.spriteFrame = frame
+        })
+        const isUnlock = DataMgr.ins.isUnlockSkin(this.id)
+        this.usingNode.active = false
+        this.useNode.active = false;
+        this.lockNode.active = false;
+        if (!isUnlock) {
+            this.useNode.active = false;
+            this.lockNode.active = true;
+        } else {
+            this.lockNode.active = false;
+            const isuse = DataMgr.ins.isUseSkin(this.id);
+            if (isuse) {
+                this.useNode.active = false
+                this.usingNode.active = true
+            } else {
+                this.useNode.active = true
+                this.usingNode.active = false
+            }
+        }
+    }
+
+    onClickUnlock() {
+        //todo ad
+        Plat.showRewardVideo((success: boolean) => {
+            if (success) {
+                DataMgr.ins.unlockSkin(this.id)
+                ShopUI.inst.updateNodesData()
+            }
+        })
+    }
+
+    onClickUse() {
+        DataMgr.ins.setSkin(this.id)
+        ShopUI.inst.updateNodesData()
+    }
+    // update (dt) {}
+}

+ 10 - 0
assets/code/uis/ShopSkinItem.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "660b69c2-1a57-42b0-83ed-152534ee1035",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 46 - 0
assets/code/uis/ShopUI.ts

@@ -0,0 +1,46 @@
+// 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 UIbase from "../utils/UIbase";
+import PrefabUtil from "../utils/manager/PrefabUtil";
+import ShopSkinItem from "./ShopSkinItem";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class ShopUI extends UIbase {
+
+    private static _inst: ShopUI;
+
+    public static get inst() {
+        if (this._inst == null) {
+            let v = cc.instantiate(PrefabUtil.get("ShopUI"));
+
+            this._inst = v.getComponent(ShopUI);
+        }
+
+        return this._inst;
+    }
+
+    @property([cc.Node])
+    nodes: cc.Node[] = [];
+
+    protected start(): void {
+
+    }
+
+    protected onEnable(): void {
+        this.updateNodesData()
+    }
+
+    updateNodesData() {
+        this.nodes.forEach(item => {
+            item.getComponent(ShopSkinItem).setData()
+        })
+    }
+    // update (dt) {}
+}

+ 10 - 0
assets/code/uis/ShopUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "247dbeb1-9fc4-4778-a661-e0b9aeb02f62",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 57 - 0
assets/code/uis/StepOverUI.ts

@@ -0,0 +1,57 @@
+// 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 Plat from "../utils/Palt";
+import UIbase from "../utils/UIbase";
+import PrefabUtil from "../utils/manager/PrefabUtil";
+import FailUI from "./FailUI";
+import GameUI from "./GameUI";
+
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+export default class StepOverUI extends UIbase {
+
+    private static _inst: StepOverUI;
+
+    public static get inst() {
+        if (this._inst == null) {
+            let v = cc.instantiate(PrefabUtil.get("StepOverUI"));
+
+            this._inst = v.getComponent(StepOverUI);
+        }
+
+        return this._inst;
+    }
+
+    start () {
+
+    }
+
+    protected onShow(): void {
+        Plat.showBanner()
+    }
+
+    protected onHide(): void {
+        Plat.hideBanner()
+    }
+
+    onClickAdd(){
+        Plat.showRewardVideo((success:boolean)=>{
+            if(success){
+                GameUI.inst.addStepCount()
+                this.hideUI()
+            }
+        })
+    }
+
+    onClickCancel(){
+        this.hideUI()
+        FailUI.inst.showUI();
+    }
+
+}

+ 10 - 0
assets/code/uis/StepOverUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "c32845f4-f10f-4dae-beb0-34170744eb5a",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 56 - 0
assets/code/uis/TimeOverUI.ts

@@ -0,0 +1,56 @@
+// 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 Plat from "../utils/Palt";
+import UIbase from "../utils/UIbase";
+import PrefabUtil from "../utils/manager/PrefabUtil";
+import FailUI from "./FailUI";
+import GameUI from "./GameUI";
+
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+export default class TimeOverUI extends UIbase {
+
+    private static _inst: TimeOverUI;
+
+    public static get inst() {
+        if (this._inst == null) {
+            let v = cc.instantiate(PrefabUtil.get("TimeOverUI"));
+
+            this._inst = v.getComponent(TimeOverUI);
+        }
+
+        return this._inst;
+    }
+
+    start () {
+
+    }
+    protected onShow(): void {
+        Plat.showBanner()
+    }
+
+    protected onHide(): void {
+        Plat.hideBanner()
+    }
+
+    onClickAdd(){
+        Plat.showRewardVideo((success:boolean)=>{
+            if(success){
+                GameUI.inst.onClickAddTime()
+                this.hideUI()
+            }
+        })
+    }
+
+    onClickCancel(){
+        this.hideUI()
+        FailUI.inst.showUI();
+    }
+
+}

+ 10 - 0
assets/code/uis/TimeOverUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "e0baa403-7936-4520-89aa-1c262eb20713",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 61 - 0
assets/code/uis/TipsUI.ts

@@ -0,0 +1,61 @@
+const {ccclass, property} = cc._decorator;
+import PrefabUtil from '../utils/manager/PrefabUtil';
+import UIbase from '../utils/UIbase';
+
+
+@ccclass
+export default class TipsUI extends UIbase {
+
+    private static _inst:TipsUI;
+
+    public static get inst()
+    {
+        if(this._inst==null)
+        {
+            let v=cc.instantiate(PrefabUtil.get("TipsUI"));
+
+            this._inst=v.getComponent(TipsUI);
+        }
+
+        return this._inst;
+    }
+
+    @property(cc.Label)
+    tipsLabel:cc.Label=null;  //计时器
+
+    private tw:cc.Tween;
+
+    public showTips( str:string)
+    {
+
+        this.tipsLabel.string=str;
+
+        this.showUI();
+
+        this.node.zIndex=9999;
+        this.node.x=cc.winSize.width/2;
+        this.node.y=cc.winSize.height/2-40;
+        this.node.opacity=0;
+
+
+        if(this.tw ==null)
+        {
+            this.tw  = cc.tween(this.node)
+            .to(0.3,{opacity:255,y:cc.winSize.height/2})
+            .delay(1)
+            .to(0.3,{opacity:0,y:cc.winSize.height/2+40})
+            .call(()=>{
+                this.hideUI();
+            })
+            .start();
+        }
+        else
+        {
+            this.tw.stop();
+            this.tw.start();
+        }
+      
+    }
+
+
+}

+ 10 - 0
assets/code/uis/TipsUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "6c8f28fb-f5a0-4e0f-bb44-af13e3b9539d",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 64 - 0
assets/code/uis/WinUI.ts

@@ -0,0 +1,64 @@
+const {ccclass, property} = cc._decorator;
+import AudioPath from '../datas/AudioPath';
+import AudioMgr from '../manager/AudioMgr';
+import { DataMgr } from '../manager/DataMgr';
+import PrefabUtil from '../utils/manager/PrefabUtil';
+import Plat from '../utils/Palt';
+import UIbase from '../utils/UIbase';
+import GameUI from './GameUI';
+
+
+@ccclass
+export default class WinUI extends UIbase {
+
+    private static _inst:WinUI;
+
+    public static get inst()
+    {
+        if(this._inst==null)
+        {
+            let v=cc.instantiate(PrefabUtil.get("WinUI"));
+
+            this._inst=v.getComponent(WinUI);
+        }
+
+        return this._inst;
+    }
+
+    @property(cc.Sprite)
+    cat: cc.Sprite = null;
+
+    public showUI(data?: any): void {
+        super.showUI(data)
+        const id = DataMgr.ins.getRandomId();
+        cc.resources.load("/cat/cat_skin_" + id, cc.SpriteFrame, (error, frame) => {
+            this.cat.spriteFrame = frame
+        })
+    }
+
+    protected onShow(): void {
+        Plat.showBanner()
+        Plat.showInterstitialAd()
+    }
+
+    protected onHide(): void {
+        Plat.hideBanner()
+    }
+
+    
+    public onClickStartGame()
+    {
+        this.hideUI();
+        GameUI.inst.onStartGame();
+        AudioMgr.playSound(AudioPath.CLICK);
+    }
+
+    public onClickShare()
+    {
+        Plat.shareAppMessage();
+        AudioMgr.playSound(AudioPath.CLICK);
+    }
+   
+    
+
+}

+ 10 - 0
assets/code/uis/WinUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "362d0864-3bc7-49cc-b0e7-3e34c122722b",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 41 - 0
assets/code/uis/rankUI.ts

@@ -0,0 +1,41 @@
+// 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 { DataMgr } from "../manager/DataMgr";
+import LocalData from "../manager/LocalData";
+import Plat from "../utils/Palt";
+import UIbase from "../utils/UIbase";
+import PrefabUtil from "../utils/manager/PrefabUtil";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class rankUI extends UIbase {
+
+    private static _inst: rankUI;
+
+    public static get inst() {
+        if (this._inst == null) {
+            let v = cc.instantiate(PrefabUtil.get("rankUI"));
+
+            this._inst = v.getComponent(rankUI);
+        }
+
+        return this._inst;
+    }
+
+    @property(cc.SubContextView)
+    view: cc.SubContextView = null;
+
+    public showUI(data?: any): void {
+        super.showUI(data)
+        Plat.setRank(LocalData.lv)
+        Plat.updateRank()
+    }
+
+    // update (dt) {}
+}

+ 10 - 0
assets/code/uis/rankUI.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "5bcfec6e-6a4f-447c-9f0a-2f500c91b046",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/code/utils.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "62a06ea1-a642-4af6-aeac-7b2055eb4b3b",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 332 - 0
assets/code/utils/Palt.ts

@@ -0,0 +1,332 @@
+
+import Log from "./util/Log";
+import GameUtil from "./util/GameUtil";
+
+export default class Plat {
+
+    public static screenWidth = 750;
+    public static screenHeight = 1334;
+
+    public static userinfo: any = null;
+
+
+    public static plat_name = "cocos";
+
+    public static pt: any = {};
+
+
+    //记录一些微信数据
+    public static code: string = "";
+    public static sessionKey: string = "";
+
+    public static isWX(): boolean {
+        return this.plat_name == "wx";
+    }
+
+
+    public static isCocos() {
+        return this.plat_name == "cocos";
+    }
+
+    public static getGameName() {
+        return this.plat_name + "_hwdfk";  //好玩的方块
+    }
+
+
+    public static init() {
+
+        // Log.warn("平台初始化123");
+
+        let info: any = {};
+        info.nickName = "临时玩家" + GameUtil.randomRange(1, 1000);
+        info.avatarUrl = "res/1.png";
+
+        this.userinfo = info;
+
+
+        if (cc.sys.platform == cc.sys.WECHAT_GAME) {
+
+            // Log.warn("微信平台初始化");
+
+
+            this.plat_name = "wx";
+            this.pt = wx;
+
+            wx.showShareMenu({
+                menus: ['shareAppMessage', "shareTimeline"],
+                //  withShareTicket:true
+            })
+
+            wx.onShareAppMessage(function () {
+                return {
+                    title: '你能救救小猫吗?',
+                    imageUrl: ""
+                }
+            })
+
+
+            if (wx.onShareTimeline != null) {
+                wx.onShareTimeline(function () {
+                    return {
+                        title: '你能救救小猫吗?',
+                        imageUrl: ""
+                    }
+                })
+            }
+
+            this.initAds()
+        }
+
+
+        //注册显示回调
+        if (this.pt.onShow != null) {
+            this.pt.onShow(this.onshow);
+        }
+
+
+        //屏幕尺寸设置
+        if (this.pt.getSystemInfoSync) {
+
+            let system = this.pt.getSystemInfoSync();
+
+            this.screenWidth = system.screenWidth;
+            this.screenHeight = system.screenHeight;
+
+            //  console.warn("屏幕宽:"+system.screenWidth);
+            //  console.warn("屏幕高:"+system.screenHeight);
+        }
+    }
+
+
+
+    private static fun_obj: any;
+    private static share_obj: any;
+
+    public static setShareCallback(obj: any, fun: any) {
+        Plat.share_obj = obj;
+        Plat.fun_obj = fun;
+    }
+
+
+    public static state = 0;
+    //显示回调
+    public static onshow(res) {
+        // Log.warn("onshow-----")
+
+        // Log.error(res)
+
+
+        if (Plat.fun_obj != null) {
+            Plat.fun_obj.call(Plat.share_obj);
+
+            Plat.fun_obj = null;
+            Plat.share_obj = null;
+        }
+
+        if (this.state == 0) {
+            //   AdInterstitial.show();
+        }
+
+        this.state = 0;
+    }
+
+    //显示回调
+    public static getLaunchOptionsSync(res) {
+        // Log.warn("getLaunchOptionsSync-----")
+
+        // Log.error(res)
+
+    }
+
+    public static showToast(str, jg = 2000) {
+        if (this.pt.showToast != null) {
+            this.pt.showToast({
+                title: str,
+                content: str,
+                message: str,
+                icon: 'none',
+                duration: jg
+            })
+        }
+    }
+
+    public static hideToast() {
+        if (this.pt.hideToast != null) {
+            this.pt.hideToast({
+
+            })
+        }
+    }
+
+    public static shareAppMessage() {
+
+        Plat.state = 1;
+
+        if (this.pt.shareAppMessage == null) {
+            if (Plat.fun_obj != null) {
+                Plat.fun_obj.call(Plat.share_obj);
+
+                Plat.fun_obj = null;
+                Plat.share_obj = null;
+            }
+
+            return;
+        };
+
+        this.pt.shareAppMessage({
+            title: '你能救救小猫吗?',
+            imageUrl: "",
+            desc: "-_-来玩玩吧"
+        })
+    }
+
+    public static setRank(level) {
+        let data = {
+            event: 'score',
+            level: (level) + ''
+        }
+        console.log('设置分数:', data.level)
+        this.postMessage(data)
+    }
+
+    public static updateRank() {
+        this.postMessage({
+            event: 'update'
+        })
+    }
+
+    public static postMessage(object: any) {
+        if (cc.sys.platform == cc.sys.WECHAT_GAME) {
+            object.type = 'engine';
+            this.pt.getOpenDataContext().postMessage(object)
+        }
+    }
+
+    public static isBigSize() {
+        if (Plat.screenHeight > Plat.screenWidth * 2) {
+            return true;
+        }
+
+        return false;
+    }
+
+    private static rewardVideo2
+
+    public static showRewardVideo(callback: Function) {
+        if (cc.sys.platform != cc.sys.WECHAT_GAME) {
+            callback(true);
+            return;
+        }
+        let id = ""
+
+        if (this.rewardVideo2 != null) {
+            this.rewardVideo2.offClose(fun);
+        }
+        let rewardedVideoAd = wx.createRewardedVideoAd({
+            adUnitId: id,
+        });
+        this.rewardVideo2 = rewardedVideoAd;
+        rewardedVideoAd.load().then(() => {
+            wx.showToast({
+
+                title: "加载中,请稍后",
+
+                icon: 'success',//图标,支持"success"、"loading" 
+
+                duration: 1500,//提示的延迟时间,单位毫秒,默认:1500 
+
+                mask: false,//是否显示透明蒙层,防止触摸穿透,默认:false 
+
+                success: function () { },
+
+                fail: function () { },
+
+                complete: function () { }
+
+            })
+
+
+            console.log('激励视频 广告加载成功');
+            rewardedVideoAd.show();
+        });
+        rewardedVideoAd.onError(err => {
+            console.log('激励视频 广告显示失败', err);
+            wx.showToast({
+
+                title: "请稍后再试",
+
+                icon: 'fail',//图标,支持"success"、"loading" 
+
+                duration: 1500,//提示的延迟时间,单位毫秒,默认:1500 
+
+                mask: false,//是否显示透明蒙层,防止触摸穿透,默认:false 
+
+                success: function () { },
+
+                fail: function () { },
+
+                complete: function () { }
+
+            })
+            callback(false);
+        })
+        var fun = function (res) {
+            if (res && res.isEnded) {
+                console.log('res:  ', res);
+                callback(true);
+                rewardedVideoAd.offClose(fun);
+            } else {
+                console.log('播放中途退出');
+                callback(false);
+            }
+        }
+        rewardedVideoAd.onClose(fun);
+    }
+    private static bannerAd = null
+    private static interstitialAd = null
+    public static initAds() {
+        if (!wx) {
+            return;
+        }
+        var size = cc.view.getFrameSize()
+        this.bannerAd = wx.createBannerAd({
+            adUnitId: '',
+            style: {
+                left: 0,
+                top: size.height - 140,
+                width: size.width
+            }
+        })
+        this.bannerAd.onResize(res => {
+            this.bannerAd.style.top = size.height - this.bannerAd.style.realHeight;
+          });
+        this.bannerAd.onError(err => {
+            console.error(err.errMsg)
+        });
+        if (wx.createInterstitialAd) {
+            this.interstitialAd = wx.createInterstitialAd({
+                adUnitId: ''
+            })
+        }
+    }
+
+    public static showBanner() {
+        if (this.bannerAd) {
+            this.bannerAd.show()
+        }
+    }
+
+    public static hideBanner() {
+        if (this.bannerAd) {
+            this.bannerAd.hide()
+        }
+    }
+
+    public static showInterstitialAd() {
+        if (this.interstitialAd) {
+            this.interstitialAd.show().catch((err) => {
+                console.error('插屏广告显示失败', err)
+            })
+        }
+    }
+}

+ 10 - 0
assets/code/utils/Palt.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "86f32522-e62c-48c5-b5b1-27fcff153341",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 90 - 0
assets/code/utils/SubLoad.ts

@@ -0,0 +1,90 @@
+
+import Plat from "./Palt";
+import Log from "./util/Log";
+
+export default class SubLoad
+{
+
+   //分包加载逻辑
+
+   public static packages=[];
+
+
+   public static index=0;
+
+    public static init()
+    {
+
+        this.packages.push("resources");
+        this.packages.push("res");
+       
+    }
+
+    private static callback:any;
+    
+
+    //加载分包
+    public static loadSub(call)
+    {
+        this.init();
+
+
+        this.callback=call;
+
+        //  Log.warn("开始加载微信分包")
+
+
+         if(Plat.isWX()==false)
+         {
+           
+            this.loadComplete();
+            return ;
+         }
+
+        //  Log.warn("正在加载---"+this.packages[this.index])
+               
+         Plat.pt.loadSubpackage({
+            name:this.packages[this.index],
+            success:this.ok.bind(this),
+            fail:this.err.bind(this)
+         })
+
+    }
+
+    public static ok()
+    {
+        this.index++;
+
+
+        if(this.index==this.packages.length)
+        {
+            //全部加载完了..
+           this.loadComplete();
+
+            return ;
+        }
+
+        // Log.warn("正在加载---"+this.packages[this.index])
+
+        Plat.pt.loadSubpackage({
+            name:this.packages[this.index],
+            success:this.ok.bind(this),
+            fail:this.err.bind(this)
+         })
+    }
+
+    public static err(res)
+    {
+        // console.error("分包加载失败了2")
+        // console.error(res);
+    }
+
+
+
+    //加载完成...
+    public static loadComplete()
+    {
+    //   Log.warn("微信分包加载完毕")
+      this.callback();
+    }
+}

+ 10 - 0
assets/code/utils/SubLoad.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "b90ffe39-88f0-4c37-ac75-640fd819927d",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 36 - 0
assets/code/utils/UIbase.ts

@@ -0,0 +1,36 @@
+
+
+export default class UIbase extends cc.Component
+{
+
+   
+
+    public showUI(data?:any)
+    {
+
+        if(this.node.parent!=null)
+        {
+            this.node.parent=null;
+        }
+
+        let s = cc.director.getScene();
+
+        s.addChild(this.node);
+        this.onShow()
+    }
+
+    public  hideUI()
+    {
+        this.onHide()
+        this.node.removeFromParent(false);
+    }
+
+    protected onShow(){
+
+    }
+
+    protected onHide(){
+
+    }
+   
+}

+ 10 - 0
assets/code/utils/UIbase.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "cdb23e48-7160-43f4-93cc-caea64b71fbb",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/code/utils/manager.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "100ef86d-e819-4695-8e94-59123555196f",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 40 - 0
assets/code/utils/manager/PrefabUtil.ts

@@ -0,0 +1,40 @@
+
+export default class PrefabUtil
+{
+
+
+    private static objs={};
+
+    //加载预制体
+    public static load(call)
+    {
+
+        cc.resources.loadDir("./prefab/", (err, assets : cc.Prefab[])=>{
+ 
+           if(assets!=null)
+           {
+                for(let i=0;i<assets.length;i++)
+                {
+                    this.objs[assets[i].name]=assets[i];
+                }
+
+                call();
+           }
+         
+        })
+     
+      
+    
+    }
+
+    public static get(name:string):cc.Prefab
+    {
+
+        if(this.objs.hasOwnProperty(name)==false)
+        {
+            // console.error("没有找到预制体---"+name);
+        }
+
+        return this.objs[name];
+    }
+}

+ 10 - 0
assets/code/utils/manager/PrefabUtil.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "79035bdd-7f09-4a16-af7c-e019f8711ef0",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/code/utils/util.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "828acd81-e9c8-42c3-a688-674e8a937359",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 43 - 0
assets/code/utils/util/GameUtil.ts

@@ -0,0 +1,43 @@
+export default class GameUtil
+{
+
+    public static randomRange(min,max)
+    {
+        return min+ Math.floor(Math.random()*(max-min));
+    }
+
+    
+    public static randomRangeSort(arr)
+    {
+        for(var i = 0,len = arr.length;i < len; i++ )
+        {
+              var rand = GameUtil.randomRange(0,arr.length);             
+              var temp = arr[rand];
+              arr[rand] = arr[i];
+              arr[i] = temp; 
+        }
+    }
+
+    public static deleteValue(arr:Array<number>,val:number)
+    {
+        for(let i = 0;i<arr.length; i++ )
+        {
+            if(arr[i]==val)
+            {
+                arr.splice(i,1);
+                return;
+            }
+        }
+    }
+
+    //获取年月日字符串
+    // public static day_str() 
+    // {
+    //     var d = new Date();
+    //     let str = '';
+    //     str += d.getFullYear();
+    //     str += d.getMonth() + 1;
+    //     str += d.getDate();
+    //     return str;
+    // }
+}

+ 10 - 0
assets/code/utils/util/GameUtil.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "3cb5e456-f9f0-4dbc-9412-028e5712126c",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 30 - 0
assets/code/utils/util/Log.ts

@@ -0,0 +1,30 @@
+
+export default class Log {
+
+
+    public static version:string="1.0.0";
+
+    public static test : boolean = false;
+
+    static info (message?: any, ...optionalParams: any[]){
+        if(this.test){
+            // console.info(message, ...optionalParams);
+        }
+    }
+    static log (message?: any, ...optionalParams: any[]){
+        if(this.test){
+            // console.log(message, ...optionalParams);
+        }
+    }
+    static warn (message?: any, ...optionalParams: any[]){
+        if(this.test){
+            // console.warn(message, ...optionalParams);
+        }
+    }
+    static error (message?: any, ...optionalParams: any[]){
+        if(this.test){
+            // console.error(message, ...optionalParams);
+        }
+    } 
+    
+}

+ 10 - 0
assets/code/utils/util/Log.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "0b02906f-3b2a-46ad-b17b-be91d9f6f6c7",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 94 - 0
assets/code/utils/wx.d.ts

@@ -0,0 +1,94 @@
+declare namespace wx {
+    function saveImageToPhotosAlbum(obj)
+    function getUserInfo(obj)
+    function getSystemInfoSync(): any;
+    function request(any): void;
+    function connectSocket(any): void;
+    function getNetworkType(any);
+    function onNetworkStatusChange(callback: Function);
+    function onMemoryWarning(callback: Function);
+    function shareAppMessage(data: any);
+    function createBannerAd(data: any)
+    function createRewardedVideoAd(data: any)
+    function onShareAppMessage(func: Function);
+    function showShareMenu(obj);
+    function createInterstitialAd(obj)
+    function wladGetAds(num, func: Function);
+    function updateShareMenu(obj);
+    function getShareInfo(obj)
+    function setStorageSync(obj, data)
+    function getStorageSync(obj)
+    function clearStorageSync();
+    function removeStorageSync(key)
+    function previewImage(obj)
+    function navigateToMiniProgram(obj)
+    function getLaunchOptionsSync();
+    function onShow(fun: Function)
+    function onHide(fun: Function)
+    function getOpenDataContext();
+    function vibrateShort();
+    function loadSubpackage(obj)
+    function checkSession(obj)
+    function login(obj)
+
+    function onShareTimeline(obj)
+
+    function showToast(obj)
+
+    //---ald
+    function aldSendOpenid(key: string);
+    function aldSendEvent(name: string, data?: any)
+    function aldOnShareAppMessage(func: Function)
+    function aldShareAppMessage(obj)
+
+    module aldStage {
+        function onEnd(func: any)
+
+        function onStart(obj: any);
+
+        function onRunning(obj: any)
+    }
+
+    module aldLevel {
+        function onInitLevel(obj)
+        function onSetLevel(obj)
+    }
+
+    class InterstitialAd {
+        show();
+        load();
+        destroy();
+        onLoad(func: Function);
+        offLoad(func: Function);
+        onError(func: Function)
+        offError(func: Function)
+        onClose(func: Function)
+        offClose(func: Function)
+    }
+
+    class RewardedVideoAd {
+        load();
+        show();
+        onLoad(func: Function)
+        onClose(func: Function)
+        onError(func: Function)
+        offLoad(func: Function)
+        offError(func: Function)
+        offClose(func: Function)
+        destroy();
+    }
+
+    class BannerAd {
+        hide();
+        show();
+        destroy();
+
+        onResize(func: Function)
+        offResize(func: Function)
+        onLoad(func: Function)
+        offLoad(func: Function)
+        onError(func: Function)
+        offError(func: Function)
+
+    }
+}

+ 6 - 0
assets/code/utils/wx.d.ts.meta

@@ -0,0 +1,6 @@
+{
+  "ver": "2.0.2",
+  "uuid": "f75a5fdd-a3c4-47c0-8043-c9ee7e6d4be9",
+  "importer": "text",
+  "subMetas": {}
+}

+ 13 - 0
assets/i18n.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "6f31fe54-f51b-4f46-b8d3-23ca855e6db9",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 76 - 0
assets/i18n/I18n.ts

@@ -0,0 +1,76 @@
+// Learn TypeScript:
+import Zh from './language/Zh';
+import En from './language/En';
+//  - 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 executeInEditMode = cc._decorator.executeInEditMode;
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+export default class I18n 
+ {
+
+
+
+   public static language:string="en";
+   private static obj:any;
+
+   public static ready:boolean=false;
+
+   public static init(l:string)
+   {
+
+      this.ready=true;
+      this.language=  l;
+
+      if(this.obj==null)
+      {
+        this.obj={};
+        this.obj.zh=Zh.zh;
+        this.obj.en=En.en;
+      }       
+   }
+
+   public static t(key)
+   {
+
+        if(this.ready==false)
+        {
+            this.init(this.language);
+        }
+
+
+       let data=this.obj[this.language][key];
+
+       if(data==null)
+       {
+         return "";
+       }
+
+       return data;
+   }
+
+
+   // 更新场景渲染器
+   public static updateSceneRenderers() 
+   { 
+      let rootNodes = cc.director.getScene()!.children;
+    // walk all nodes with localize label and update
+      let allLocalizedLabels: any[] = [];
+    // 遍历所有节点获取LocalizedLabel组件
+    for (let i = 0; i < rootNodes.length; ++i) {
+      let labels = rootNodes[i].getComponentsInChildren('I18nLable');
+      allLocalizedLabels = allLocalizedLabels.concat(labels);
+    }
+    // 更新内容显示
+    for (let i = 0; i < allLocalizedLabels.length; ++i) {
+      let label = allLocalizedLabels[i];
+      if(!label.node.active)continue;
+      label.updateLabel();
+    }
+   
+  }
+}

+ 10 - 0
assets/i18n/I18n.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "3e8fd65c-0ecc-435b-a993-788e718be6cf",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 53 - 0
assets/i18n/I18nLable.ts

@@ -0,0 +1,53 @@
+// Learn TypeScript:
+import I18n from './I18n';
+import executeInEditMode = cc._decorator.executeInEditMode;
+
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+@executeInEditMode()
+export default class I18nLable extends cc.Component {
+
+    private label: cc.Label | null = null;
+
+    @property({ visible: false })
+    key: string = '';
+  
+    // 声明property属性Key
+    @property({ displayName: '翻译id', visible: true })
+    get _key() {
+      return this.key;
+    }
+    set _key(str: string) {
+      this.key = str;
+      this.updateLabel();
+    }
+  
+    onLoad()
+    { 
+      this.fetchRender();
+    }
+
+    onEnable(): void {
+      this.updateLabel();
+    }
+  
+    public fetchRender () {
+      // 获取文本Label组件
+      let label = this.getComponent('cc.Label') as cc.Label;
+      if (label) {
+        this.label = label;
+        this.updateLabel();
+        return;
+      } 
+    }
+  
+    public updateLabel () {
+      // 通过LanguageData的方法接口,根据语言类型和key获取指定的内容
+      // 然后改变内容的显示
+      this.label && (this.label.string = I18n.t(this.key));
+    }
+
+   
+}
+

+ 10 - 0
assets/i18n/I18nLable.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "67a8d3b9-29e1-488b-a9f4-eab5f80434ad",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/i18n/language.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "8a41c939-3ece-49c2-9b59-63735ae5c8b6",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 12 - 0
assets/i18n/language/En.ts

@@ -0,0 +1,12 @@
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+export default class En
+ {
+    public static en={
+
+        "start":"Start"
+
+    }
+
+}

+ 10 - 0
assets/i18n/language/En.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "87803f2f-dd3f-4e97-a4aa-ebfc903299a9",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 12 - 0
assets/i18n/language/Zh.ts

@@ -0,0 +1,12 @@
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+export default class Zh
+ {
+    public static zh={
+
+        "start":"开始"
+
+    }
+
+}

+ 10 - 0
assets/i18n/language/Zh.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "548f4c96-e722-4b52-a77d-5f2e98334cf6",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/load.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "89b123b7-4900-42ec-80ee-75aeabc7bb3d",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

BIN
assets/load/1@2x.png


+ 38 - 0
assets/load/1@2x.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "97c1a23c-4ec0-437a-bc33-ee0d20c726e6",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 248,
+  "height": 324,
+  "platformSettings": {},
+  "subMetas": {
+    "1@2x": {
+      "ver": "1.0.6",
+      "uuid": "bf6a310b-c5b6-4298-b9c4-954f849538fb",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "97c1a23c-4ec0-437a-bc33-ee0d20c726e6",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 248,
+      "height": 324,
+      "rawWidth": 248,
+      "rawHeight": 324,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/load/Bg.jpg


+ 38 - 0
assets/load/Bg.jpg.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "0093f9ec-3f51-475b-8f45-467092369a69",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 720,
+  "height": 1600,
+  "platformSettings": {},
+  "subMetas": {
+    "Bg": {
+      "ver": "1.0.6",
+      "uuid": "467934c6-ca2d-43f2-bf98-9fcfd57667fc",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "0093f9ec-3f51-475b-8f45-467092369a69",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 720,
+      "height": 1600,
+      "rawWidth": 720,
+      "rawHeight": 1600,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 1684 - 0
assets/load/LoadScene.fire

@@ -0,0 +1,1684 @@
+[
+  {
+    "__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": "5534a4a8-3241-4644-b2c7-a84d32a60ee6"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Canvas",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 9
+      },
+      {
+        "__id__": 20
+      },
+      {
+        "__id__": 25
+      },
+      {
+        "__id__": 27
+      },
+      {
+        "__id__": 29
+      },
+      {
+        "__id__": 33
+      },
+      {
+        "__id__": 35
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 37
+      },
+      {
+        "__id__": 38
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        375,
+        667,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "a5esZu+45LA5mBpvttspPD"
+  },
+  {
+    "__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": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "e1WoFrQ79G7r4ZuQE3HlNb"
+  },
+  {
+    "__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": "81GN3uXINKVLeW4+iKSlim"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg",
+    "_objFlags": 512,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 6
+      },
+      {
+        "__id__": 7
+      },
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        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": "5a9QmFaUJF5og+SKOkCW3i"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "182e682c-ff36-413c-80e5-21913551022a"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "85dV30FbRM954clT1Tkmtf"
+  },
+  {
+    "__type__": "81b5fHrq0xGPIw+rQOP0FbO",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_id": "36EpX4znlAuL++3wbgdQIx"
+  },
+  {
+    "__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": 100,
+    "_originalHeight": 100,
+    "_id": "c2zW75EvxDELcHraJ0EVQS"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "view",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 12
+      },
+      {
+        "__id__": 14
+      },
+      {
+        "__id__": 16
+      }
+    ],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 18
+      },
+      {
+        "__id__": 19
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        2.3460000000000036,
+        -30.13499999999999,
+        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": "01UUqPvt5I2Lilmu8P7M03"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bar1",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 9
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 218,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 510,
+      "height": 32
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -317.03,
+        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": "b7L1vUjGVN1JI7THMYjdEs"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 10
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "e52bbe85-9efd-4fcc-8a39-5e5c4ee77b67"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "81OTq8QiFLVYYOz478JFgF"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bar2",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 9
+    },
+    "_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": 100,
+      "height": 20
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -250,
+        -317.03,
+        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": "f5LO8GJ7pEQoQSrqit7xY4"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 12
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "c02eff71-9b03-4959-a924-f27db7b3690d"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "72uWObmIhCfaBYZ3eeoJJP"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "desc",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 9
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 15
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 415.57,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -233.666,
+        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": "cczDocOFhDjr92UE/5V3mo"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "正在加载资源,请稍后... ",
+    "_N$string": "正在加载资源,请稍后... ",
+    "_fontSize": 40,
+    "_lineHeight": 40,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 2,
+    "_N$horizontalAlign": 0,
+    "_N$verticalAlign": 0,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": "d3+vUOkF9Evrz0o5xrBoxM"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "gameVersion",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 9
+    },
+    "_children": [],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 17
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 60,
+      "height": 25.2
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        130,
+        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": "c2TOlVIKtL35J0zXod4Om+"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 16
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "版本号",
+    "_N$string": "版本号",
+    "_fontSize": 20,
+    "_lineHeight": 20,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": "4701TWDepPh4c71UrsyB0P"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 9
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 2.345999999999975,
+    "_right": -2.345999999999975,
+    "_top": 30.135000000000023,
+    "_bottom": -30.135000000000023,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "faGdRk0OZKe6C0xfHHWOTY"
+  },
+  {
+    "__type__": "21e516K299GEIylKFR2AHC5",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 9
+    },
+    "_enabled": true,
+    "progressBar": {
+      "__id__": 11
+    },
+    "gameVersion": {
+      "__id__": 15
+    },
+    "progressLabel": {
+      "__id__": 15
+    },
+    "next": null,
+    "_id": "14Xl97EXBCYIV5Ww+PkWcR"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "New Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 21
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 23
+      },
+      {
+        "__id__": 24
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 207,
+      "g": 154,
+      "b": 29,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 6,
+      "height": 106.8
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -2.704,
+        437.856,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.69,
+        0.69,
+        0.69
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "32Ehv1gJRGWLaNKuojoWxo"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Img_name",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 20
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 22
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 576.97,
+      "height": 164.69
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        3.919,
+        -98.676,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1.329,
+        1.329,
+        1.329
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "f3y+IcCZVKP6t834cVNT5R"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 21
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "8ffe47ba-8952-4b4e-9af8-4e03582ca369"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "fdBT/6szRFF4FRjTm9kpBh"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "",
+    "_N$string": "",
+    "_fontSize": 80,
+    "_lineHeight": 80,
+    "_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": "afMdllp/pDXZ+MHB7CqOpk"
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 247,
+      "g": 247,
+      "b": 247,
+      "a": 255
+    },
+    "_width": 3,
+    "_id": "9826vbhjlMsYXL2MOOU0c2"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "rankUI",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [],
+    "_prefab": {
+      "__id__": 26
+    },
+    "_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": "f4rsP1DetIU6X+E1oJF5YE"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 25
+    },
+    "asset": {
+      "__uuid__": "d0ac707d-221a-4e9d-80fb-fde92017c88d"
+    },
+    "fileId": "",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Img_year",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_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": 248,
+      "height": 324
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        314.409,
+        563.816,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.382,
+        0.382,
+        0.382
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "88ECI/bypJYpKmXBoTjjgk"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 27
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "bf6a310b-c5b6-4298-b9c4-954f849538fb"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "74gdbk3XRNkpq0NkBf6pM3"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Btn_WXDL",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__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": 680,
+      "height": 228
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -184.611,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.568,
+        0.568,
+        0
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "41o+hdbYNIpYuz3Uu/Laeg"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 29
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "0f1a0ae7-3332-4853-88c8-9a238702206d"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "50pBw7MbBE6pxOSLpfIgMl"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 29
+    },
+    "_enabled": true,
+    "_normalMaterial": null,
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.1,
+    "clickEvents": [
+      {
+        "__id__": 32
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": null,
+    "_id": "1ewiuPs/JHorumyC60S5j5"
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 5
+    },
+    "component": "",
+    "_componentId": "81b5fHrq0xGPIw+rQOP0FbO",
+    "handler": "onClickInGame",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "tx",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 34
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 1292,
+      "height": 155
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -416.774,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.465,
+        0.465,
+        0.465
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "fb7PfQyklNk4sKJ3S+VR5v"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 33
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "820c9b41-0681-4753-8170-18e4444519d3"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "7brjWoAJRJtqHCFQODAMZm"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bbh",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 36
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 1099,
+      "height": 46
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -492.296,
+        0,
+        0,
+        0,
+        0,
+        1,
+        0.489,
+        0.489,
+        0.489
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "493AxCM4dL/p08pk6VSKyF"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 35
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "0f0db963-9bc1-4b37-b796-048cb18091b1"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "b4750Udf5Atb8+TpvWaA8a"
+  },
+  {
+    "__type__": "cc.Canvas",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_designResolution": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_fitWidth": true,
+    "_fitHeight": false,
+    "_id": "59Cd0ovbdF4byw5sbjJDx7"
+  },
+  {
+    "__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": "29zXboiXFBKoIV4PQ2liTe"
+  }
+]

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

@@ -0,0 +1,8 @@
+{
+  "ver": "1.3.2",
+  "uuid": "5534a4a8-3241-4644-b2c7-a84d32a60ee6",
+  "importer": "scene",
+  "asyncLoadAssets": false,
+  "autoReleaseAssets": false,
+  "subMetas": {}
+}

Деякі файли не було показано, через те що забагато файлів було змінено