Просмотр исходного кода

Merge branch 'master' of http://git.mokasz.com/zouyong/mk_framework

zouyong 5 лет назад
Родитель
Сommit
72fe07f618
46 измененных файлов с 2388 добавлено и 1 удалено
  1. 1 1
      .gitignore
  2. BIN
      assets/res/game/ui/game/button_add.png
  3. 36 0
      assets/res/game/ui/game/button_add.png.meta
  4. BIN
      assets/res/game/ui/game/button_stop.png
  5. 36 0
      assets/res/game/ui/game/button_stop.png.meta
  6. BIN
      assets/res/game/ui/game/button_tx.png
  7. 36 0
      assets/res/game/ui/game/button_tx.png.meta
  8. BIN
      assets/res/game/ui/game/daoju_cz.png
  9. 36 0
      assets/res/game/ui/game/daoju_cz.png.meta
  10. BIN
      assets/res/game/ui/game/daoju_mfb.png
  11. 36 0
      assets/res/game/ui/game/daoju_mfb.png.meta
  12. BIN
      assets/res/game/ui/game/daoju_qipao.png
  13. 36 0
      assets/res/game/ui/game/daoju_qipao.png.meta
  14. BIN
      assets/res/game/ui/game/daoju_sx.png
  15. 36 0
      assets/res/game/ui/game/daoju_sx.png.meta
  16. BIN
      assets/res/game/ui/game/hb1.png
  17. 36 0
      assets/res/game/ui/game/hb1.png.meta
  18. BIN
      assets/res/game/ui/game/hb2.png
  19. 36 0
      assets/res/game/ui/game/hb2.png.meta
  20. BIN
      assets/res/game/ui/game/hb_bg.png
  21. 36 0
      assets/res/game/ui/game/hb_bg.png.meta
  22. BIN
      assets/res/game/ui/game/head.png
  23. 36 0
      assets/res/game/ui/game/head.png.meta
  24. BIN
      assets/res/game/ui/game/head1.png
  25. 36 0
      assets/res/game/ui/game/head1.png.meta
  26. BIN
      assets/res/game/ui/game/icon_hb.png
  27. 36 0
      assets/res/game/ui/game/icon_hb.png.meta
  28. BIN
      assets/res/game/ui/game/icon_zb.png
  29. 36 0
      assets/res/game/ui/game/icon_zb.png.meta
  30. BIN
      assets/res/game/ui/game/qipao.png
  31. 36 0
      assets/res/game/ui/game/qipao.png.meta
  32. BIN
      assets/res/game/ui/game/qipao_hb.png
  33. 36 0
      assets/res/game/ui/game/qipao_hb.png.meta
  34. BIN
      assets/res/game/ui/game/tixian_bg.png
  35. 36 0
      assets/res/game/ui/game/tixian_bg.png.meta
  36. BIN
      assets/res/game/ui/game/top_bg.png
  37. 36 0
      assets/res/game/ui/game/top_bg.png.meta
  38. BIN
      assets/res/game/ui/game/xiaochu_bg1.png
  39. 36 0
      assets/res/game/ui/game/xiaochu_bg1.png.meta
  40. BIN
      assets/res/game/ui/game/xiaochu_bg2.png
  41. 36 0
      assets/res/game/ui/game/xiaochu_bg2.png.meta
  42. 433 0
      assets/resources/game/prefab/uiItem/redbagitem.prefab
  43. 8 0
      assets/resources/game/prefab/uiItem/redbagitem.prefab.meta
  44. 12 0
      assets/script/before.meta
  45. 1205 0
      assets/script/before/GamePlay.ts
  46. 9 0
      assets/script/before/GamePlay.ts.meta

+ 1 - 1
.gitignore

@@ -14,4 +14,4 @@ local
 /assets/scene/TestScene.ts
 /assets/scene/TestScene.ts.meta
 /assets/scene/TestScene.fire
-assets
+

BIN
assets/res/game/ui/game/button_add.png


+ 36 - 0
assets/res/game/ui/game/button_add.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "92905e2c-a43a-446b-a94f-ff33a5ddfdb7",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 44,
+  "height": 45,
+  "platformSettings": {},
+  "subMetas": {
+    "button_add": {
+      "ver": "1.0.4",
+      "uuid": "497527d3-35cf-48f6-88bd-8e92520cba7a",
+      "rawTextureUuid": "92905e2c-a43a-446b-a94f-ff33a5ddfdb7",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 44,
+      "height": 45,
+      "rawWidth": 44,
+      "rawHeight": 45,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/button_stop.png


+ 36 - 0
assets/res/game/ui/game/button_stop.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "36a57647-7960-4fe7-9b9c-f636f8f00a7b",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 65,
+  "height": 65,
+  "platformSettings": {},
+  "subMetas": {
+    "button_stop": {
+      "ver": "1.0.4",
+      "uuid": "68270bad-2f5e-43ad-8e47-f30056bb5360",
+      "rawTextureUuid": "36a57647-7960-4fe7-9b9c-f636f8f00a7b",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 65,
+      "height": 65,
+      "rawWidth": 65,
+      "rawHeight": 65,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/button_tx.png


+ 36 - 0
assets/res/game/ui/game/button_tx.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "e6a3330c-bee5-4bbc-907f-483e29f30b0e",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 81,
+  "height": 66,
+  "platformSettings": {},
+  "subMetas": {
+    "button_tx": {
+      "ver": "1.0.4",
+      "uuid": "524cff8a-3a4c-444e-a8fd-cc8c05b52d73",
+      "rawTextureUuid": "e6a3330c-bee5-4bbc-907f-483e29f30b0e",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 81,
+      "height": 66,
+      "rawWidth": 81,
+      "rawHeight": 66,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/daoju_cz.png


+ 36 - 0
assets/res/game/ui/game/daoju_cz.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "29773d86-7007-4d9d-b974-cbab048d44c6",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 98,
+  "height": 92,
+  "platformSettings": {},
+  "subMetas": {
+    "daoju_cz": {
+      "ver": "1.0.4",
+      "uuid": "35e31d31-67eb-484b-ba98-08462b5dcc35",
+      "rawTextureUuid": "29773d86-7007-4d9d-b974-cbab048d44c6",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 98,
+      "height": 92,
+      "rawWidth": 98,
+      "rawHeight": 92,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/daoju_mfb.png


+ 36 - 0
assets/res/game/ui/game/daoju_mfb.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "47449ca3-4273-4fa7-a056-be5765d8aa02",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 75,
+  "height": 98,
+  "platformSettings": {},
+  "subMetas": {
+    "daoju_mfb": {
+      "ver": "1.0.4",
+      "uuid": "7019c6dd-f187-488b-881f-b8453432aa86",
+      "rawTextureUuid": "47449ca3-4273-4fa7-a056-be5765d8aa02",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 75,
+      "height": 98,
+      "rawWidth": 75,
+      "rawHeight": 98,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/daoju_qipao.png


+ 36 - 0
assets/res/game/ui/game/daoju_qipao.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "687de809-4e5a-4ac9-8bce-0aee0983730b",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 148,
+  "height": 139,
+  "platformSettings": {},
+  "subMetas": {
+    "daoju_qipao": {
+      "ver": "1.0.4",
+      "uuid": "7eeba42a-9887-417c-b68c-f65657a15394",
+      "rawTextureUuid": "687de809-4e5a-4ac9-8bce-0aee0983730b",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 148,
+      "height": 139,
+      "rawWidth": 148,
+      "rawHeight": 139,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/daoju_sx.png


+ 36 - 0
assets/res/game/ui/game/daoju_sx.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "db13425b-1140-4192-ac5a-19cb7cb468fb",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 86,
+  "height": 101,
+  "platformSettings": {},
+  "subMetas": {
+    "daoju_sx": {
+      "ver": "1.0.4",
+      "uuid": "b9da124c-2114-428a-859d-9a7836684f3b",
+      "rawTextureUuid": "db13425b-1140-4192-ac5a-19cb7cb468fb",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 86,
+      "height": 101,
+      "rawWidth": 86,
+      "rawHeight": 101,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/hb1.png


+ 36 - 0
assets/res/game/ui/game/hb1.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "8a813f10-5863-46fd-9b58-3a1314b9ef4c",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 85,
+  "height": 112,
+  "platformSettings": {},
+  "subMetas": {
+    "hb1": {
+      "ver": "1.0.4",
+      "uuid": "185ccf25-ff2e-4b00-887e-b76c314cf78a",
+      "rawTextureUuid": "8a813f10-5863-46fd-9b58-3a1314b9ef4c",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 85,
+      "height": 112,
+      "rawWidth": 85,
+      "rawHeight": 112,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/hb2.png


+ 36 - 0
assets/res/game/ui/game/hb2.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "3da8a757-5a4d-4ef5-a9a2-888d1373f548",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 85,
+  "height": 112,
+  "platformSettings": {},
+  "subMetas": {
+    "hb2": {
+      "ver": "1.0.4",
+      "uuid": "eab4a3e2-1348-4a4a-b624-155f21f77e04",
+      "rawTextureUuid": "3da8a757-5a4d-4ef5-a9a2-888d1373f548",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 85,
+      "height": 112,
+      "rawWidth": 85,
+      "rawHeight": 112,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/hb_bg.png


+ 36 - 0
assets/res/game/ui/game/hb_bg.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "a1c837f3-24ce-4b57-b057-0613db1dfd83",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 167,
+  "height": 112,
+  "platformSettings": {},
+  "subMetas": {
+    "hb_bg": {
+      "ver": "1.0.4",
+      "uuid": "f1d7c2b7-239d-43f8-a962-db63e28f7327",
+      "rawTextureUuid": "a1c837f3-24ce-4b57-b057-0613db1dfd83",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 167,
+      "height": 112,
+      "rawWidth": 167,
+      "rawHeight": 112,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/head.png


+ 36 - 0
assets/res/game/ui/game/head.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "1a3d0d3b-32fe-4ef0-9b33-2fca6c7ab837",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 149,
+  "height": 149,
+  "platformSettings": {},
+  "subMetas": {
+    "head": {
+      "ver": "1.0.4",
+      "uuid": "a5b5379f-bdc6-4338-8b0c-6279ba033744",
+      "rawTextureUuid": "1a3d0d3b-32fe-4ef0-9b33-2fca6c7ab837",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 149,
+      "height": 149,
+      "rawWidth": 149,
+      "rawHeight": 149,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/head1.png


+ 36 - 0
assets/res/game/ui/game/head1.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "560e7dca-5dac-49f3-9131-a30fa1ec63e6",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 117,
+  "height": 117,
+  "platformSettings": {},
+  "subMetas": {
+    "head1": {
+      "ver": "1.0.4",
+      "uuid": "083899bd-8023-44b3-a846-2b5e84eabdc7",
+      "rawTextureUuid": "560e7dca-5dac-49f3-9131-a30fa1ec63e6",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 117,
+      "height": 117,
+      "rawWidth": 117,
+      "rawHeight": 117,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/icon_hb.png


+ 36 - 0
assets/res/game/ui/game/icon_hb.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "1d36cc37-7b74-4d46-b9c5-dee29eaf3b45",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 56,
+  "height": 74,
+  "platformSettings": {},
+  "subMetas": {
+    "icon_hb": {
+      "ver": "1.0.4",
+      "uuid": "4764fd58-4dbb-41ee-8154-ca7e98050ce8",
+      "rawTextureUuid": "1d36cc37-7b74-4d46-b9c5-dee29eaf3b45",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 56,
+      "height": 74,
+      "rawWidth": 56,
+      "rawHeight": 74,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/icon_zb.png


+ 36 - 0
assets/res/game/ui/game/icon_zb.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "ee34e132-7f2a-4300-aa5d-b4e1e08da73f",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 70,
+  "height": 70,
+  "platformSettings": {},
+  "subMetas": {
+    "icon_zb": {
+      "ver": "1.0.4",
+      "uuid": "23bd851a-2b77-41b0-8a46-20202e299166",
+      "rawTextureUuid": "ee34e132-7f2a-4300-aa5d-b4e1e08da73f",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 70,
+      "height": 70,
+      "rawWidth": 70,
+      "rawHeight": 70,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/qipao.png


+ 36 - 0
assets/res/game/ui/game/qipao.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "662e3c2f-6f20-402c-87c3-8383a711c47a",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 115,
+  "height": 108,
+  "platformSettings": {},
+  "subMetas": {
+    "qipao": {
+      "ver": "1.0.4",
+      "uuid": "dc5d4911-076d-4863-a00f-faeea29ceb86",
+      "rawTextureUuid": "662e3c2f-6f20-402c-87c3-8383a711c47a",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 115,
+      "height": 108,
+      "rawWidth": 115,
+      "rawHeight": 108,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/qipao_hb.png


+ 36 - 0
assets/res/game/ui/game/qipao_hb.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "93404920-0529-416b-82a5-57a8970a23b0",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 61,
+  "height": 79,
+  "platformSettings": {},
+  "subMetas": {
+    "qipao_hb": {
+      "ver": "1.0.4",
+      "uuid": "c4431030-4432-406f-a5e5-715b3bf622a5",
+      "rawTextureUuid": "93404920-0529-416b-82a5-57a8970a23b0",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 61,
+      "height": 79,
+      "rawWidth": 61,
+      "rawHeight": 79,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/tixian_bg.png


+ 36 - 0
assets/res/game/ui/game/tixian_bg.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "1049ff96-088a-46c9-98c1-139637624129",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 217,
+  "height": 60,
+  "platformSettings": {},
+  "subMetas": {
+    "tixian_bg": {
+      "ver": "1.0.4",
+      "uuid": "4025bd43-67ee-47be-9fcd-7e25c77108a5",
+      "rawTextureUuid": "1049ff96-088a-46c9-98c1-139637624129",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 217,
+      "height": 60,
+      "rawWidth": 217,
+      "rawHeight": 60,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/top_bg.png


+ 36 - 0
assets/res/game/ui/game/top_bg.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "199f4092-bbda-4f1b-9ead-6ee07a625214",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 750,
+  "height": 97,
+  "platformSettings": {},
+  "subMetas": {
+    "top_bg": {
+      "ver": "1.0.4",
+      "uuid": "65c118b6-2e55-4859-9dd9-ca5ff78cdae7",
+      "rawTextureUuid": "199f4092-bbda-4f1b-9ead-6ee07a625214",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 750,
+      "height": 97,
+      "rawWidth": 750,
+      "rawHeight": 97,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/xiaochu_bg1.png


+ 36 - 0
assets/res/game/ui/game/xiaochu_bg1.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "4d577a6a-1356-49c0-b25a-8f359f00a883",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 750,
+  "height": 788,
+  "platformSettings": {},
+  "subMetas": {
+    "xiaochu_bg1": {
+      "ver": "1.0.4",
+      "uuid": "1a2f437a-b8a2-4189-b3e6-7c4388369d6c",
+      "rawTextureUuid": "4d577a6a-1356-49c0-b25a-8f359f00a883",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 750,
+      "height": 788,
+      "rawWidth": 750,
+      "rawHeight": 788,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/res/game/ui/game/xiaochu_bg2.png


+ 36 - 0
assets/res/game/ui/game/xiaochu_bg2.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "01d22575-0b96-4920-996d-1a8cc6d8462d",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 81,
+  "height": 81,
+  "platformSettings": {},
+  "subMetas": {
+    "xiaochu_bg2": {
+      "ver": "1.0.4",
+      "uuid": "88f501ff-4744-46e4-aa3f-324e8c537a58",
+      "rawTextureUuid": "01d22575-0b96-4920-996d-1a8cc6d8462d",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 81,
+      "height": 81,
+      "rawWidth": 81,
+      "rawHeight": 81,
+      "borderTop": 10,
+      "borderBottom": 10,
+      "borderLeft": 10,
+      "borderRight": 10,
+      "subMetas": {}
+    }
+  }
+}

+ 433 - 0
assets/resources/game/prefab/uiItem/redbagitem.prefab

@@ -0,0 +1,433 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "redbagitem",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 8
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": {
+      "__id__": 12
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 115,
+      "height": 108
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -160,
+        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": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "qipao_hb",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 3
+      }
+    ],
+    "_prefab": {
+      "__id__": 4
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 61,
+      "height": 79
+    },
+    "_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": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "292c026e-580c-48ee-aecb-afaf6a560a63"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "ec923f8e-c546-49d0-b91f-36dfbf416120"
+    },
+    "fileId": "a4O9/qknhGraevb8T8KhzD",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "qipao",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 6
+      }
+    ],
+    "_prefab": {
+      "__id__": 7
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 115,
+      "height": 108
+    },
+    "_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": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "20a8e97d-7bce-4667-917e-7ccabdbf66b9"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "ec923f8e-c546-49d0-b91f-36dfbf416120"
+    },
+    "fileId": "2eDjIWmr9Plpd0KSJ9ZNC+",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "New Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 9
+      }
+    ],
+    "_prefab": {
+      "__id__": 10
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 25.2
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -15,
+        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": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 8
+    },
+    "_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": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "ec923f8e-c546-49d0-b91f-36dfbf416120"
+    },
+    "fileId": "84LccR5rlKP6thQuhZGcgR",
+    "sync": false
+  },
+  {
+    "__type__": "b8d2cnq+GZLFK30xbLDqr/m",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "panel_name": "module/reward/rewardLuck",
+    "open_type": 0,
+    "transition_type": 0,
+    "onComplete": [],
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "ec923f8e-c546-49d0-b91f-36dfbf416120"
+    },
+    "fileId": "",
+    "sync": false
+  }
+]

+ 8 - 0
assets/resources/game/prefab/uiItem/redbagitem.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.9",
+  "uuid": "ec923f8e-c546-49d0-b91f-36dfbf416120",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 12 - 0
assets/script/before.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "8a05eef2-bb3d-420c-9b10-315b47fd78c1",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 1205 - 0
assets/script/before/GamePlay.ts

@@ -0,0 +1,1205 @@
+import CellItem from "./view/uiItem/CellItem";
+import { PROPTYPE, CHECKDIR, SURPRISETASKTYPE } from "./data/Enum";
+import PoolMgr, { NODEPOOLPREFABTYPE } from "./mgr/PoolMgr";
+import GameConst from "./data/GameConst";
+import GameLogic from "./util/GameLogic";
+import ArtNum from "./util/common/ArtNum";
+import BonusTip from "./view/effect/BonusTip";
+import PlayerConst from "./data/PlayerConst";
+import DataMgr from "./mgr/DataMgr";
+import RedPacketUI from "./view/RedPacketUI";
+import LevelRedPacketItem from "./view/uiItem/LevelRedPacketItem";
+import EffectMgr, { TIP_SPRITEITEM_TYPE } from "./mgr/EffectMgr";
+import GameMgr, { UI_NAME } from "./mgr/GameMgr";
+import { AUDIO_TYPE, EVENT_TYPE } from "../game/data/GameData";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class GamePlay extends cc.Component {
+
+    /**单例模式 */
+    public static Inst: GamePlay = null;
+
+    /**背景 */
+    @property(cc.Node)
+    node_bg: cc.Node = null;
+
+    /**标题 */
+    @property(cc.Node)
+    node_top: cc.Node = null;
+    @property(cc.Node)
+    node_goal: cc.Node = null;
+    /**目标分数 */
+    @property(ArtNum)
+    artNum_targetScore: ArtNum = null;
+
+    /**得分 */
+    @property(ArtNum)
+    artNum_score: ArtNum = null;
+    /**关卡数目 */
+    @property(ArtNum)
+    artNum_level: ArtNum = null;
+
+    /**内容 */
+    @property(cc.Node)
+    node_content: cc.Node = null;
+    /**cell背景块 */
+    @property(cc.Node)
+    node_cellBg: cc.Node = null;
+
+    /**红包图标 */
+    @property(cc.Node)
+    node_redPacketIcon: cc.Node = null;
+    /**红包动画 */
+    @property(cc.Animation)
+    ani_redPacketIcon: cc.Animation = null;
+
+    /**暂停按钮 */
+    @property(cc.Node)
+    node_pauseBtn: cc.Node = null;
+
+    /**进度条UI */
+    @property(cc.Node)
+    node_progressUI: cc.Node = null;
+    @property(cc.ProgressBar)
+    bar_progress: cc.ProgressBar = null;
+    @property(cc.Node)
+    node_progressIcon: cc.Node = null;
+
+    /**重置按钮 */
+    @property(cc.Node)
+    node_resetBtn: cc.Node = null;
+    @property(cc.Label)
+    label_resetPropNum: cc.Label = null;
+    /**锤子按钮 */
+    @property(cc.Node)
+    node_hammerBtn: cc.Node = null;
+    @property(cc.Label)
+    label_hammerPropNum: cc.Label = null;
+    /**变色按钮 */
+    @property(cc.Node)
+    node_changeBtn: cc.Node = null;
+    @property(cc.Label)
+    label_changePropNum: cc.Label = null;
+
+    /**更改CellItemUI */
+    @property(cc.Node)
+    node_changeCellItemUI: cc.Node = null;
+
+    /**特效UI */
+    @property(cc.Node)
+    node_effectUI: cc.Node = null;
+
+    /**关卡红包UI */
+    @property(cc.Node)
+    node_levelRedPacketUI: cc.Node = null;
+
+    /**点击检测遮罩 */
+    @property(cc.Node)
+    node_touchListenMask: cc.Node = null;
+
+    /**当前进度得分 */
+    public curProgressScore: number = 0;
+    /**当前得分 */
+    public curGetScore: number = 0;
+    /**目标分数 */
+    public targetScore: number = 100000;
+    /**最终得分 */
+    public finalGetScore: number = 0;
+    /**增加得分速度 */
+    public addScoreSpeed: number = 4;
+
+    // /**道具类型 */
+    // public curPropType: PROPTYPE = PROPTYPE.Null;
+
+    /**消消的方块数组
+     * @param:key index_x
+     * @param: value 整个纵列数组
+     */
+    public cellItemDic: { [key: number]: CellItem[] } = {};
+
+    public cellItemArr: CellItem[] = [];
+
+    /**清理CellItem的Vec数组 */
+    public cleanedVecArr: cc.Vec2[] = [];
+
+    /**能够清理的vecArr组 */
+    public couldCleanVecArr: cc.Vec2[] = [];
+
+    /**清理纵列的x */
+    public cleanXIndexArr: number[] = [];
+    /**所有的清理 */
+    public allCleanedXArr: number[] = [];
+    /**剩余未移除的xIndex */
+    public leftXIndexArr: number[] = [];
+
+    /**当前选择的cellItem */
+    public curSelectCellItem: CellItem = null;
+
+    /**当前点击得cellItem */
+    public curClickCellItem: CellItem = null;
+
+    /**当前选择的道具按钮 */
+    public curSelectPropBtn: cc.Node = null;
+
+    /**是否可以点击 */
+    public ifCouldClick: boolean = true;
+
+    /**是否已经通关 */
+    public ifPass: boolean = false;
+    /**是否获取后台回调 */
+    public ifGetPass: boolean = false;
+
+    /**当前的道具类型 */
+    private _curPropType: PROPTYPE;
+    public get curPropType(): PROPTYPE {
+        return this._curPropType;
+    }
+    public set curPropType(v: PROPTYPE) {
+        //LogUtil.log("this.curSelectPropBtn", this.curSelectPropBtn);
+        let ani = null;
+        if (this.curSelectPropBtn) {
+            mk.console.log("this.curSelectPropBtn", this.curSelectPropBtn);
+            ani = this.curSelectPropBtn.children[1].getComponent(cc.Animation);
+        }
+        if (v == PROPTYPE.Null) {
+            if (ani) {
+                ani.play("ani_normalBtn");
+            }
+            this.setPropBtnNormalTip(this.curSelectPropBtn)
+        }
+        else {
+            if (ani) {
+                ani.play("ani_selectBtn");
+            }
+            this.setPropBtnSelectTip(this.curSelectPropBtn)
+        }
+        this._curPropType = v;
+    }
+
+    // LIFE-CYCLE CALLBACKS:
+
+    onLoad() {
+        GamePlay.Inst = this;
+    }
+
+    public start() {
+        PoolMgr.Inst.initPoolPrefab();
+        GameConst.loadConfig().then(() => {
+            this.adapt();
+
+            // AudioMgr.Inst.playMusic(AUDIO_CLIP_NAME.bg_game);
+            mk.audio.playMusic("music_gameBg");
+
+            this.initView();
+            this.initEvent();
+
+            this.intervalShowGuide();
+        }).catch();
+    }
+
+    onEnable() {
+        mk.console.log("PROPTYPE[PROPTYPE.Change]", PROPTYPE.Change);
+        GameMgr.Inst.sendEvent(UI_NAME.Game, "进入游戏界面");
+        // this.initLevel();
+    }
+
+    onDisable() {
+        //退出游戏归置下道具状态
+        this.curPropType = PROPTYPE.Null;
+        if (this.curSelectCellItem) {
+            this.curSelectCellItem.normal();
+        }
+        if (this.node_changeCellItemUI.active = true) {
+            this.node_changeCellItemUI.active = false;
+        }
+        //this.clearSurpriseTask();
+    }
+
+    adapt() {
+        mk.console.log("进行适配!!!!!!!!!!!!!!!!");
+        //背景适配
+        this.node_bg.setContentSize(new cc.Size(cc.winSize.width, cc.winSize.height));
+        this.node_top.y = (cc.winSize.height - this.node_top.height) * 0.5 + 5;
+    }
+
+    update(dt) {
+        if (this.curProgressScore >= this.curGetScore) {
+            if (this.curProgressScore == 0) {
+                this.bar_progress.progress = 0;
+            }
+            return;
+        }
+        else {
+            if (this.curProgressScore >= this.targetScore) {
+                this.curProgressScore = this.curGetScore;
+                this.initScore();
+            }
+            else {
+
+                let nextProgressScore: number = this.curProgressScore + this.addScoreSpeed;
+
+                if (this.curProgressScore < GamePlay.Inst.targetScore && nextProgressScore >= GamePlay.Inst.targetScore) {
+                    this.ani_redPacketIcon.play("ani_redPacket_icon_on");
+                    let node_getTargetScoreTip = PoolMgr.Inst.getPoolPrefab(NODEPOOLPREFABTYPE.GetTargetScoreTip);
+                    GamePlay.Inst.node_effectUI.addChild(node_getTargetScoreTip);
+                }
+
+                this.curProgressScore = nextProgressScore;
+                if (this.curProgressScore >= this.curGetScore) {
+                    this.curProgressScore = this.curGetScore;
+                }
+                this.initScore();
+            }
+        }
+    }
+
+    /**初始化视图 */
+    initView() {
+        this.initLevel();
+        this.initTotalScore();
+        this.initScore();
+        this.initProgress();
+        this.initHammerPropNum();
+        this.setPropBtnNormalTip(this.node_hammerBtn);
+        this.initResetPropNum();
+        this.setPropBtnNormalTip(this.node_resetBtn);
+        this.initChanegPropNum();
+        this.setPropBtnNormalTip(this.node_changeBtn);
+        this.initCellBg();
+        this.initCell();
+    }
+
+    /**初始化事件 */
+    initEvent() {
+        this.node_pauseBtn.on(cc.Node.EventType.TOUCH_END, this.onClickBtn, this);
+        this.node_resetBtn.on(cc.Node.EventType.TOUCH_END, this.onClickBtn, this);
+        this.node_hammerBtn.on(cc.Node.EventType.TOUCH_END, this.onClickBtn, this);
+        this.node_changeBtn.on(cc.Node.EventType.TOUCH_END, this.onClickBtn, this);
+
+        this.node_redPacketIcon.on(cc.Node.EventType.TOUCH_END, this.onClickRedPacketIcon, this);
+
+        if (!GameConst.isAuth) {
+            mk.event.register(EVENT_TYPE.BACK_WxAuth, this.onWxAuthBack, this);
+        }
+    }
+
+    /**初始化关卡数目 */
+    initLevel() {
+        mk.console.log("[Game] PlayerConst.levelNum", PlayerConst.levelNum);
+        this.artNum_level.init(PlayerConst.levelNum + 1);
+    }
+
+    /**初始化总分数 */
+    initTotalScore() {
+        //加入一些随机值,而不是都能获得过关红包
+        this.targetScore = 450 + PlayerConst.levelNum * (5 + Math.floor(Math.random() * 15));
+        // //测试切换
+        // this.targetScore = 5000;
+        this.addScoreSpeed = Math.floor(this.targetScore / 400) * 2 + 4;
+        mk.console.log("this.addScoreSpeed", this.addScoreSpeed);
+        this.artNum_targetScore.init(this.targetScore);
+    }
+
+    /**初始化得分 */
+    initScore() {
+        this.artNum_score.init(this.curProgressScore);
+        this.initProgress();
+    }
+
+    /**初始化进度 */
+    initProgress() {
+        let progress = this.curProgressScore / this.targetScore;
+        progress = progress > 1 ? 1 : progress;
+        this.bar_progress.progress = progress;
+        // LogUtil.log("progressprogressprogressprogressprogressprogress", progress);
+        if (progress == 0) {
+            this.node_progressIcon.active = false;
+        }
+        else if (progress == 1) {
+
+        }
+        else {
+            if (this.node_progressIcon.active == false) {
+                this.node_progressIcon.active = true;
+            }
+        }
+        this.node_progressIcon.x = this.bar_progress.totalLength * progress - this.bar_progress.totalLength * 0.5 - 5;
+    }
+
+    /**初始化道具 */
+    initPropNum() {
+        this.initHammerPropNum();
+        this.initResetPropNum();
+        this.initChanegPropNum();
+    }
+
+    /**初始化锤子道具数目 */
+    initHammerPropNum() {
+        if (PlayerConst.hanmmerPropNum > 0) {
+            this.label_hammerPropNum.string = PlayerConst.hanmmerPropNum.toString();
+        }
+        else {
+            this.label_hammerPropNum.string = "+";
+        }
+    }
+
+    /**初始化重置道具数目 */
+    initResetPropNum() {
+        if (PlayerConst.resetPropNum) {
+            this.label_resetPropNum.string = PlayerConst.resetPropNum.toString();
+        }
+        else {
+            this.label_resetPropNum.string = "+";
+        }
+    }
+
+    /**初始化替换道具数目 */
+    initChanegPropNum() {
+        if (PlayerConst.changePropNum) {
+            this.label_changePropNum.string = PlayerConst.changePropNum.toString();
+        }
+        else {
+            this.label_changePropNum.string = "+";
+        }
+    }
+
+    // update (dt) {}
+
+    /**初始化cellBg */
+    initCellBg() {
+        for (var i = 0; i < GameConst.col_num; i++) {
+            for (var j = 0; j < GameConst.row_num; j++) {
+                let prefab_cellBg = PoolMgr.Inst.getPoolPrefab(NODEPOOLPREFABTYPE.CellBg);
+                // LogUtil.log("prefab_cellBg", prefab_cellBg);
+                let node_cellBg = cc.instantiate(prefab_cellBg);
+                this.node_cellBg.addChild(node_cellBg);
+            }
+        }
+    }
+
+    /**初始化cell */
+    public initCell() {
+        this.addCellItemFuc = () => { this.addCellItem(); };
+        this.schedule(this.addCellItemFuc, 0.05);
+    }
+
+    public addCellItemFuc: Function = null;
+
+    public curXIndex: number = 0;
+    public curYIndex: number = 7;
+
+    /**添加CellItem */
+    public addCellItem() {
+        mk.console.log("addCellItem!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+        this.addColCellItem();
+        this.curXIndex++;
+        if (this.curXIndex >= GameConst.col_num) {
+            this.unschedule(this.addCellItemFuc);
+        }
+    }
+
+    /**添加纵列的cellItem */
+    public addColCellItem() {
+        this.cellItemDic[this.curXIndex] = [];
+        for (var i = GameConst.row_num - 1; i >= 0; i--) {
+            let prefab_cellItem = PoolMgr.Inst.getPoolPrefab(NODEPOOLPREFABTYPE.CellItem);
+            let node_prefab = cc.instantiate(prefab_cellItem);
+            let cellItem = node_prefab.getComponent(CellItem);
+            cellItem.init(this.curXIndex, i);
+            this.cellItemDic[this.curXIndex][i] = cellItem;
+            this.cellItemArr.push(cellItem);
+            this.node_content.addChild(node_prefab);
+        }
+    }
+
+    /**点击按钮 */
+    onClickBtn(event: cc.Event.EventTouch) {
+
+        this.intervalShowGuide();
+
+        //是否已经通关
+        if (this.ifPass) {
+            EffectMgr.Inst.addTip("通关结算啦,请稍后操作哈")
+            return;
+        }
+
+        // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.buttonClick);
+        mk.audio.playEffect("ef_button_click");
+
+        switch (event.currentTarget) {
+            case this.node_pauseBtn:
+                this.onClickPauseBtn();
+                break;
+            case this.node_hammerBtn:
+                this.onClickHammerBtn();
+                break;
+            case this.node_changeBtn:
+                this.onClickChangeBtn();
+                break;
+            case this.node_resetBtn:
+                this.onClickResetBtn();
+                break;
+        }
+    }
+
+    /**点击暂停按钮 */
+    onClickPauseBtn() {
+        GameMgr.Inst.sendEvent(UI_NAME.Game, "点击暂停按钮");
+        mk.ui.openPanel("game/prefab/uiPanel/PauseUI")
+    }
+
+
+    /**点击重置按钮 */
+    onClickResetBtn() {
+        //this.intervalShowGuide();
+        GameMgr.Inst.sendEvent(UI_NAME.Game, "点击重置道具按钮");
+
+        //设置当前选择的道具按钮
+        this.setCurSelectPropBtn(this.node_resetBtn);
+
+        this.curPropType = PROPTYPE.Reset;
+        console.log("PlayerConst.resetPropNum", PlayerConst.resetPropNum);
+        if (PlayerConst.resetPropNum <= 0) {
+            mk.ui.openPanel("game/prefab/uiPanel/GetPropUI");
+            return;
+        }
+
+        // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.refresh);
+        mk.audio.playEffect("ef_refresh");
+
+        let keys = Object.keys(this.cellItemDic);
+        for (var i = 0; i < keys.length; i++) {
+            let key = Number(keys[i]);
+            let colCellItemArr = this.cellItemDic[key];
+            for (var j = 0; j < colCellItemArr.length; j++) {
+                let cellItem = colCellItemArr[j];
+                if (cellItem) {
+                    cellItem.reset();
+                }
+            }
+        }
+
+        //暂时不扣
+        DataMgr.Inst.updatePropNum(2, GamePlay.Inst.curPropType, -1);
+
+        this.curPropType = PROPTYPE.Null;
+
+        //this.recycleAllCellItem();
+    }
+
+    //点击锤子按钮
+    onClickHammerBtn() {
+        GameMgr.Inst.sendEvent(UI_NAME.Game, "点击消除锤道具按钮");
+        //this.intervalShowGuide();
+
+        //设置当前选择的道具按钮
+        this.setCurSelectPropBtn(this.node_hammerBtn);
+
+        this.curPropType = PROPTYPE.Hammer;
+
+        console.log("PlayerConst.hanmmerPropNum", PlayerConst.hanmmerPropNum);
+        if (PlayerConst.hanmmerPropNum <= 0) {
+            mk.ui.openPanel("game/prefab/uiPanel/GetPropUI");
+            return;
+        }
+
+        DataMgr.Inst.updatePropNum(2, GamePlay.Inst.curPropType, -1);
+    }
+
+    //点击更换按钮
+    onClickChangeBtn() {
+        GameMgr.Inst.sendEvent(UI_NAME.Game, "点击变化方块按钮");
+        //this.intervalShowGuide();
+
+        //设置当前选择的道具按钮
+        this.setCurSelectPropBtn(this.node_changeBtn);
+        console.log("PlayerConst.changePropNum", PlayerConst.changePropNum);
+
+        this.curPropType = PROPTYPE.Change;
+        if (PlayerConst.changePropNum <= 0) {
+            mk.ui.openPanel("game/prefab/uiPanel/GetPropUI");
+            return;
+        }
+
+        DataMgr.Inst.updatePropNum(2, GamePlay.Inst.curPropType, -1);
+    }
+
+    /**更改cellItem类型
+     * @param cellItemType
+     */
+    changeCellItemType(cellItemType: number) {
+
+        let pos_x = this.curSelectCellItem.node.x + GamePlay.Inst.node_content.x;
+        let pos_y = this.curSelectCellItem.node.y + GamePlay.Inst.node_content.y;
+
+        let node_change = PoolMgr.Inst.getPoolPrefab(NODEPOOLPREFABTYPE.Change);
+        node_change.setPosition(pos_x, pos_y);
+        GamePlay.Inst.node_effectUI.addChild(node_change);
+
+        this.curSelectCellItem.setType(cellItemType)
+
+        // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.change);
+        mk.audio.playEffect("ef_change");
+
+
+        this.curSelectCellItem = null;
+    }
+
+    /**设置当前 */
+    setCurSelectPropBtn(propBtn: cc.Node) {
+        if (this.curSelectPropBtn) {
+            let node_ani = this.curSelectPropBtn.children[1];
+            if (node_ani) {
+                let ani = node_ani.getComponent(cc.Animation);
+                if (ani) {
+                    ani.play("ani_normalBtn");
+                }
+            }
+            this.setPropBtnNormalTip(this.curSelectPropBtn);
+        }
+        this.curSelectPropBtn = propBtn;
+    }
+
+    /**设置道具普通提示 */
+    setPropBtnNormalTip(propBtn: cc.Node) {
+
+        if (!propBtn) {
+            return;
+        }
+
+        let node_tip = propBtn.children[2];
+        if (node_tip) {
+            let label = null;
+            switch (propBtn) {
+                case this.node_hammerBtn:
+                    label = this.label_hammerPropNum;
+                    break;
+                case this.node_resetBtn:
+                    label = this.label_resetPropNum;
+                    break;
+                case this.node_changeBtn:
+                    label = this.label_changePropNum;
+                    break;
+            }
+            let str = label.string;
+            let num = Number(str);
+            let label_tip = node_tip.getComponent(cc.Label);
+            mk.console.log("propBtn.name", propBtn.name);
+            mk.console.log("num", num);
+            if (num && num >= 1) {
+                label_tip.string = "";
+            }
+            else {
+                label_tip.string = "点我领取";
+            }
+        }
+    }
+
+    /**设置道具使用提示 */
+    setPropBtnSelectTip(propBtn: cc.Node) {
+        if (!propBtn) {
+            return;
+        }
+        let node_tip = propBtn.children[2];
+        if (node_tip) {
+            let label = node_tip.getComponent(cc.Label)
+            label.string = "道具使用中";
+        }
+    }
+
+    /**显示CellItemUI */
+    showChangeCellItemUI() {
+
+        let cruSelectCellItem = this.curSelectCellItem;
+        GamePlay.Inst.node_changeCellItemUI.active = true;
+        // let min_x = -this.node_content.width * 0.5 + this.node_changeCellItemUI.width * 0.5;
+        // let max_x = this.node_content.width * 0.5 + this.node_changeCellItemUI.width * 0.5;
+        GamePlay.Inst.node_changeCellItemUI.y = cruSelectCellItem.node.y + cruSelectCellItem.node.height * 0.5 + GamePlay.Inst.node_changeCellItemUI.height * 0.5 + 20;
+    }
+
+    //onClick
+    onClickRedPacketIcon() {
+        if (this.bar_progress.progress == 1) {
+            EffectMgr.Inst.addTip("已达成目标啦,过关发放哦");
+        }
+        else {
+            EffectMgr.Inst.addTip("达到目标分数,才能领取哦");
+        }
+    }
+
+    //自定义事件---------------------------------------------------------------------
+    /**微信授权返回 */
+    onWxAuthBack() {
+        if (this.node.active) {
+            this.restart(false);
+            //
+            let node_redPacketUI = mk.ui.getCurOnPanel("RedPacketUI")
+            if (node_redPacketUI) {
+                mk.ui.closePanel("RedPacketUI");
+            }
+        }
+
+        this.initLevel();
+        this.initTotalScore();
+        this.initPropNum();
+
+        mk.event.remove(EVENT_TYPE.BACK_WxAuth, this.onWxAuthBack, this);
+    }
+
+    //其他显示或逻辑项-------------------------------------------------------------------
+    /**根据vecList清除cellItem */
+    public cleanCellItemByVecList() {
+
+        //LogUtil.log("[Game] Game.Inst.cleanCellItemVecArr", Game.Inst.cleanCellItemVecArr);
+
+        //没有可清清除
+        if (GamePlay.Inst.cleanedVecArr.length <= 0) {
+            //FC:+ 是否可以点击
+            this.ifCouldClick = true;
+            EffectMgr.Inst.addTip("点击两个或以上消除哦");
+            return;
+        }
+
+        //区分消除音效
+        if (GamePlay.Inst.cleanedVecArr.length >= 4) {
+            // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.eliminate_bonus);
+            mk.audio.playEffect("ef_eliminate_bonus");
+        }
+        else {
+            //AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.eliminate);
+            mk.audio.playEffect("ef_eliminate");
+        }
+
+        // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.fly);
+        mk.audio.playEffect("ef_fly");
+
+        //同时消除
+        for (var i = 0; i < GamePlay.Inst.cleanedVecArr.length; i++) {
+            let vec = GamePlay.Inst.cleanedVecArr[i];
+
+            //最后一个判定
+            if (i == GamePlay.Inst.cleanedVecArr.length - 1) {
+                this.checkBonusNum(GamePlay.Inst.cleanedVecArr.length);
+                GamePlay.Inst.cellItemDic[vec.x][vec.y].recycle(false, true);
+            }
+            else {
+                GamePlay.Inst.cellItemDic[vec.x][vec.y].recycle();
+            }
+
+            //回收 注释 改成如上
+            //Game.Inst.cellItemDic[vec.x][vec.y].recycle();
+
+            //Game.Inst.cellItemDic[vec.x][vec.y] = null;
+
+            if (this.cleanXIndexArr.indexOf(vec.x) == -1) {
+                this.cleanXIndexArr.push(vec.x);
+            }
+        }
+        this.cleanXIndexArr.sort();
+
+        //计算下全部移除的
+        this.allCleanedXArr = GameLogic.getAllCleanXIndex(this.cleanXIndexArr);
+
+        //FC:移除完,检测下落
+        this.scheduleOnce(() => {
+            //检测下落
+            this.checkMoveDownCellItem();
+        }, 0.2)
+    }
+
+    /**检测向下移动的cellItem */
+    checkMoveDownCellItem() {
+        mk.console.log("this.cleanXIndexArr", this.cleanXIndexArr);
+        for (var i = 0; i < this.cleanXIndexArr.length; i++) {
+            let xIndex = this.cleanXIndexArr[i];
+            this.moveYCellItem(xIndex);
+        }
+    }
+
+    /**移动
+     * @param xIndex 移除的纵列
+     * @param removedYIndex 移除的横向index
+     */
+    public moveYCellItem(xIndex: number) {
+
+        // LogUtil.log("moveYCellItem x", xIndex, this.allCleanedXArr);
+
+        /**移动的次序(第几个移动的用来控制延迟移动的时间) */
+        let movedIndex: number = 0;
+        //移动位置间隔(比如前面两个空位就移动两格)
+        let intervalNum: number = 0;
+
+        /**是否是全部清理的x */
+        let ifAllCleanedX: boolean = this.allCleanedXArr.indexOf(xIndex) != -1;
+        /**是否是最后清理的x(全部清理完才开始左移) */
+        let ifLastCleanX: boolean = (xIndex == this.cleanXIndexArr[this.cleanXIndexArr.length - 1]);
+
+        let cellItemDic = GamePlay.Inst.cellItemDic[xIndex];
+
+        //计算y方向移动的最后一位(这样只计算一次不用循环)
+        let lastMoveCellItemY: number = null;
+        let leftLastCellItemY: number = null;
+        if (ifLastCleanX) {
+            let lastCellItemArrSort = this.cleanedVecArr.filter((vec) => vec.x == xIndex).sort();
+            lastMoveCellItemY = lastCellItemArrSort[0].y;
+            // LogUtil.log("lastCellItemY", xIndex, lastMoveCellItemY, lastCellItemArrSort);
+
+            for (var i = 0; i < GameConst.row_num; i++) {
+                if (cellItemDic) {
+                    let cellItem = cellItemDic[i];
+                    if (cellItem) {
+                        leftLastCellItemY = cellItem.y;
+                        // LogUtil.log("leftLastCellItemY", leftLastCellItemY);
+                        break;
+                    }
+                }
+            }
+            // let leftCellItemArrSort = this.cl
+        }
+
+        //如果最后一行 并且 是被全部清除的x
+        if (ifLastCleanX && ifAllCleanedX) {
+            // LogUtil.log("【checkMoveLeftCellItem】检测消除 全部消除的一列就是消除xIndex中最后一列");
+            this.checkMoveLeftCellItem();
+            return;
+        }
+        //y方向从下至上循环排查
+
+        for (var i = GameConst.row_num - 1; i >= 0; i--) {
+            if (cellItemDic) {
+                let cellItem = cellItemDic[i];
+                //该xIndex纵列没有全部移除
+                if (cellItem) {
+                    if (ifLastCleanX && i == leftLastCellItemY) {
+                        // LogUtil.log("【checkMoveLeftCellItem】检测消除 移除了最后一个");
+                        cellItem.moveDown(xIndex, i + intervalNum, movedIndex, true);
+                    }
+                    else {
+                        cellItem.moveDown(xIndex, i + intervalNum, movedIndex);
+                    }
+                    movedIndex++;
+                }
+                else {
+                    intervalNum += 1;
+                }
+            }
+            else {
+                continue;
+            }
+        }
+    }
+
+    /**检测向左移动的cellItem */
+    checkMoveLeftCellItem() {
+
+        //计算消除的纵列中,有没有被全部移除
+        //let allCleanedXArr = GameUtil.getAllCleanXIndex(this.cleanXIndexArr);
+        // LogUtil.log("[Game] checkMoveLeftCellItem  allCleanXArr ---------------------", this.allCleanedXArr);
+
+        //如果没有全部移除得就return
+        if (this.allCleanedXArr.length <= 0) {
+            //LogUtil.log("【checkMoveLeftCellItem】检测是否能消除 没有全部移除的");
+            GamePlay.Inst.ifCouldClick = true;
+            GamePlay.Inst.checkIfEliminate();
+            return;
+        }
+
+        //剩余一列未移除的xIndex
+        let leftXIndexArr: number[] = GameLogic.getLeftXIndexArr();
+        let leftMaxXIndex: number = leftXIndexArr[leftXIndexArr.length - 1];
+
+        if (leftXIndexArr.length <= 0) {
+            //检测是否移除
+            this.checkIfEliminate();
+        }
+        else {
+            mk.console.log("leftXIndexArr", leftXIndexArr);
+            let intervalNum: number = 0;
+            for (var i = 0; i < GameConst.col_num; i++) {
+                let cellItemArr = GamePlay.Inst.cellItemDic[i];
+                if (this.allCleanedXArr.indexOf(i) == -1) {
+                    //剩余存在的cellItem
+                    let leftCellItemArr = cellItemArr.filter((cellItem) => cellItem != null);
+
+                    if (intervalNum > 0) {
+                        for (var j = 0; j < cellItemArr.length; j++) {
+                            let cellItem = cellItemArr[j];
+                            if (cellItem) {
+                                if (i == leftMaxXIndex && j == (leftCellItemArr[0].y)) {
+                                    mk.console.log("i,j,intervalNum", i, j, intervalNum);
+                                    cellItem.moveLeft(i - intervalNum, j, true);
+                                }
+                                else {
+                                    cellItem.moveLeft(i - intervalNum, j);
+                                }
+                            }
+                        }
+                    }
+                    else {
+                        //对应 1 2 3 列 中 3全部消除
+                        if (i == leftMaxXIndex) {
+                            GamePlay.Inst.ifCouldClick = true;
+                            GamePlay.Inst.checkIfEliminate();
+                        }
+                    }
+                }
+                else {
+                    intervalNum += 1;
+                }
+            }
+        }
+    }
+
+    public timeout_pass: number = 0;
+
+    /**检测是否能移除 */
+    checkIfEliminate() {
+        mk.console.log("开始检测是否还能够消除!!!!!!!!!!!!!!!!!!!!!");
+
+        //FC:测试替换
+        GameLogic.getCouldCleanVec();
+        if (this.couldCleanVecArr.length <= 0 && !this.ifPass) {
+            this.ifPass = true;
+            EffectMgr.Inst.addSpriteTip(TIP_SPRITEITEM_TYPE.NormalPass);
+            let timeOut = setTimeout(() => {
+                this.pass();
+                clearTimeout(timeOut);
+            }, 1500);
+        }
+
+        //FC:正式使用
+        // let timeOut = setTimeout(() => {
+        //     GameUtil.getCouldCleanVec();
+        //     if (this.couldCleanVecArr.length <= 0 && !this.ifPass) {
+        //         this.pass();
+        //     }
+        //     clearTimeout(timeOut);
+        // }, 1500);
+    }
+
+    getCouldCleanCellItem() {
+        for (var i = 0; this.cellItemArr.length; i++) {
+            let cellItem = this.cellItemArr[i];
+            let aroundSameType = GameLogic.getAroundSameType(cellItem.x, cellItem.y, cellItem.type, false);
+            if (aroundSameType.length > 0) {
+                return;
+            }
+        }
+        //this.nextLevel();
+        this.pass();
+        //this.recycleAllCellItem();
+    }
+
+    /**restart
+     * @param 是否扣除体力
+     */
+    restart(ifMinusEnergy: boolean = false) {
+        mk.console.log("restart!!!!!!!!!!!!!!!")
+        this.refreshGame();
+    }
+
+    /**下一关 */
+    nextLevel(ifMinusEnergy: boolean = false) {
+        mk.console.log("nextLevel!!!!!!!!!!!!!!!")
+        this.refreshGame();
+    }
+
+    /**刷新关卡 */
+    refreshGame() {
+
+        this.recycleAllRedPacket();
+        this.recycleAllCellItem();
+        this.ifPass = false;
+        this.ifGetPass = false;
+        this.ifCouldClick = true;
+        this.initLevel();
+        this.initTotalScore();
+        this.curProgressScore = 0;
+        this.curGetScore = 0;
+        this.finalGetScore = 0;
+        this.ani_redPacketIcon.play();
+        this.initScore();
+    }
+
+    /**回收红包 */
+    recycleAllRedPacket() {
+        while (this.node_levelRedPacketUI.childrenCount > 0) {
+            let node_levelRedPacket = this.node_levelRedPacketUI.children[0];
+            node_levelRedPacket.getComponent(LevelRedPacketItem).recycle();
+        }
+    }
+
+    /**回收所有的 */
+    recycleAllCellItem() {
+        for (var i = 0; i < GameConst.col_num; i++) {
+            for (var j = 0; j < GameConst.row_num; j++) {
+                let cellItem = this.cellItemDic[i][j];
+                if (cellItem) {
+                    mk.console.log("回收把>>>>>>>>>>>>>>>>>>>>>>");
+                    cellItem.recycle(true, false, false);
+                }
+            }
+        }
+        // while (this.cellItemList.length > 0) {
+        //     this.cellItemList.splice(0, 1);
+        //     this.cellItemList[0].recycle();
+        // }
+        this.cellItemArr = [];
+        this.cellItemDic = {};
+        this.curXIndex = 0;
+        this.curYIndex = GameConst.row_num - 1;
+
+        this.initCell();
+    }
+
+    /**通关 */
+    pass() {
+
+        //这边会多次进入
+        if (GamePlay.Inst.node.active == false) {
+            return;
+        }
+
+        this.ifPass = true;
+
+        GamePlay.Inst.ifGetPass = false;
+
+        let passLevelNum = PlayerConst.levelNum + 1;
+        mk.console.log("[Game]pass passLevelNum", passLevelNum);
+
+        GamePlay.Inst.ifGetPass = true;
+        PlayerConst.levelNum = passLevelNum;
+
+        //视频计数
+        DataMgr.Inst.updatePassNum(++PlayerConst.passNum);
+
+        mk.console.log("PlayerConst.passNum", PlayerConst.passNum);
+
+        //游戏结算
+        this.gameCount();
+
+        // LogUtil.log("SurpriseTaskUI.ifAllCompleted", SurpriseTaskUI.ifAllCompleted);
+        // LogUtil.log("score", score);
+
+        // //发送过关消息
+        // HttpMgr.Inst.pass(passLevelNum, score).then((data) => {
+
+        //     LogUtil.log("pass data", data);
+        //     Game.Inst.ifGetPass = true;
+        //     PlayerConst.levelNum = passLevelNum;
+
+        //     //视频计数
+        //     DataMgr.Inst.updatePassNum(++PlayerConst.passNum);
+
+        //     LogUtil.log("PlayerConst.passNum", PlayerConst.passNum);
+
+        //     if (score && !data) {
+        //         DataMgr.Inst.updateShopScoreNum(score);
+        //     }
+        //     else {
+        //         //如果提示 已达单关积分获取次数!
+        //         if (data) {
+        //             SurpriseTaskUI.ifGetScore = true;
+        //             SurpriseTaskUI.getSurpriseTaskScore = 0;
+        //         }
+        //     }
+
+        //     //游戏结算
+        //     this.gameCount();
+
+        // }).catch((err) => {
+        //     LogUtil.log("pass err", err);
+        //     Game.Inst.ifGetPass = true;
+        //     if (err) {
+        //         let errCode = err.errcode;
+        //         switch (errCode) {
+        //             case 500:
+        //                 GameMgr.Inst.sendEvent("Error", `服务器发生500错误`);
+        //                 break;
+        //             case PASS_ERR_CODE.PASSNO_INCORRECT:
+        //             case PASS_ERR_CODE.PASSNO_NULL:
+        //                 GameMgr.Inst.sendEvent("PassError", `过关异常,第${PlayerConst.levelNum}关`);
+
+        //                 DataMgr.Inst.updatePassNum(++PlayerConst.passNum);
+        //                 PlayerConst.levelNum = passLevelNum;
+        //                 break;
+        //             case PASS_ERR_CODE.SCORE_OVER_TIMES:
+        //                 //视频计数
+        //                 DataMgr.Inst.updatePassNum(++PlayerConst.passNum);
+        //                 PlayerConst.levelNum = passLevelNum;
+        //                 break;
+        //             case PASS_ERR_CODE.SCORE_PARAM_ILLEGAL:
+        //                 GameMgr.Inst.sendEvent("PassError", `获取积分异常(积分传参非法)`);
+
+        //                 EffectMgr.Inst.addTip("您本次积分异常,请不要作弊哦");
+        //                 DataMgr.Inst.updatePassNum(++PlayerConst.passNum);
+        //                 PlayerConst.levelNum = passLevelNum;
+
+        //                 break;
+        //             case PASS_ERR_CODE.SCORE_REACH_LIMIT:
+        //                 GameMgr.Inst.sendEvent("PassError", `已达今日积分上限`);
+
+        //                 EffectMgr.Inst.addTip("您今天积分已达上限啦,明天再来吧");
+        //                 DataMgr.Inst.updatePassNum(++PlayerConst.passNum);
+        //                 PlayerConst.levelNum = passLevelNum;
+        //                 break;
+        //         }
+        //     }
+        //     //游戏结算
+        //     this.gameCount();
+        // });
+    }
+
+    /**游戏结算 */
+    gameCount() {
+
+        //如果随机红包激活了,那么
+        let node_levelRedPacketUI = mk.ui.getCurOnPanel("LevelRedPacketUI");
+        if (node_levelRedPacketUI) {
+            mk.ui.closePanel("LevelRedPacketUI");
+        }
+
+        let node_getPropUI = mk.ui.getCurOnPanel("GetPropUI");
+        if (node_getPropUI) {
+            mk.ui.closePanel("GetPropUI");
+        }
+
+
+        //前2关 取消红包显示  放在这边主要是 能够继续玩下去
+        if (this.finalGetScore >= this.targetScore && PlayerConst.levelNum > 2) {
+            // Main.Inst.node_gameOverUI.active = true;
+
+            let num = PlayerConst.todayTargetRedPacketNum - PlayerConst.todayPassRedPacketNum;
+            mk.console.log("num", num);
+            let tip = "";
+            if (num > 0) {
+                tip = `再领取${num}个过关红包完成今日打卡`;
+            }
+            else {
+                tip = `今日已经打卡成功,快去提现吧`;
+            }
+
+            mk.ui.openPanel("RedPacketUI").then((node) => {
+                let redPacketUI = node.getComponent(RedPacketUI);
+                redPacketUI.init("过关红包", 0.2, () => { this.gameOver() }, tip)
+            })
+        }
+        else {
+            this.gameOver();
+        }
+
+        //测试切换
+        // this.gameOver();
+    }
+
+    /**游戏结束 */
+    gameOver() {
+        mk.ui.openPanel("GameOverUI");
+    }
+
+    checkBonusNum(cleanCellItemNum: number) {
+
+        if (cleanCellItemNum >= 4) {
+            let node_bonusTip = PoolMgr.Inst.getPoolPrefab(NODEPOOLPREFABTYPE.BonusTip);
+            let bonusTip = node_bonusTip.getComponent(BonusTip);
+            //LogUtil.log("bonusTip",bonusTip);
+            if (cleanCellItemNum == 4) {
+                bonusTip.init(4);
+                // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.bonus4);
+                mk.audio.playEffect("ef_bonus4");
+            }
+            else if (cleanCellItemNum == 5) {
+                bonusTip.init(5);
+                // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.bonus5);
+                mk.audio.playEffect("ef_bonus5");
+            }
+            else if (cleanCellItemNum == 6) {
+                bonusTip.init(6);
+                // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.bonus6);
+                mk.audio.playEffect("ef_bonus6");
+            }
+            else if (cleanCellItemNum == 7) {
+                bonusTip.init(7);
+                // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.bonus7);
+                mk.audio.playEffect("ef_bonus7");
+            }
+            else if (cleanCellItemNum == 8) {
+                bonusTip.init(8);
+                // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.bonus8);
+                mk.audio.playEffect("ef_bonus8");
+            }
+            else {
+                bonusTip.init(8);
+                // AudioMgr.Inst.playEffect(AUDIO_CLIP_NAME.bonus8);
+                mk.audio.playEffect("ef_bonus8");
+            }
+
+
+            this.node_effectUI.addChild(node_bonusTip);
+        }
+    }
+
+    checkAddLevelRedPacket(eliminateNum: number): boolean {
+        let chance = (eliminateNum - 3) * 0.2;
+        let random = Math.random();
+        if (random < chance) {
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+
+    public interval_ShowGuide: number = null;
+    //间隔显示
+    intervalShowGuide() {
+        this.cancelShowCouldCleanCellItem();
+        this.interval_ShowGuide = setInterval(() => {
+            this.showCouldCleanCellItem();
+        }, 10000);
+    }
+
+    /**显示 */
+    showCouldCleanCellItem() {
+        if (mk.ui.getCurOnPanel("RedPacketUI") || mk.ui.getCurOnPanel("GameOverUI") || !this.couldCleanVecArr || !this.cellItemDic) {
+            return;
+        }
+        if (this.couldCleanVecArr.length <= 0) {
+            GameLogic.getCouldCleanVec();
+        }
+        if (this.couldCleanVecArr.length > 0) {
+            for (var i = 0; i < this.couldCleanVecArr.length; i++) {
+                let vec = this.couldCleanVecArr[i];
+                if (this.cellItemDic[vec.x]) {
+                    let cellItem = this.cellItemDic[vec.x][vec.y];
+                    if (cellItem) {
+                        cellItem.shake();
+                    }
+                }
+                else {
+
+                }
+            }
+        }
+    }
+
+    /**取消显示 */
+    cancelShowCouldCleanCellItem() {
+        if (this.interval_ShowGuide) {
+            clearInterval(this.interval_ShowGuide);
+            this.interval_ShowGuide = null;
+            if (this.couldCleanVecArr.length > 0) {
+                for (var i = 0; i < this.couldCleanVecArr.length; i++) {
+                    let vec = this.couldCleanVecArr[i];
+                    let cellItem = this.cellItemDic[vec.x][vec.y];
+                    if (cellItem) {
+                        cellItem.normal();
+                    }
+                }
+            }
+            this.couldCleanVecArr = [];
+        }
+    }
+}

+ 9 - 0
assets/script/before/GamePlay.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "a2b962b8-691a-48ba-bb9d-2ea75ab4e796",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}