Browse Source

定位无问题

芋圆号航母 6 years ago
parent
commit
f8a0150678
100 changed files with 3132 additions and 2893 deletions
  1. BIN
      assets/resources/00114d.jpg
  2. BIN
      assets/resources/00115d.jpg
  3. BIN
      assets/resources/00116d.jpg
  4. BIN
      assets/resources/00117d.jpg
  5. BIN
      assets/resources/00118d.jpg
  6. 0 31
      assets/resources/00118d.jpg.meta
  7. BIN
      assets/resources/00119d.jpg
  8. 0 31
      assets/resources/00119d.jpg.meta
  9. BIN
      assets/resources/00120d.jpg
  10. 0 31
      assets/resources/00120d.jpg.meta
  11. BIN
      assets/resources/00249d.jpg
  12. 0 31
      assets/resources/00249d.jpg.meta
  13. BIN
      assets/resources/00266d.jpg
  14. 0 31
      assets/resources/00266d.jpg.meta
  15. BIN
      assets/resources/all.jpg
  16. 7 0
      assets/resources/check.meta
  17. 7 0
      assets/resources/hud.meta
  18. BIN
      assets/resources/hud/back.png
  19. 31 0
      assets/resources/hud/back.png.meta
  20. BIN
      assets/resources/hud/friend.png
  21. 8 8
      assets/resources/00116d.jpg.meta
  22. BIN
      assets/resources/hud/infi.png
  23. 8 8
      assets/resources/00117d.jpg.meta
  24. BIN
      assets/resources/hud/left.png
  25. 8 8
      assets/resources/00114d.jpg.meta
  26. BIN
      assets/resources/hud/rank.png
  27. 8 8
      assets/resources/all.jpg.meta
  28. BIN
      assets/resources/hud/restart.png
  29. 31 0
      assets/resources/hud/restart.png.meta
  30. BIN
      assets/resources/hud/right.png
  31. 31 0
      assets/resources/hud/right.png.meta
  32. BIN
      assets/resources/hud/scorepanel.png
  33. 31 0
      assets/resources/hud/scorepanel.png.meta
  34. BIN
      assets/resources/hud/share.png
  35. 31 0
      assets/resources/hud/share.png.meta
  36. BIN
      assets/resources/hud/start.png
  37. 31 0
      assets/resources/hud/start.png.meta
  38. BIN
      assets/resources/mine_left_to_left.png
  39. 0 31
      assets/resources/mine_left_to_left.png.meta
  40. BIN
      assets/resources/mine_left_to_rival_right.png
  41. 0 31
      assets/resources/mine_left_to_rival_right.png.meta
  42. BIN
      assets/resources/mine_peel_right_to_right.png
  43. 0 31
      assets/resources/mine_peel_right_to_right.png.meta
  44. BIN
      assets/resources/mine_right_to_right.png
  45. 0 31
      assets/resources/mine_right_to_right.png.meta
  46. 7 0
      assets/resources/nums.meta
  47. BIN
      assets/resources/nums/num_0.png
  48. 31 0
      assets/resources/nums/num_0.png.meta
  49. BIN
      assets/resources/nums/num_1.png
  50. 31 0
      assets/resources/nums/num_1.png.meta
  51. BIN
      assets/resources/nums/num_2.png
  52. 31 0
      assets/resources/nums/num_2.png.meta
  53. BIN
      assets/resources/nums/num_3.png
  54. 31 0
      assets/resources/nums/num_3.png.meta
  55. BIN
      assets/resources/nums/num_4.png
  56. 31 0
      assets/resources/nums/num_4.png.meta
  57. BIN
      assets/resources/nums/num_5.png
  58. 31 0
      assets/resources/nums/num_5.png.meta
  59. BIN
      assets/resources/nums/num_6.png
  60. 31 0
      assets/resources/nums/num_6.png.meta
  61. BIN
      assets/resources/nums/num_7.png
  62. 8 8
      assets/resources/00115d.jpg.meta
  63. BIN
      assets/resources/nums/num_8.png
  64. 31 0
      assets/resources/nums/num_8.png.meta
  65. BIN
      assets/resources/nums/num_9.png
  66. 31 0
      assets/resources/nums/num_9.png.meta
  67. BIN
      assets/resources/rival_pat_right_to_left.png
  68. 0 31
      assets/resources/rival_pat_right_to_left.png.meta
  69. BIN
      assets/resources/rival_peel_left_to_right.png
  70. 0 31
      assets/resources/rival_peel_left_to_right.png.meta
  71. 1230 340
      assets/scenes/mainscene.fire
  72. 308 0
      assets/scenes/rankscene.fire
  73. 1 1
      assets/scenes/test.fire.meta
  74. 391 582
      assets/scenes/test.fire
  75. 7 0
      assets/scenes/startscene.fire.meta
  76. 100 0
      assets/scripts/actions/fail.js
  77. 1 1
      assets/scripts/balls/bump.js.meta
  78. 38 0
      assets/scripts/actions/peel.js
  79. 100 0
      assets/scripts/actions/win.js
  80. 9 0
      assets/scripts/actions/win.js.meta
  81. 0 567
      assets/scripts/arc.js
  82. 392 47
      assets/scripts/balls/ball.js
  83. 0 66
      assets/scripts/balls/bump.js
  84. 0 111
      assets/scripts/balls/minepatltol.js
  85. 0 108
      assets/scripts/balls/minepatltor.js
  86. 0 41
      assets/scripts/balls/minepatrtol.js
  87. 0 9
      assets/scripts/balls/minepatrtol.js.meta
  88. 0 102
      assets/scripts/balls/minepatrtor.js
  89. 0 9
      assets/scripts/balls/minepatrtor.js.meta
  90. 0 126
      assets/scripts/balls/minepeelrtor.js
  91. 0 9
      assets/scripts/balls/minepeelrtor.js.meta
  92. 0 108
      assets/scripts/balls/rivalpatrtol.js
  93. 0 9
      assets/scripts/balls/rivalpatrtol.js.meta
  94. 0 110
      assets/scripts/balls/rivalpeelrtor.js
  95. 0 9
      assets/scripts/balls/rivalpeelrtor.js.meta
  96. 0 148
      assets/scripts/balls/rivalserve.js
  97. 0 9
      assets/scripts/balls/rivalserve.js.meta
  98. 29 0
      assets/scripts/configs/ballconfig.js
  99. 0 0
      assets/scripts/ctrls.meta
  100. 0 0
      assets/scripts/ctrls/mainctrl.js

BIN
assets/resources/00114d.jpg


BIN
assets/resources/00115d.jpg


BIN
assets/resources/00116d.jpg


BIN
assets/resources/00117d.jpg


BIN
assets/resources/00118d.jpg


+ 0 - 31
assets/resources/00118d.jpg.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "d3bc0215-590b-4794-b128-207bf0de1b8d",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "00118d": {
-      "ver": "1.0.3",
-      "uuid": "757565ec-b50e-41f6-b3cb-fe27bc676cb1",
-      "rawTextureUuid": "d3bc0215-590b-4794-b128-207bf0de1b8d",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
assets/resources/00119d.jpg


+ 0 - 31
assets/resources/00119d.jpg.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "8edc7c86-bbe2-420d-8130-04058914dd4e",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "00119d": {
-      "ver": "1.0.3",
-      "uuid": "3b8de088-875b-4525-8c2f-91c3b14047f4",
-      "rawTextureUuid": "8edc7c86-bbe2-420d-8130-04058914dd4e",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
assets/resources/00120d.jpg


+ 0 - 31
assets/resources/00120d.jpg.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "c481f3ef-623f-4974-8041-d8568fd216b9",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "00120d": {
-      "ver": "1.0.3",
-      "uuid": "ad19c466-2bdf-4158-a848-b2d7113be022",
-      "rawTextureUuid": "c481f3ef-623f-4974-8041-d8568fd216b9",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
assets/resources/00249d.jpg


+ 0 - 31
assets/resources/00249d.jpg.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "47621a77-e5e6-4243-becc-470bcb96155d",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "00249d": {
-      "ver": "1.0.3",
-      "uuid": "c0e869a4-e0e8-48a9-bc2b-dae3ac718e18",
-      "rawTextureUuid": "47621a77-e5e6-4243-becc-470bcb96155d",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
assets/resources/00266d.jpg


+ 0 - 31
assets/resources/00266d.jpg.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "a1a31a84-0d05-403b-8ba3-129f198b17b3",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "00266d": {
-      "ver": "1.0.3",
-      "uuid": "c8009869-264d-4ba6-9b40-5a51e35a068e",
-      "rawTextureUuid": "a1a31a84-0d05-403b-8ba3-129f198b17b3",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
assets/resources/all.jpg


+ 7 - 0
assets/resources/check.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "54e33076-be6b-4713-80bd-e7705e3ba1f1",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 7 - 0
assets/resources/hud.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "3ca2add9-7536-4df4-a149-d3a3de41bf48",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

BIN
assets/resources/hud/back.png


+ 31 - 0
assets/resources/hud/back.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "ea8be033-2139-46b8-b348-e6103dbf7fcf",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "back": {
+      "ver": "1.0.3",
+      "uuid": "7f5d3a91-4752-45b1-9392-12a2835af0f9",
+      "rawTextureUuid": "ea8be033-2139-46b8-b348-e6103dbf7fcf",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 646,
+      "height": 337,
+      "rawWidth": 646,
+      "rawHeight": 337,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/hud/friend.png


+ 8 - 8
assets/resources/00116d.jpg.meta

@@ -1,15 +1,15 @@
 {
   "ver": "2.2.0",
-  "uuid": "a247fb68-bf73-44a7-99ce-e12add8c7484",
+  "uuid": "5b548366-7c68-46b5-92aa-0550238cba0b",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
   "premultiplyAlpha": false,
   "subMetas": {
-    "00116d": {
+    "friend": {
       "ver": "1.0.3",
-      "uuid": "3903e71f-1e0f-4ffa-98ea-fa48f3e0df2b",
-      "rawTextureUuid": "a247fb68-bf73-44a7-99ce-e12add8c7484",
+      "uuid": "46173aec-5cb4-4c59-9881-1ac4778b834e",
+      "rawTextureUuid": "5b548366-7c68-46b5-92aa-0550238cba0b",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
+      "width": 1033,
+      "height": 331,
+      "rawWidth": 1033,
+      "rawHeight": 331,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/resources/hud/infi.png


+ 8 - 8
assets/resources/00117d.jpg.meta

@@ -1,15 +1,15 @@
 {
   "ver": "2.2.0",
-  "uuid": "c38fd924-ff0c-4ce0-aa00-c83746c68a4a",
+  "uuid": "b8353312-77b4-48b5-a295-17893841b616",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
   "premultiplyAlpha": false,
   "subMetas": {
-    "00117d": {
+    "infi": {
       "ver": "1.0.3",
-      "uuid": "367e8ab4-651a-41f8-a711-7dd7c4b77dc4",
-      "rawTextureUuid": "c38fd924-ff0c-4ce0-aa00-c83746c68a4a",
+      "uuid": "d06a7d9d-2ba5-48f0-87f0-1bc0277f2296",
+      "rawTextureUuid": "b8353312-77b4-48b5-a295-17893841b616",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
+      "width": 1033,
+      "height": 331,
+      "rawWidth": 1033,
+      "rawHeight": 331,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/resources/hud/left.png


+ 8 - 8
assets/resources/00114d.jpg.meta

@@ -1,15 +1,15 @@
 {
   "ver": "2.2.0",
-  "uuid": "79889877-f592-44ee-9898-a1abd66e52a1",
+  "uuid": "09c9bb3b-2209-4138-9169-530c0967a71e",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
   "premultiplyAlpha": false,
   "subMetas": {
-    "00114d": {
+    "left": {
       "ver": "1.0.3",
-      "uuid": "e39736b2-63ae-43a6-befd-c40a8ea4b70d",
-      "rawTextureUuid": "79889877-f592-44ee-9898-a1abd66e52a1",
+      "uuid": "1dd6a341-8437-4f61-b0af-dda75492893a",
+      "rawTextureUuid": "09c9bb3b-2209-4138-9169-530c0967a71e",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
+      "width": 772,
+      "height": 567,
+      "rawWidth": 772,
+      "rawHeight": 567,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/resources/hud/rank.png


+ 8 - 8
assets/resources/all.jpg.meta

@@ -1,15 +1,15 @@
 {
   "ver": "2.2.0",
-  "uuid": "81a9e83f-bcd2-4831-9ecc-7e3d29c77562",
+  "uuid": "25512c81-455c-443e-b615-54b1e15b4c60",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
   "premultiplyAlpha": false,
   "subMetas": {
-    "all": {
+    "rank": {
       "ver": "1.0.3",
-      "uuid": "295c783e-3e80-4a11-b239-7e9a2ec0c4e2",
-      "rawTextureUuid": "81a9e83f-bcd2-4831-9ecc-7e3d29c77562",
+      "uuid": "ddf52628-d27b-4518-9e1a-e37642cefd62",
+      "rawTextureUuid": "25512c81-455c-443e-b615-54b1e15b4c60",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
+      "width": 853,
+      "height": 335,
+      "rawWidth": 853,
+      "rawHeight": 335,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/resources/hud/restart.png


+ 31 - 0
assets/resources/hud/restart.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "439ff4e7-67d0-43e9-9f46-bc5883777eb3",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "restart": {
+      "ver": "1.0.3",
+      "uuid": "1f7bc41a-752d-4206-9253-ac8c977f5650",
+      "rawTextureUuid": "439ff4e7-67d0-43e9-9f46-bc5883777eb3",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 1033,
+      "height": 331,
+      "rawWidth": 1033,
+      "rawHeight": 331,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/hud/right.png


+ 31 - 0
assets/resources/hud/right.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "00cd4931-8218-451e-b9de-be21dceb4a4a",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "right": {
+      "ver": "1.0.3",
+      "uuid": "e2db2671-592a-4c6c-a11d-18c3757584db",
+      "rawTextureUuid": "00cd4931-8218-451e-b9de-be21dceb4a4a",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 772,
+      "height": 567,
+      "rawWidth": 772,
+      "rawHeight": 567,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/hud/scorepanel.png


+ 31 - 0
assets/resources/hud/scorepanel.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "8f10203b-0f12-4e96-a87d-bf556308bc84",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "scorepanel": {
+      "ver": "1.0.3",
+      "uuid": "00e0a063-93c8-40d8-a909-1f2b4711047b",
+      "rawTextureUuid": "8f10203b-0f12-4e96-a87d-bf556308bc84",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 1033,
+      "height": 331,
+      "rawWidth": 1033,
+      "rawHeight": 331,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/hud/share.png


+ 31 - 0
assets/resources/hud/share.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "fd3a7fc0-f4e4-495a-a0bc-d90ec4d25a91",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "share": {
+      "ver": "1.0.3",
+      "uuid": "45a55c28-1219-4d3d-a499-e19355a1fb65",
+      "rawTextureUuid": "fd3a7fc0-f4e4-495a-a0bc-d90ec4d25a91",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 646,
+      "height": 337,
+      "rawWidth": 646,
+      "rawHeight": 337,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/hud/start.png


+ 31 - 0
assets/resources/hud/start.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "1a58a84f-c742-4464-b6a7-27ac6e465485",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "start": {
+      "ver": "1.0.3",
+      "uuid": "35e55c3a-00cd-4d51-98a0-508230940180",
+      "rawTextureUuid": "1a58a84f-c742-4464-b6a7-27ac6e465485",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 646,
+      "height": 337,
+      "rawWidth": 646,
+      "rawHeight": 337,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/mine_left_to_left.png


+ 0 - 31
assets/resources/mine_left_to_left.png.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "7c92cbb7-b2e7-4c68-bd83-fcda091126c7",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "mine_left_to_left": {
-      "ver": "1.0.3",
-      "uuid": "a47a28c8-d0f2-4fb7-952c-f7e3592cdb04",
-      "rawTextureUuid": "7c92cbb7-b2e7-4c68-bd83-fcda091126c7",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
assets/resources/mine_left_to_rival_right.png


+ 0 - 31
assets/resources/mine_left_to_rival_right.png.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "43ed3e94-14c7-49f3-909d-b3cb15024a88",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "mine_left_to_rival_right": {
-      "ver": "1.0.3",
-      "uuid": "5674ae5b-987d-463b-addb-e80460b66bb0",
-      "rawTextureUuid": "43ed3e94-14c7-49f3-909d-b3cb15024a88",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
assets/resources/mine_peel_right_to_right.png


+ 0 - 31
assets/resources/mine_peel_right_to_right.png.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "84e8ae80-f053-4c49-a089-ff72202aeb1f",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "mine_peel_right_to_right": {
-      "ver": "1.0.3",
-      "uuid": "b5a7fdfd-4d74-4b1f-9dfd-d11e3999e895",
-      "rawTextureUuid": "84e8ae80-f053-4c49-a089-ff72202aeb1f",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
assets/resources/mine_right_to_right.png


+ 0 - 31
assets/resources/mine_right_to_right.png.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "783dbdc4-fe35-486f-9c63-b80a53dfcd27",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "mine_right_to_right": {
-      "ver": "1.0.3",
-      "uuid": "6188ebdf-02e6-4f90-8541-3cb7d16e69d0",
-      "rawTextureUuid": "783dbdc4-fe35-486f-9c63-b80a53dfcd27",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

+ 7 - 0
assets/resources/nums.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "4c5158d0-86e4-492b-8a86-dda974bddbec",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

BIN
assets/resources/nums/num_0.png


+ 31 - 0
assets/resources/nums/num_0.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "7b5238e2-11cc-4d00-8cf6-460b3c863e16",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "num_0": {
+      "ver": "1.0.3",
+      "uuid": "8700f65c-d6cd-465b-ba59-eea4f102c7c8",
+      "rawTextureUuid": "7b5238e2-11cc-4d00-8cf6-460b3c863e16",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 126,
+      "height": 185,
+      "rawWidth": 126,
+      "rawHeight": 185,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/nums/num_1.png


+ 31 - 0
assets/resources/nums/num_1.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "c5535b1e-1639-4d86-ae1f-15b1f5d75982",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "num_1": {
+      "ver": "1.0.3",
+      "uuid": "bc0a95cc-a897-40c9-b590-2b56d51aa992",
+      "rawTextureUuid": "c5535b1e-1639-4d86-ae1f-15b1f5d75982",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 118,
+      "height": 184,
+      "rawWidth": 118,
+      "rawHeight": 184,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/nums/num_2.png


+ 31 - 0
assets/resources/nums/num_2.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "86618299-bc09-4443-8adc-dd33b486de0c",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "num_2": {
+      "ver": "1.0.3",
+      "uuid": "03dae768-8d5a-401b-8a1b-bf62ecdefc12",
+      "rawTextureUuid": "86618299-bc09-4443-8adc-dd33b486de0c",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 118,
+      "height": 182,
+      "rawWidth": 118,
+      "rawHeight": 182,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/nums/num_3.png


+ 31 - 0
assets/resources/nums/num_3.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "563cdb88-e2b2-46c7-a2a9-6ca78c8bbff9",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "num_3": {
+      "ver": "1.0.3",
+      "uuid": "71807d37-3a67-4283-a4a6-e567acf9bd04",
+      "rawTextureUuid": "563cdb88-e2b2-46c7-a2a9-6ca78c8bbff9",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 112,
+      "height": 183,
+      "rawWidth": 112,
+      "rawHeight": 183,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/nums/num_4.png


+ 31 - 0
assets/resources/nums/num_4.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "433a3128-0a14-45a2-9da3-7611add8e8d0",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "num_4": {
+      "ver": "1.0.3",
+      "uuid": "5452d3e6-422e-4ba5-a0e2-638ec68459fe",
+      "rawTextureUuid": "433a3128-0a14-45a2-9da3-7611add8e8d0",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 138,
+      "height": 185,
+      "rawWidth": 138,
+      "rawHeight": 185,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/nums/num_5.png


+ 31 - 0
assets/resources/nums/num_5.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "bd74b41e-32cd-4094-b6d6-3cebf30f592a",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "num_5": {
+      "ver": "1.0.3",
+      "uuid": "cfbd62dd-c126-4785-85f8-27f1e5d55cab",
+      "rawTextureUuid": "bd74b41e-32cd-4094-b6d6-3cebf30f592a",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 104,
+      "height": 183,
+      "rawWidth": 104,
+      "rawHeight": 183,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/nums/num_6.png


+ 31 - 0
assets/resources/nums/num_6.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "9879cef8-f7be-4894-b094-429ee89260d1",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "num_6": {
+      "ver": "1.0.3",
+      "uuid": "7eef0ddd-0eff-44df-8a6a-8aadb5f30e24",
+      "rawTextureUuid": "9879cef8-f7be-4894-b094-429ee89260d1",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 109,
+      "height": 183,
+      "rawWidth": 109,
+      "rawHeight": 183,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/nums/num_7.png


+ 8 - 8
assets/resources/00115d.jpg.meta

@@ -1,15 +1,15 @@
 {
   "ver": "2.2.0",
-  "uuid": "9e1a2f08-8f93-4280-98c4-21c66ac8c2bf",
+  "uuid": "1f995187-a826-4ce3-a0e9-1875b8a48d50",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
   "premultiplyAlpha": false,
   "subMetas": {
-    "00115d": {
+    "num_7": {
       "ver": "1.0.3",
-      "uuid": "22e412c5-89cf-4c4a-9154-ea848cbaecc7",
-      "rawTextureUuid": "9e1a2f08-8f93-4280-98c4-21c66ac8c2bf",
+      "uuid": "4182196f-3c18-40a4-aae7-f15f8c2bfeaa",
+      "rawTextureUuid": "1f995187-a826-4ce3-a0e9-1875b8a48d50",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
+      "width": 123,
+      "height": 185,
+      "rawWidth": 123,
+      "rawHeight": 185,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

BIN
assets/resources/nums/num_8.png


+ 31 - 0
assets/resources/nums/num_8.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "7868451e-05fb-4e77-8974-14e8a7030a7c",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "num_8": {
+      "ver": "1.0.3",
+      "uuid": "72b94813-6921-426e-92fd-8c994034bd54",
+      "rawTextureUuid": "7868451e-05fb-4e77-8974-14e8a7030a7c",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 112,
+      "height": 183,
+      "rawWidth": 112,
+      "rawHeight": 183,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/nums/num_9.png


+ 31 - 0
assets/resources/nums/num_9.png.meta

@@ -0,0 +1,31 @@
+{
+  "ver": "2.2.0",
+  "uuid": "452ff898-ef1b-4710-8e10-539a0a8c5f77",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "subMetas": {
+    "num_9": {
+      "ver": "1.0.3",
+      "uuid": "3f000522-010a-46fa-85d2-a1b65e352726",
+      "rawTextureUuid": "452ff898-ef1b-4710-8e10-539a0a8c5f77",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 109,
+      "height": 183,
+      "rawWidth": 109,
+      "rawHeight": 183,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/rival_pat_right_to_left.png


+ 0 - 31
assets/resources/rival_pat_right_to_left.png.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "10d8e3f4-b3e5-48f9-903f-8e2488e556f9",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "rival_pat_right_to_left": {
-      "ver": "1.0.3",
-      "uuid": "6c8be7f8-80b9-47cc-a202-03ba387ca43d",
-      "rawTextureUuid": "10d8e3f4-b3e5-48f9-903f-8e2488e556f9",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
assets/resources/rival_peel_left_to_right.png


+ 0 - 31
assets/resources/rival_peel_left_to_right.png.meta

@@ -1,31 +0,0 @@
-{
-  "ver": "2.2.0",
-  "uuid": "a85c1cd6-3212-4c82-92ba-8135318dd83c",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "subMetas": {
-    "rival_peel_left_to_right": {
-      "ver": "1.0.3",
-      "uuid": "6e2f30d3-948f-497b-87c8-301534c496ad",
-      "rawTextureUuid": "a85c1cd6-3212-4c82-92ba-8135318dd83c",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 544,
-      "height": 960,
-      "rawWidth": 544,
-      "rawHeight": 960,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

File diff suppressed because it is too large
+ 1230 - 340
assets/scenes/mainscene.fire


+ 308 - 0
assets/scenes/rankscene.fire

@@ -0,0 +1,308 @@
+[
+  {
+    "__type__": "cc.SceneAsset",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "scene": {
+      "__id__": 1
+    }
+  },
+  {
+    "__type__": "cc.Scene",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
+    "_active": true,
+    "_level": 0,
+    "_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
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 0.2667317708333333,
+      "y": 0.2667317708333333,
+      "z": 1
+    },
+    "_quat": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "groupIndex": 0,
+    "autoReleaseAssets": false,
+    "_id": "a7c41137-753e-451d-8e26-d3dea70577e4"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Canvas",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 5
+      }
+    ],
+    "_active": true,
+    "_level": 0,
+    "_components": [
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 544,
+      "height": 960
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 272,
+      "y": 480,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_quat": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "groupIndex": 0,
+    "_id": "65Ifn+7NdCYLjIOasO+zsg"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Main Camera",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 21,
+      "g": 195,
+      "b": 200,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_quat": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "groupIndex": 0,
+    "_id": "45bTWF7jxEU40PKtz7JscX"
+  },
+  {
+    "__type__": "cc.Camera",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 3
+    },
+    "_enabled": true,
+    "_cullingMask": 4294967295,
+    "_clearFlags": 7,
+    "_backgroundColor": {
+      "__type__": "cc.Color",
+      "r": 16,
+      "g": 167,
+      "b": 88,
+      "a": 255
+    },
+    "_depth": -1,
+    "_zoomRatio": 1,
+    "_targetTexture": null,
+    "_id": "deZPs5TwZE7qnYaLDCUpWJ"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "ctrl",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 6
+      },
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 544,
+      "height": 960
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 0.8,
+      "y": 0.8,
+      "z": 1
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_quat": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "groupIndex": 0,
+    "_id": "61Gxn277dLU4Wp6A6zz2eW"
+  },
+  {
+    "__type__": "cc.WXSubContextView",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_id": "1eH3GdDfBCOY7e8t235uAk"
+  },
+  {
+    "__type__": "318bdR/UelGl6Zp2tEBPujR",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_id": "b5JBO8N8ZLmZj7qFMgQRpV"
+  },
+  {
+    "__type__": "cc.Canvas",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_designResolution": {
+      "__type__": "cc.Size",
+      "width": 544,
+      "height": 960
+    },
+    "_fitWidth": false,
+    "_fitHeight": true,
+    "_id": "61cPRJoX5Deqg6hn1u9aQ6"
+  }
+]

+ 1 - 1
assets/scenes/test.fire.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.0.1",
-  "uuid": "a2a270bb-bc4e-4b91-817e-c6d365ee1292",
+  "uuid": "a7c41137-753e-451d-8e26-d3dea70577e4",
   "asyncLoadAssets": false,
   "autoReleaseAssets": false,
   "subMetas": {}

File diff suppressed because it is too large
+ 391 - 582
assets/scenes/test.fire


+ 7 - 0
assets/scenes/startscene.fire.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "72faeac9-9b25-4492-aa18-fd28d18e3ad1",
+  "asyncLoadAssets": false,
+  "autoReleaseAssets": false,
+  "subMetas": {}
+}

+ 100 - 0
assets/scripts/actions/fail.js

@@ -0,0 +1,100 @@
+// 失败的动作
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        loc: 0, // 代表方向,0为正位,1为反位
+    },
+
+    // LIFE-CYCLE CALLBACKS:
+
+    onLoad () {
+        // 配置绘制的数据
+        // 从配置中心获取数据
+        this.config = require ("gameconfig")
+        // 配置绘制组件
+        this.g = this.getComponent(cc.Graphics);
+
+        // 配置方向
+        if (this.loc == 0) {
+            this.dir = -1;
+        } else {
+            this.dir = 1;
+        }
+    },
+
+    start () {
+
+    },
+
+    fail:function() {
+        this.g.clear();
+        
+        // 画脑袋和身体
+        this.g.lineWidth = this.config.CIRCLE_WIDTH
+
+        // 画个脑袋
+        this.g.fillColor.fromHEX('#ffffff');
+        this.g.circle(this.dir * 1, 36, this.config.HEAD_SIZE);
+        this.g.close();
+        this.g.stroke();
+        this.g.fill();
+
+        // 画个身体
+        this.g.fillColor.fromHEX('#ffffff');
+        this.g.circle(this.dir * 27, 46, this.config.BODY_SIZE);
+        this.g.close();
+        this.g.stroke();
+        this.g.fill();
+
+        // 画手臂
+        var handStart = cc.v2(this.dir * 16, 36);
+        var handEnd = cc.v2(this.dir * 6, 1);
+        this.g.lineWidth = this.config.LINE_WIDTH;
+        this.g.moveTo(handStart.x, handStart.y);
+        this.g.bezierCurveTo(handStart.x, handStart.y, this.dir * 16, 5, handEnd.x, handEnd.y);
+        this.g.stroke();
+
+        // 画个球拍
+        this.g.lineWidth = this.config.CIRCLE_WIDTH
+        this.g.fillColor.fromHEX('#ffffff');
+        this.g.circle(this.dir * 2, 5, this.config.BAT_SIZE);
+        this.g.close();
+        this.g.stroke();
+        this.g.fill();
+
+        // 画手臂
+        var handStart = cc.v2(this.dir * 20, 51);
+        var handEnd = cc.v2(this.dir * 12, -1);
+        this.g.lineWidth = this.config.LINE_WIDTH;
+        this.g.moveTo(handStart.x, handStart.y);
+        this.g.bezierCurveTo(handStart.x, handStart.y, this.dir * 25, 0, handEnd.x, handEnd.y);
+        this.g.stroke();
+
+        // 画裤子
+        var trousersStart = cc.v2(this.dir * 39, 53);
+        var trousersEnd = cc.v2(this.dir * 30, 32);
+        this.g.moveTo(trousersStart.x, trousersStart.y);
+        this.g.lineTo(trousersEnd.x, trousersEnd.y);
+        this.g.stroke();
+
+        // 画腿
+        var legStart = cc.v2(this.dir * 27, 32);
+        var legMid = cc.v2(this.dir * 26, 7);
+        var legEnd = cc.v2(this.dir * 55, 8)
+        this.g.moveTo(legStart.x, legStart.y);
+        this.g.lineTo(legMid.x, legMid.y)
+        this.g.bezierCurveTo(legMid.x, legMid.y, this.dir * 20, 0, legEnd.x, legEnd.y);
+        this.g.lineTo(this.dir * 60, 5);
+        this.g.stroke();
+
+        legStart = cc.v2(this.dir * 38, 36);
+        legMid = cc.v2(this.dir * 35, 5);
+        legEnd = cc.v2(this.dir * 69, 3)
+        this.g.moveTo(legStart.x, legStart.y);
+        this.g.lineTo(legMid.x, legMid.y)
+        this.g.bezierCurveTo(legMid.x, legMid.y, this.dir * 30, 0, legEnd.x, legEnd.y);
+        this.g.lineTo(this.dir * 72, -2);
+        this.g.stroke();
+    },
+});

+ 1 - 1
assets/scripts/balls/bump.js.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.0.5",
-  "uuid": "6a55f451-9442-43d9-bb83-0e58fe2aa72b",
+  "uuid": "efe446ab-dfba-4807-ae09-595a62059bb3",
   "isPlugin": false,
   "loadPluginInWeb": true,
   "loadPluginInNative": true,

+ 38 - 0
assets/scripts/actions/peel.js

@@ -27,6 +27,44 @@ cc.Class({
 
     // start () {},
 
+    // 外部调用
+    // 开始动作
+    peel:function() {
+        this.schedule(this.peelUpdate, 1.0 / 15);
+    },
+
+    // 定时器
+    peelUpdate:function(delay) {
+        this.g.clear();
+        if (this.index > 7) {
+            this.index = 1;
+            this.unschedule(this.peelUpdate);
+
+            if (this.actionEnd != null) {
+                this.actionEnd();
+            }
+
+            return;
+        }
+
+        if (this.index == 1) {
+            this.peel_001();
+        } else if (this.index == 2) {
+            this.peel_002();
+        } else if (this.index == 3) {
+            this.peel_003();
+        } else if (this.index == 4) {
+            this.peel_004();
+        } else if (this.index == 5) {
+            this.peel_005();
+        } else if (this.index == 6) {
+            this.peel_006();
+        } else if (this.index == 7) {
+            this.peel_007();
+        }
+        this.index++;
+    },
+
     peel_001:function() {
         // 画脑袋和身体
         this.g.lineWidth = this.config.CIRCLE_WIDTH

+ 100 - 0
assets/scripts/actions/win.js

@@ -0,0 +1,100 @@
+// 胜利的动作
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        loc: 0, // 代表方向,0为正位,1为反位
+    },
+
+    // LIFE-CYCLE CALLBACKS:
+
+    onLoad () {
+        // 配置绘制的数据
+        // 从配置中心获取数据
+        this.config = require ("gameconfig")
+        // 配置绘制组件
+        this.g = this.getComponent(cc.Graphics);
+
+        // 配置方向
+        if (this.loc == 0) {
+            this.dir = 1;
+        } else {
+            this.dir = -1;
+        }
+    },
+
+    start () {
+
+    },
+
+    win:function() {
+        this.g.clear();
+        
+        // 画脑袋和身体
+        this.g.lineWidth = this.config.CIRCLE_WIDTH
+
+        // 画个脑袋
+        this.g.fillColor.fromHEX('#ffffff');
+        this.g.circle(this.dir * -42, 77, this.config.HEAD_SIZE);
+        this.g.close();
+        this.g.stroke();
+        this.g.fill();
+
+        // 画个身体
+        this.g.fillColor.fromHEX('#ffffff');
+        this.g.circle(this.dir * -31, 51, this.config.BODY_SIZE);
+        this.g.close();
+        this.g.stroke();
+        this.g.fill();
+
+        // 画手臂
+        var handStart = cc.v2(this.dir * -21, 63);
+        var handEnd = cc.v2(this.dir * -23, 109);
+        this.g.lineWidth = this.config.LINE_WIDTH;
+        this.g.moveTo(handStart.x, handStart.y);
+        this.g.bezierCurveTo(handStart.x, handStart.y, this.dir * -7, 82, handEnd.x, handEnd.y);
+        this.g.stroke();
+
+        // 画个球拍
+        this.g.lineWidth = this.config.CIRCLE_WIDTH
+        this.g.fillColor.fromHEX('#ffffff');
+        this.g.circle(this.dir * -28, 105, this.config.BAT_SIZE);
+        this.g.close();
+        this.g.stroke();
+        this.g.fill();
+
+        // 画手臂
+        var handStart = cc.v2(this.dir * -45, 56);
+        var handEnd = cc.v2(this.dir * -65, 102);
+        this.g.lineWidth = this.config.LINE_WIDTH;
+        this.g.moveTo(handStart.x, handStart.y);
+        this.g.bezierCurveTo(handStart.x, handStart.y, this.dir * -70, 65, handEnd.x, handEnd.y);
+        this.g.stroke();
+
+        // 画裤子
+        var trousersStart = cc.v2(this.dir * -41, 41);
+        var trousersEnd = cc.v2(this.dir * -19, 45);
+        this.g.moveTo(trousersStart.x, trousersStart.y);
+        this.g.lineTo(trousersEnd.x, trousersEnd.y);
+        this.g.stroke();
+
+        // 画腿
+        var legStart = cc.v2(this.dir * -39, 40);
+        var legEnd = cc.v2(this.dir * -61, 0)
+        this.g.moveTo(legStart.x, legStart.y);
+        this.g.bezierCurveTo(legStart.x, legStart.y, this.dir * -95, 50, legEnd.x, legEnd.y);
+        this.g.lineTo(this.dir * -67, 0);
+        this.g.stroke();
+
+        legStart = cc.v2(this.dir * -20, 42);
+        legEnd = cc.v2(this.dir * 8, 0)
+        this.g.moveTo(legStart.x, legStart.y);
+        this.g.bezierCurveTo(legStart.x, legStart.y, this.dir * 12, 45, legEnd.x, legEnd.y);
+        this.g.lineTo(this.dir * 18, 0);
+        this.g.stroke();
+
+        // 再跳动两下
+        var jump = cc.jumpBy(0.5, cc.v2(0, 0), 20, 3);
+        this.node.runAction(jump);
+    },
+});

+ 9 - 0
assets/scripts/actions/win.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "427a055e-5b6e-416b-979c-fdd4f3238736",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 0 - 567
assets/scripts/arc.js

@@ -1,567 +0,0 @@
-// Learn cc.Class:
-//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/class.html
-//  - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/class.html
-// Learn Attribute:
-//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
-//  - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/reference/attributes.html
-// Learn life-cycle callbacks:
-//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
-//  - [English] https://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
-
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        loc: 0, // 代表方向,0为正位,1为反位
-        g: {
-            default: null,
-            type: cc.Graphics,
-        },
-        index:0,
-        // 脑袋的宽度
-        headSize: 0,
-        // 身体的宽度
-        bodySize: 0,
-        // 球拍的宽度
-        batSize: 2,
-        // 方向配置
-        dir: 0,
-    },
-
-    // LIFE-CYCLE CALLBACKS:
-
-    onLoad () {
-        this.headSize = 4;
-        this.bodySize = 12;
-        this.batSize = 3;
-    },
-
-    start () {
-        this.g = this.getComponent(cc.Graphics);
-        // 配置方向
-        if (this.loc == 0) {
-            this.dir = 1;
-        } else {
-            this.dir = -1;
-        }
-
-        if (this.index == 0) {
-            this.idle();
-        } else if (this.index == 1) {
-            this.serve_001();
-        } else if (this.index == 2) {
-            this.serve_002();
-        } else if (this.index == 3) {
-            this.serve_003();
-        } else if (this.index == 4) {
-            this.serve_004();
-        } else if (this.index == 13) {
-            this.serve_013();
-        } else if (this.index == 14) {
-            this.serve_014();
-        } else if (this.index == 15) {
-            this.serve_015();
-        }
-    },
-
-    idle:function() {
-        // 画脑袋和身体
-        this.g.lineWidth = 7;
-
-        // 画个脑袋
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(-1.5 * this.dir, 110, this.headSize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画个身体
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(8 * this.dir, 85, this.bodySize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(-7 * this.dir, 86);
-        var handEnd = cc.v2(handStart.x - this.dir * 10, handStart.y - 47);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, handStart.x, handStart.y - 40, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画个球
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(handEnd.x - this.dir * 3, handEnd.y + 4, this.batSize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(13 * this.dir, 99);
-        var handEnd = cc.v2(handStart.x + this.dir * 51, handStart.y - 18);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, handStart.x + this.dir * 27, handStart.y + 10, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画裤子
-        var trousersStart = cc.v2(0, 74);
-        var trousersEnd = cc.v2(22 * this.dir, 79);
-        this.g.moveTo(trousersStart.x, trousersStart.y);
-        this.g.lineTo(trousersEnd.x, trousersEnd.y);
-        this.g.stroke();
-
-        // 画腿
-        var legStart = cc.v2(10 * this.dir, 73);
-        var legEnd = cc.v2(0, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, -10 * this.dir, 60, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x - this.dir * 6, legEnd.y);
-        this.g.stroke();
-
-        legStart = cc.v2(19 * this.dir, 78);
-        legEnd = cc.v2(62 * this.dir, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.lineTo(legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x + this.dir * 6, legEnd.y);
-        this.g.stroke();
-    },
-
-    serve_001:function() {
-        // 画脑袋
-        this.g.lineWidth = 3;
-        this.g.fillColor.fromHEX('#ffffff');
-        // this.g.ellipse(18, 116, 15, 5);
-        this.g.arc(14, 112, this.headSize + 2, Math.PI / 2 + Math.PI / 12, Math.PI * 1.5 + Math.PI / 12, true);
-        this.g.lineTo(29, 107.5);
-        this.g.arc(27, 113, this.headSize + 2, Math.PI * 1.5 + Math.PI / 12, Math.PI / 2 + Math.PI / 12, true);
-        this.g.lineTo(11, 118);
-        // this.g.close();
-        // this.g.stroke();
-        // this.g.fill();
-
-        // 画个身体
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(29, 87, this.bodySize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(15, 93);
-        var handEnd = cc.v2(handStart.x - 19, handStart.y - 41);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, handStart.x - 13, handStart.y - 50, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画个球
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(handEnd.x - 2, handEnd.y + 4, 4);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(39, 98);
-        var handEnd = cc.v2(handStart.x + 41, handStart.y - 31);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, handStart.x + 30, handStart.y + 15, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画裤子
-        var trousersStart = cc.v2(19, 78);
-        var trousersEnd = cc.v2(41, 76);
-        this.g.moveTo(trousersStart.x, trousersStart.y);
-        this.g.lineTo(trousersEnd.x, trousersEnd.y);
-        this.g.stroke();
-
-        // 画腿
-        var legStart = cc.v2(18, 75);
-        var legEnd = cc.v2(0, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, -3, 55, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x - 10, legEnd.y);
-        this.g.stroke();
-
-        legStart = cc.v2(33, 75);
-        legEnd = cc.v2(64, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, legStart.x + 20, legStart.y - 5, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x + 10, legEnd.y);
-        this.g.stroke();
-    },
-
-    serve_002:function() {
-        // 画脑袋
-        this.g.lineWidth = 3;
-        this.g.fillColor.fromHEX('#ffffff');
-        // this.g.ellipse(18, 116, 15, 5);
-        this.g.arc(27, 113, this.headSize + 2, Math.PI / 2 - Math.PI / 8, Math.PI * 1.5 - Math.PI / 8, true);
-        this.g.lineTo(48, 97);
-        this.g.arc(49, 103, this.headSize + 2, Math.PI * 1.5 - Math.PI / 8, Math.PI / 2 - Math.PI / 8, true);
-        this.g.lineTo(28, 119);
-        // // this.g.close();
-        // // this.g.stroke();
-        // // this.g.fill();
-
-        // 画个身体
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(51, 76, this.bodySize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(38, 82);
-        var handEnd = cc.v2(handStart.x - 36, handStart.y - 23);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, handStart.x - 30, handStart.y - 30, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画个球
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(handEnd.x - 1, handEnd.y + 4, this.batSize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(61, 86);
-        var handEnd = cc.v2(handStart.x + 9, handStart.y - 27);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, handStart.x + 60, handStart.y - 11, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画裤子
-        var trousersStart = cc.v2(38, 67);
-        var trousersEnd = cc.v2(61, 67);
-        this.g.moveTo(trousersStart.x, trousersStart.y);
-        this.g.lineTo(trousersEnd.x, trousersEnd.y);
-        this.g.stroke();
-
-        // 画腿
-        var legStart = cc.v2(40, 63);
-        var legEnd = cc.v2(0, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, -5, 60, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x - 6, legEnd.y);
-        this.g.stroke();
-
-        legStart = cc.v2(57, 65);
-        legEnd = cc.v2(60, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, legStart.x + 55, legStart.y - 35, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x + 6, legEnd.y);
-        this.g.stroke();
-    },
-
-    serve_003:function() {
-        // 画脑袋和身体
-        this.g.lineWidth = 7;
-
-        // 画个脑袋
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(54, 105, this.headSize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画个身体
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(45, 81, this.bodySize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(30, 82);
-        var handEnd = cc.v2(handStart.x - 24, handStart.y - 18);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, handStart.x - 20, handStart.y - 25, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画手臂
-        var handStart = cc.v2(57, 90);
-        var handEnd = cc.v2(handStart.x - 31, handStart.y + 10);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, handStart.x + 45, handStart.y - 45, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画裤子
-        var trousersStart = cc.v2(32, 71);
-        var trousersEnd = cc.v2(56, 73);
-        this.g.moveTo(trousersStart.x, trousersStart.y);
-        this.g.lineTo(trousersEnd.x, trousersEnd.y);
-        this.g.stroke();
-
-        // 画腿
-        var legStart = cc.v2(41, 68);
-        var legEnd = cc.v2(0, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, 0, 60, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x - 6, legEnd.y);
-        this.g.stroke();
-
-        legStart = cc.v2(54, 69);
-        legEnd = cc.v2(61, 2)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, legStart.x + 50, legStart.y - 30, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x + 6, legEnd.y);
-        this.g.stroke();
-    },
-
-    serve_004:function() {
-        this.serve_003();
-    },
-
-    serve_004:function() {
-        this.serve_003();
-    },
-
-    serve_005:function() {
-        this.serve_003();
-    },
-
-    serve_006:function() {
-        this.serve_003();
-    },
-
-    serve_007:function() {
-        this.serve_003();
-    },
-
-    serve_008:function() {
-        this.serve_003();
-    },
-
-    serve_009:function() {
-        this.serve_003();
-    },
-
-    serve_010:function() {
-        this.serve_003();
-    },
-
-    serve_011:function() {
-        this.serve_003();
-    },
-
-    serve_012:function() {
-        this.idle();
-    },
-
-    serve_013:function() {
-        // 画脑袋
-        this.g.lineWidth = 3;
-        this.g.fillColor.fromHEX('#ffffff');
-        // this.g.ellipse(18, 116, 15, 5);
-        this.g.arc(1, 112, this.headSize + 2, Math.PI / 2 - Math.PI / 12, Math.PI * 1.5 - Math.PI / 12, true);
-        this.g.lineTo(12, 105);
-        this.g.arc(13, 111, this.headSize + 2, Math.PI * 1.5 - Math.PI / 12, Math.PI / 2 - Math.PI / 12, true);
-        this.g.lineTo(2, 118);
-
-        // 画个身体
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(21, 81, this.bodySize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(9, 89);
-        var handEnd = cc.v2(handStart.x - 52, handStart.y + 7);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, handStart.x - 30, handStart.y + 28, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画个球拍
-        this.g.lineWidth = 3;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.arc(-41, 105, this.batSize + 2, Math.PI - Math.PI / 12, 0 - Math.PI / 12, false);
-        this.g.bezierCurveTo(-37, 104, -47, 80, -24, 53);
-        this.g.arc(-28, 51, this.batSize + 2, 0 + Math.PI / 12, Math.PI * 1.5 - Math.PI / 12, false);
-        this.g.bezierCurveTo(-30, 46, -60, 75, -45, 106);
-        // this.g.close();
-        this.g.stroke();
-        // this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(35, 84);
-        var handEnd = cc.v2(76, 61);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, 58, 55, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画裤子
-        var trousersStart = cc.v2(11, 73);
-        var trousersEnd = cc.v2(33, 73);
-        this.g.moveTo(trousersStart.x, trousersStart.y);
-        this.g.lineTo(trousersEnd.x, trousersEnd.y);
-        this.g.stroke();
-
-        // 画腿
-        var legStart = cc.v2(12, 70);
-        var legEnd = cc.v2(0, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, -15, 60, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x - 10, legEnd.y);
-        this.g.stroke();
-
-        legStart = cc.v2(31, 69);
-        legEnd = cc.v2(64, 2)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, legStart.x + 20, legStart.y - 10, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x + 10, legEnd.y);
-        this.g.stroke();
-    },
-
-    serve_014:function() {
-        // 画脑袋
-        this.g.lineWidth = 3;
-        this.g.fillColor.fromHEX('#ffffff');
-        // this.g.ellipse(18, 116, 15, 5);
-        this.g.arc(53, 104, this.headSize + 1, Math.PI / 2 - Math.PI / 12, Math.PI * 1.5 - Math.PI / 8, true);
-        this.g.lineTo(65, 96);
-        this.g.arc(66, 101, this.headSize + 1, Math.PI * 1.5 - Math.PI / 8, Math.PI / 2 - Math.PI / 8, true);
-        this.g.lineTo(49, 110);;
-
-        // 画个身体
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(54, 78, this.bodySize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(45, 89);
-        var handEnd = cc.v2(70, 135);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, 20, 128, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画个球
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(handEnd.x - 1, handEnd.y - 5, this.batSize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(55, 63);
-        var handEnd = cc.v2(56, 30);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, 40, 40, handEnd.x, handEnd.y);
-        // this.g.lineTo(handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画裤子
-        var trousersStart = cc.v2(41, 73);
-        var trousersEnd = cc.v2(63, 66);
-        this.g.moveTo(trousersStart.x, trousersStart.y);
-        this.g.lineTo(trousersEnd.x, trousersEnd.y);
-        this.g.stroke();
-
-        // 画腿
-        var legStart = cc.v2(44, 67);
-        var legEnd = cc.v2(0, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, 30, 52, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x - 6, legEnd.y);
-        this.g.stroke();
-
-        legStart = cc.v2(57, 64);
-        legEnd = cc.v2(63, 1)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, legStart.x + 40, legStart.y - 15, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x + 6, legEnd.y);
-        this.g.stroke();
-    },
-
-    serve_015:function() {
-        // 画脑袋
-        this.g.lineWidth = 3;
-        this.g.fillColor.fromHEX('#ffffff');
-        // this.g.ellipse(18, 116, 15, 5);
-        this.g.arc(70, 101, this.headSize + 1, Math.PI / 2 - Math.PI / 12, Math.PI * 1.5 - Math.PI / 8, true);
-        this.g.lineTo(76, 92);
-        this.g.arc(77, 97, this.headSize + 1, Math.PI * 1.5 - Math.PI / 8, Math.PI / 2 - Math.PI / 8, true);
-        this.g.lineTo(71, 105);;
-
-        // 画个身体
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(64, 75, this.bodySize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(60, 90);
-        var handEnd = cc.v2(102, 107);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, 63, 140, handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画个球
-        this.g.lineWidth = 7;
-        this.g.fillColor.fromHEX('#ffffff');
-        this.g.circle(handEnd.x - 4, handEnd.y - 5, this.batSize);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-
-        // 画手臂
-        var handStart = cc.v2(64, 60);
-        var handEnd = cc.v2(60, 33);
-        this.g.lineWidth = 3;
-        this.g.moveTo(handStart.x, handStart.y);
-        this.g.bezierCurveTo(handStart.x, handStart.y, 50, 40, handEnd.x, handEnd.y);
-        // this.g.lineTo(handEnd.x, handEnd.y);
-        this.g.stroke();
-
-        // 画裤子
-        var trousersStart = cc.v2(50, 73);
-        var trousersEnd = cc.v2(70, 60);
-        this.g.moveTo(trousersStart.x, trousersStart.y);
-        this.g.lineTo(trousersEnd.x, trousersEnd.y);
-        this.g.stroke();
-
-        // 画腿
-        var legStart = cc.v2(52, 64);
-        var legEnd = cc.v2(0, 0)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.lineTo(legEnd.x, legEnd.y);
-        this.g.stroke();
-
-        legStart = cc.v2(68, 60);
-        legEnd = cc.v2(63, 1)
-        this.g.moveTo(legStart.x, legStart.y);
-        this.g.bezierCurveTo(legStart.x, legStart.y, legStart.x + 38, legStart.y - 18, legEnd.x, legEnd.y);
-        this.g.lineTo(legEnd.x + 6, legEnd.y);
-        this.g.stroke();
-    },
-
-    // update (dt) {},
-});

+ 392 - 47
assets/scripts/balls/ball.js

@@ -14,17 +14,33 @@ cc.Class({
         this.initNodes();
     },
 
-    start () {
-        this.rivalPeelLtoL();
-    },
+    // start () {
+
+    //     this.rivalPeelLtoR_01();
+    //     this.ballAction();
+    // },
+
+    // update() {
+    //     var beginPos = cc.v2(-95, 264);
+    //     var centerPos = cc.v2(30, 5);
+    //     var endPos = cc.v2(163, -140);
+
+    //     this.g.lineWidth = 4;
+    //     this.g.moveTo(beginPos.x, beginPos.y);
+    //     this.g.bezierCurveTo(beginPos.x, beginPos.y, -270, 440, centerPos.x, centerPos.y);
+    //     this.g.bezierCurveTo(centerPos.x, centerPos.y, 110, 20, endPos.x, endPos.y);
+    //     this.g.stroke();
+    // },
 
     // 初始化
     initValues:function () {
         // 配置绘制的数据
         // 从配置中心获取数据
-        this.config = require ("gameconfig")
+        this.gameconfig = require ("gameconfig")
         // 配置绘制组件
         this.g = this.getComponent(cc.Graphics);
+        // 球的状态
+        this.ballconfig = require("ballconfig");
 
         // 记录下节点
         this.poses = new Array();
@@ -42,11 +58,34 @@ cc.Class({
     // 外部调用
     // 球的运动停止
     ballStop:function() {
+        // 首先停止所有动作
+        this.head.stopAllActions();
+        // 清空节点数组
+        this.poses = [];
+        this.g.clear();
+    },
+
+    // 全部停止
+    ballEnd:function() {
+        this.unschedule(this.ballUpdate);
+        // 首先停止所有动作
+        this.head.stopAllActions();
+        // 清空节点数组
+        this.poses = [];
+        this.g.clear();
+    },
 
+    // 球开始运动,开始刷新帧
+    ballAction:function() {
+        this.schedule(this.ballUpdate, 1 / 60);
     },
 
     // 我方接球,从左到左
-    minePatLToL:function() {
+    minePatLToL_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+
         var beginPos = cc.v2(-103, -110);
         var dropPos = cc.v2(-64, 144);
         var endPos = cc.v2(-53, 313);
@@ -62,13 +101,23 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(0.5, bezier_02);
-
-        this.head.runAction(cc.sequence(move_01, move_01_end, move_02));
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_RIVAL_LEFT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_RIVAL);
+        var jump = cc.jumpBy(1, cc.v2(50, 40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
     },
 
     // 我方接球,从右到右
-    minePatRToR:function() {
+    minePatRToR_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+
         var beginPos = cc.v2(52, -109);
         var dropPos = cc.v2(71, 141);
         var endPos = cc.v2(131, 309);
@@ -84,13 +133,23 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(0.5, bezier_02);
-
-        this.head.runAction(cc.sequence(move_01, move_01_end, move_02));
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_RIVAL_RIGHT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_RIVAL);
+        var jump = cc.jumpBy(1, cc.v2(50, 40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
     },
 
     // 我方接球,从左到右
-    minePatLToR:function() {
+    minePatLToR_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+
         var beginPos = cc.v2(-103, -76);
         var dropPos = cc.v2(47, 140);
         var endPos = cc.v2(221, 346);
@@ -106,13 +165,55 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(0.5, bezier_02);
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_RIVAL_RIGHT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_RIVAL);
+        var jump = cc.jumpBy(1, cc.v2(50, 40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
+    },
+
+    // 我方削球,从右到左
+    minePeelRToL_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
 
-        this.head.runAction(cc.sequence(move_01, move_01_end, move_02));
+        var beginPos = cc.v2(128, -117);
+        var dropPos = cc.v2(-66, 143);
+        var endPos = cc.v2(-134, 308);
+
+        // 将节点移动到指定位置
+        this.head.setPosition(beginPos);
+
+        var bezier_01 = [beginPos, cc.v2(31, 15), dropPos];
+        var bezier_02 = [dropPos, cc.v2(-75, 300), endPos];
+
+        var move_01 = cc.bezierTo(0.5, bezier_01);
+        var self = this;
+        var move_01_end = cc.callFunc(function() {
+            self.bump(dropPos);
+        });
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_RIVAL_LEFT_PEEL);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_RIVAL);
+        var jump = cc.jumpBy(1, cc.v2(-50, 40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
     },
 
     // 我方削球,从右到右
-    minePeelRToR:function() {
+    minePeelRToR_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+
         var beginPos = cc.v2(148, -176);
         var dropPos = cc.v2(79, 99);
         var endPos = cc.v2(104, 319);
@@ -128,13 +229,23 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(0.5, bezier_02);
-
-        this.head.runAction(cc.sequence(move_01, move_01_end, move_02));
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_RIVAL_RIGHT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_RIVAL);
+        var jump = cc.jumpBy(1, cc.v2(50, 40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
     },
 
     // 对手发球
     rivalServer:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+
         var serverBegin = cc.v2(166, 290);
         var beatPos = cc.v2(96, 274);
         var dropPos = cc.v2(28, 144);
@@ -144,24 +255,36 @@ cc.Class({
         // 将节点移动到指定位置
         this.head.setPosition(serverBegin);
 
+        // 4条贝塞尔曲线
         var bezier_01 = [serverBegin, cc.v2(125, 400), beatPos];
         var bezier_02 = [beatPos, cc.v2(45, 250), dropPos];
         var bezier_03 = [dropPos, cc.v2(0, 56), jumpPos];
         var bezier_04 = [jumpPos, cc.v2(-80, 10), endPos];
         
-        var move_01 = cc.bezierTo(0.5, bezier_01);
-        var move_02 = cc.bezierTo(0.5, bezier_02);
-        var move_03 = cc.bezierTo(0.5, bezier_03);
+        // 四条路线
+        var move_01 = cc.bezierTo(1.2, bezier_01);
+        var move_02 = cc.bezierTo(0.1, bezier_02);
+        var move_03 = cc.bezierTo(0.1, bezier_03);
         var self = this;
         var move_03_end = cc.callFunc(function() {
             self.bump(jumpPos);
         });
-        var move_04 = cc.bezierTo(0.5, bezier_04);
-        this.head.runAction(cc.sequence(move_01, move_02, move_03, move_03_end, move_04));
+        var move_04 = cc.bezierTo(0.3, bezier_04);
+        // 在第四条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.15);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_MINE_LEFT_PAT);
+        var spawn = cc.spawn(move_04, cc.sequence(delay, change));
+        var move_04_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_MINE);
+        var jump = cc.jumpBy(1, cc.v2(-100, -40), 30, 4);
+        this.head.runAction(cc.sequence(move_01, move_02, move_03, move_03_end, spawn, move_04_end, jump));
     },
 
     // 对手接球,从右到左
-    rivalPatRToL:function() {
+    rivalPatRToL_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+
         var beginPos = cc.v2(112, 328);
         var dropPos = cc.v2(-22, 16);
         var endPos = cc.v2(-122, -182);
@@ -169,21 +292,210 @@ cc.Class({
         // 将节点移动到指定位置
         this.head.setPosition(beginPos);
 
+        // 贝塞尔曲线的关键点
         var bezier_01 = [beginPos, cc.v2(45, 172), dropPos];
         var bezier_02 = [dropPos, cc.v2(-120, -10), endPos];
 
+        // 第一条路线
+        var move_01 = cc.bezierTo(0.5, bezier_01);
+        var self = this;
+        // 中间碰到了桌面
+        var move_01_end = cc.callFunc(function() {
+            self.bump(dropPos);
+        });
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_MINE_LEFT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_MINE);
+        var jump = cc.jumpBy(1, cc.v2(-100, -40), 30, 3);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
+    },
+
+    // 对手接球,第二种从右到左
+    rivalPatRToL_02:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+
+        var beginPos = cc.v2(103, 272);
+        var dropPos = cc.v2(-15, 23);
+        var endPos = cc.v2(-135, -123);
+
+        // 将节点移动到指定位置
+        this.head.setPosition(beginPos);
+
+        // 贝塞尔曲线的关键点
+        var bezier_01 = [beginPos, cc.v2(-15, 350), dropPos];
+        var bezier_02 = [dropPos, cc.v2(-85, 65), endPos];
+
+        // 第一条路线
+        var move_01 = cc.bezierTo(0.5, bezier_01);
+        var self = this;
+        // 中间碰到了桌面
+        var move_01_end = cc.callFunc(function() {
+            self.bump(dropPos);
+        });
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_MINE_LEFT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_MINE);
+        var jump = cc.jumpBy(1, cc.v2(-100, -40), 30, 3);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
+    },
+
+    // 对手接球,从左到左
+    rivalPatLToL_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+        
+        var beginPos = cc.v2(-53, 272);
+        var dropPos = cc.v2(-73, 10);
+        var endPos = cc.v2(-127, -171);
+
+        // 将节点移动到指定位置
+        this.head.setPosition(beginPos);
+
+        // 贝塞尔曲线的关键点
+        var bezier_01 = [beginPos, cc.v2(-63, 149), dropPos];
+        var bezier_02 = [dropPos, cc.v2(-95, -40), endPos];
+
+        // 第一条路线
+        var move_01 = cc.bezierTo(0.5, bezier_01);
+        var self = this;
+        // 中间碰到了桌面
+        var move_01_end = cc.callFunc(function() {
+            self.bump(dropPos);
+        });
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_MINE_LEFT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_MINE);
+        var jump = cc.jumpBy(1, cc.v2(-40, -40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
+    },
+
+
+    // 对手接球,从左到右
+    rivalPatLToR_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+        
+        var beginPos = cc.v2(-56, 298);
+        var dropPos = cc.v2(25, 13);
+        var endPos = cc.v2(95, -115);
+
+        // 将节点移动到指定位置
+        this.head.setPosition(beginPos);
+
+        // 贝塞尔曲线的关键点
+        var bezier_01 = [beginPos, cc.v2(4, 145), dropPos];
+        var bezier_02 = [dropPos, cc.v2(95, -35), endPos];
+
+        // 第一条路线
         var move_01 = cc.bezierTo(0.5, bezier_01);
         var self = this;
+        // 中间碰到了桌面
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(0.5, bezier_02);
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_MINE_RIGHT_PEEL);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_MINE);
+        var jump = cc.jumpBy(1, cc.v2(40, -40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
+    },
+
+    // 对手接球,从右到右
+    rivalPatRToR_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+        
+        var beginPos = cc.v2(101, 271);
+        var dropPos = cc.v2(49, 29);
+        var endPos = cc.v2(24, -171);
+
+        // 将节点移动到指定位置
+        this.head.setPosition(beginPos);
+
+        // 贝塞尔曲线的关键点
+        var bezier_01 = [beginPos, cc.v2(50, 450), dropPos];
+        var bezier_02 = [dropPos, cc.v2(15, 95), endPos];
 
-        this.head.runAction(cc.sequence(move_01, move_01_end, move_02));
+        // 第一条路线
+        var move_01 = cc.bezierTo(0.5, bezier_01);
+        var self = this;
+        // 中间碰到了桌面
+        var move_01_end = cc.callFunc(function() {
+            self.bump(dropPos);
+        });
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_MINE_RIGHT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_MINE);
+        var jump = cc.jumpBy(1, cc.v2(-40, -40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
+    },
+
+    // 对手接球,第二种从右到右
+    rivalPatRToR_02:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+        
+        var beginPos = cc.v2(98, 273);
+        var dropPos = cc.v2(49, 21);
+        var endPos = cc.v2(28, -130);
+
+        // 将节点移动到指定位置
+        this.head.setPosition(beginPos);
+
+        // 贝塞尔曲线的关键点
+        var bezier_01 = [beginPos, cc.v2(68, 147), dropPos];
+        var bezier_02 = [dropPos, cc.v2(15, -20), endPos];
+
+        // 第一条路线
+        var move_01 = cc.bezierTo(0.5, bezier_01);
+        var self = this;
+        // 中间碰到了桌面
+        var move_01_end = cc.callFunc(function() {
+            self.bump(dropPos);
+        });
+        var move_02 = cc.bezierTo(0.75, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_MINE_RIGHT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_MINE);
+        var jump = cc.jumpBy(1, cc.v2(-40, -40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
     },
 
     // 对手削球,从左到左
-    rivalPeelLtoL:function() {
+    rivalPeelLtoL_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+
         var beginPos = cc.v2(-95, 263);
         var centerPos = cc.v2(-75, 58);
         var endPos = cc.v2(-66, -163);
@@ -199,11 +511,45 @@ cc.Class({
         }, this);
         var bezier_02 = [centerPos, cc.v2(-125, 40), endPos];
         var move_02 = cc.bezierTo(1, bezier_02);
-        var move_02_end = cc.callFunc(function() {
-            cc.log ("动作 2 结束 ... ");
-        }, this);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_MINE_LEFT_PAT);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_MINE);
+        var jump = cc.jumpBy(1, cc.v2(-40, -40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
+    },
+
+    // 对手削球,从左到右
+    rivalPeelLtoR_01:function() {
+        if(this.stateCallback != null) {
+            this.stateCallback(this.ballconfig.BALL_STATE_FLYING);
+        }
+
+        var beginPos = cc.v2(-95, 264);
+        var centerPos = cc.v2(30, 5);
+        var endPos = cc.v2(163, -140);
+
+        // 将节点移动到指定位置
+        this.head.setPosition(beginPos);
 
-        this.head.runAction(cc.sequence(move_01, move_01_end, move_02, move_02_end));
+        var bezier_01 = [beginPos, cc.v2(-270, 440), centerPos];
+        var move_01 = cc.bezierTo(1, bezier_01);
+        var move_01_end = cc.callFunc(function() {
+            cc.log ("动作 1 结束 ... ");
+            this.bump(centerPos);
+        }, this);
+        var bezier_02 = [centerPos, cc.v2(110, 20), endPos];
+        var move_02 = cc.bezierTo(1, bezier_02);
+        // 在第二条路线后开始的一段时间,需要通知控制器改变状态
+        var delay = cc.delayTime(0.25);
+        var change = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_MINE_RIGHT_PEEL);
+        var spawn = cc.spawn(move_02, cc.sequence(delay, change));
+        var move_02_end = cc.callFunc(this.changeState, this, this.ballconfig.BALL_STATE_DROP_IN_MINE);
+        var jump = cc.jumpBy(1, cc.v2(40, -40), 30, 2);
+
+        this.head.runAction(cc.sequence(move_01, move_01_end, spawn, move_02_end, jump));
     },
 
     // 球磕碰
@@ -214,16 +560,24 @@ cc.Class({
         this.showBump = true;
     },
 
+    // 更改状态
+    changeState:function(node, state) {
+        cc.log ("改变状态 ... " + state);
+        if(this.stateCallback != null) {
+            this.stateCallback(state);
+        }
+    },
+
     // 绘图
     draw:function(delay) {
         this.g.clear();
 
         // 画脑袋和身体
-        this.g.lineWidth = this.config.CIRCLE_WIDTH
+        this.g.lineWidth = this.gameconfig.CIRCLE_WIDTH
 
         // 画个头部
         this.g.fillColor.fromHEX('#ff00000');
-        this.g.circle(this.head.x, this.head.y, this.config.HEAD_SIZE);
+        this.g.circle(this.head.x, this.head.y, this.gameconfig.HEAD_SIZE);
         this.g.close();
         this.g.stroke();
         this.g.fill();
@@ -238,6 +592,7 @@ cc.Class({
 
         this.g.stroke();
 
+
         // 当需要绘制撞击点时
         if (this.showBump) {
 
@@ -278,27 +633,17 @@ cc.Class({
         }
     },
 
-    update (dt) {
+    // 帧更新
+    ballUpdate:function (dt) {
         // 记录当前的位置
         var news = [this.head.position];
         // 在结合当前的数组
         this.poses = news.concat(this.poses);
         // 如果数组长度大于20,则将最后一个删除
-        if (this.poses.length > 20) {
+        if (this.poses.length > 10) {
             this.poses.pop();
         }
 
         this.draw(dt);
-
-        var beginPos = cc.v2(112, 328);
-        var dropPos = cc.v2(-22, 16);
-        var endPos = cc.v2(-122, -182);
-
-        // 画手臂
-        this.g.lineWidth = this.config.LINE_WIDTH;
-        this.g.moveTo(beginPos.x, beginPos.y);
-        this.g.bezierCurveTo(beginPos.x, beginPos.y, 45, 172, dropPos.x, dropPos.y);
-        this.g.bezierCurveTo(dropPos.x, dropPos.y, -120, -10, endPos.x, endPos.y);
-        this.g.stroke();
     },
 });

+ 0 - 66
assets/scripts/balls/bump.js

@@ -1,66 +0,0 @@
-// 球碰到桌子
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        g: {
-            default: null,
-            type: cc.Graphics,
-        },
-    },
-
-    // LIFE-CYCLE CALLBACKS:
-
-    // onLoad () {},
-
-    start () {
-
-    },
-
-    // 球磕碰
-    bump:function(loc) {
-        this.bumpLoc = loc;
-        this.bumpTime = 0;
-
-        this.schedule(this.bumpUpdate, 1 / 60.0);
-    },
-
-    // 磕碰动画
-    bumpUpdate:function(delay) {
-        this.g.clear();
-        this.bumpTime += delay;
-
-        var timeScale = 15;
-        var space = 1;
-        var low = 2.5;
-        var high = 10;
-
-        // 右上
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.bumpLoc.x + space + this.bumpTime * timeScale * low, this.bumpLoc.y + space + this.bumpTime * timeScale * low);
-        this.g.lineTo(this.bumpLoc.x + space + this.bumpTime * timeScale * high, this.bumpLoc.y + space + this.bumpTime * timeScale * high)
-        this.g.stroke();
-
-        // 右下
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.bumpLoc.x + space + this.bumpTime * timeScale * low, this.bumpLoc.y - space - this.bumpTime * timeScale * low);
-        this.g.lineTo(this.bumpLoc.x + space + this.bumpTime * timeScale * high, this.bumpLoc.y - space - this.bumpTime * timeScale * high)
-        this.g.stroke();
-
-        // 左上
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.bumpLoc.x - space - this.bumpTime * timeScale * low, this.bumpLoc.y + space + this.bumpTime * timeScale * low);
-        this.g.lineTo(this.bumpLoc.x - space - this.bumpTime * timeScale * high, this.bumpLoc.y + space + this.bumpTime * timeScale * high)
-        this.g.stroke();
-
-        // 右下
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.bumpLoc.x - space - this.bumpTime * timeScale * low, this.bumpLoc.y - space - this.bumpTime * timeScale * low);
-        this.g.lineTo(this.bumpLoc.x - space - this.bumpTime * timeScale * high, this.bumpLoc.y - space - this.bumpTime * timeScale * high)
-        this.g.stroke();
-
-        if (this.bumpTime > 0.1) {
-            this.unschedule(this.bumpUpdate);
-        }
-    },
-});

+ 0 - 111
assets/scripts/balls/minepatltol.js

@@ -1,111 +0,0 @@
-// 我方接球,从我方左侧至敌方左侧
-
-var Bump = require("bump")
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        g: {
-            default: null,
-            type: cc.Graphics,
-        },
-
-        bump: {
-            default: null,
-            type: Bump,
-        },
-    },
-
-    // LIFE-CYCLE CALLBACKS:
-
-    // onLoad () {},
-
-    start () {
-        this.initValues();
-    },
-
-    // 初始化
-    initValues:function() {
-        // 球的状态信息
-        this.ballconfig = require("ballconfig");
- 
-        // 球的运动区间
-        this.flyLeft = -101;
-        this.flyRight = -65;
-        this.flipRight = -30;
-
-        // 配置方程式的各项数据
-        // 飞翔时候的数据
-        this.flyX = 0;
-        this.flyY = 530;
-        this.flyDown = 6.2;
-
-        // 弹起来时候的数据
-        this.flipX = 0;
-        this.flipY = 759;
-        this.flipDown = 9.8;
-    },
-
-    // update (dt) {},
-
-    // 发球时的方程式
-    equation:function(x) {
-        // return (x * x - this.flipX * 2 * x + this.flipX * this.flipX) / this.flipDown + this.flipY;
-        
-        if (x >= this.flyLeft - 10 && x <= this.flyRight) {
-            return x * this.flyDown + this.flyY;
-        } else if (x > this.flyRight && x <= this.flipRight) {
-            return (x * this.flipDown) + this.flipY;
-        }
-
-        return x * this.flyDown + this.flyY;
-    },
-
-    ballPat:function() {
-        this.unschedule(this.patUpdate);
-        this.x = this.flyLeft;
-        this.schedule(this.patUpdate, 1.0 / 60);
-    },
-
-    ballStop:function() {
-        this.unschedule(this.patUpdate);
-    },
-    
-    patUpdate:function (dt) {
-        this.g.clear();
-
-        var speed = 0;
-        var state;
-        if (this.x >= this.flyLeft - 10 && this.x < this.flyRight) {
-            speed = 2;
-            state = s.ballconfig.BALL_STATE_MINE_LEFT_TO_LEFT_FLY;
-        } else if (this.x >= this.flyRight && this.x < this.flipRight) {
-            speed = 2;
-            state = this.ballconfig.BALL_STATE_MINE_LEFT_TO_LEFT_FLIP;
-        } else if (this.x >= this.flipRight) {
-            speed = 2;
-            state = this.ballconfig.BALL_STATE_DROP_IN_RIVAL;
-        }
-
-        if (this.stateCallback != null) {
-            // 给控制器传递发球左侧的状态
-            this.stateCallback(state);
-        }
-
-        // 判断是否需要磕碰
-        var next = this.x + speed;
-        if (this.x < this.flyRight && next >= this.flyRight) {
-            cc.log ("到了中间 ... ");
-            this.bump.bump(cc.v2(this.x, this.equation(this.x)));
-        }
-
-        // cc.log ("x = " + this.x + " mid = " + this.flyRight + " x = " + next);
-
-        this.x = next;
-
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.x, this.equation(this.x));
-        this.g.bezierCurveTo(this.x, this.equation(this.x), this.x - 5, this.equation(this.x - 5), this.x - 10, this.equation(this.x - 10));
-        this.g.stroke();
-    },
-});

+ 0 - 108
assets/scripts/balls/minepatltor.js

@@ -1,108 +0,0 @@
-// 我方接球,从我方左侧至敌方右侧
-
-var Bump = require("bump")
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        g: {
-            default: null,
-            type: cc.Graphics,
-        },
-
-        bump: {
-            default: null,
-            type: Bump,
-        },
-    },
-
-    // LIFE-CYCLE CALLBACKS:
-
-    // onLoad () {},
-
-    start () {
-        this.initValues();
-    },
-
-    // 初始化
-    initValues:function() {
-        // 球的状态信息
-        this.ballconfig = require("ballconfig");
-
-        // 球的运动区间
-        this.flyLeft = -71;
-        this.flyRight = 40;
-        this.flipRight = 218;
-
-        // 配置方程式的各项数据
-        // 飞翔时候的数据
-        this.flyX = 195;
-        this.flyY = 230;
-        this.flyDown = -250;
-
-        // 弹起来时候的数据
-        this.flipX = 183;
-        this.flipY = 349;
-        this.flipDown = -94;
-    },
-
-    // update (dt) {},
-
-    // 发球时的方程式
-    equation:function(x) {
-        // return (x * x - this.flipX * 2 * x + this.flipX * this.flipX) / this.flipDown + this.flipY;
-        
-        if (x >= this.flyLeft - 10 && x <= this.flyRight) {
-            return (x * x - this.flyX * 2 * x + this.flyX * this.flyX) / this.flyDown + this.flyY;
-        } else if (x > this.flyRight && x <= this.flipRight) {
-            return (x * x - this.flipX * 2 * x + this.flipX * this.flipX) / this.flipDown + this.flipY;
-        }
-
-        return (x * x - this.flipX * 2 * x + this.flipX * this.flipX) / this.flipDown + this.flipY;
-    },
-
-    ballPat:function() {
-        this.unschedule(this.patUpdate);
-        this.x = this.flyLeft;
-        this.schedule(this.patUpdate, 1.0 / 60);
-    },
-
-    ballStop:function() {
-        this.unschedule(this.patUpdate);
-    },
-    
-    patUpdate:function (dt) {
-        this.g.clear();
-
-        var speed = 0;
-        var state;
-        if (this.x >= this.flyLeft - 10 && this.x < this.flyRight) {
-            speed = 10;
-            state = this.ballconfig.BALL_STATE_MINE_LEFT_TO_RIGHT_FLY;
-        } else if (this.x >= this.flyRight && this.x < this.flipRight) {
-            speed = 10;
-            state = this.ballconfig.BALL_STATE_MINE_LEFT_TO_RIGHT_FLIP;
-        } else if (this.x >= this.flipRight) {
-            speed = 10;
-            state = this.ballconfig.BALL_STATE_DROP_IN_RIVAL;
-        }
-
-        if (this.stateCallback != null) {
-            // 给控制器传递发球左侧的状态
-            this.stateCallback(state);
-        }
-
-        // 判断是否需要磕碰
-        var next = this.x + speed;
-        if (this.x < this.flyRight && next > this.flyRight) {
-            this.bump.bump(cc.v2(this.x, this.equation(this.x)));
-        }
-
-        this.x = next;
-
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.x, this.equation(this.x));
-        this.g.bezierCurveTo(this.x, this.equation(this.x), this.x - 5, this.equation(this.x - 5), this.x - 10, this.equation(this.x - 10));
-        this.g.stroke();
-    },
-});

+ 0 - 41
assets/scripts/balls/minepatrtol.js

@@ -1,41 +0,0 @@
-// Learn cc.Class:
-//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/class.html
-//  - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/class.html
-// Learn Attribute:
-//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
-//  - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/reference/attributes.html
-// Learn life-cycle callbacks:
-//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
-//  - [English] https://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
-
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        // foo: {
-        //     // ATTRIBUTES:
-        //     default: null,        // The default value will be used only when the component attaching
-        //                           // to a node for the first time
-        //     type: cc.SpriteFrame, // optional, default is typeof default
-        //     serializable: true,   // optional, default is true
-        // },
-        // bar: {
-        //     get () {
-        //         return this._bar;
-        //     },
-        //     set (value) {
-        //         this._bar = value;
-        //     }
-        // },
-    },
-
-    // LIFE-CYCLE CALLBACKS:
-
-    // onLoad () {},
-
-    start () {
-
-    },
-
-    // update (dt) {},
-});

+ 0 - 9
assets/scripts/balls/minepatrtol.js.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.0.5",
-  "uuid": "60162872-2073-4b80-9f23-dd5a5ad97108",
-  "isPlugin": false,
-  "loadPluginInWeb": true,
-  "loadPluginInNative": true,
-  "loadPluginInEditor": false,
-  "subMetas": {}
-}

+ 0 - 102
assets/scripts/balls/minepatrtor.js

@@ -1,102 +0,0 @@
-// 我方接球,从我方右侧至敌方右侧
-
-var Bump = require("bump")
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        g: {
-            default: null,
-            type: cc.Graphics,
-        },
-
-        bump: {
-            default: null,
-            type: Bump,
-        },
-    },
-
-    start () {
-        this.initValues();
-    },
-
-    // 初始化
-    initValues:function() {
-        // 球的状态信息
-        this.ballconfig = require("ballconfig");
-
-        // 球的运动区间
-        this.flyLeft = 54;
-        this.flyRight = 69;
-        this.flipRight = 120;
-
-        // 配置方程式的各项数据
-        // 飞翔时候的数据
-        this.flyX = 0;
-        this.flyY = -860;
-        this.flyDown = 14.2;
-
-        // 弹起来时候的数据
-        this.flipX = 0;
-        this.flipY = -340;
-        this.flipDown = 6.8;
-    },
-
-    // update (dt) {},
-
-    // 发球时的方程式
-    equation:function(x) {        
-        if (x >= this.flyLeft - 10 && x <= this.flyRight) {
-            return x * this.flyDown + this.flyY;
-        } else if (x > this.flyRight && x <= this.flipRight) {
-            return x * this.flipDown + this.flipY;
-        }
-
-        return x * this.flipDown + this.flipY;
-    },
-
-    ballPat:function() {
-        this.unschedule(this.patUpdate);
-        this.x = this.flyLeft;
-        this.schedule(this.patUpdate, 1.0 / 60);
-    },
-
-    ballStop:function() {
-        this.unschedule(this.patUpdate);
-    },
-    
-    patUpdate:function (dt) {
-        this.g.clear();
-
-        var speed = 0;
-        var state;
-        if (this.x >= this.flyLeft - 10 && this.x < this.flyRight) {
-            speed = 1;
-            state = this.ballconfig.BALL_STATE_MINE_RIGHT_TO_RIGHT_FLY;
-        } else if (this.x >= this.flyRight && this.x < this.flipRight) {
-            speed = 1;
-            state = this.ballconfig.BALL_STATE_MINE_RIGHT_TO_RIGHT_FLIP;
-        } else if (this.x >= this.flipRight) {
-            speed = 1;
-            state = this.ballconfig.BALL_STATE_DROP_IN_RIVAL;
-        }
-
-        if (this.stateCallback != null) {
-            // 给控制器传递发球左侧的状态
-            this.stateCallback(state);
-        }
-
-        // 判断是否需要磕碰
-        var next = this.x + speed;
-        if (this.x < this.flyRight && next >= this.flyRight) {
-            this.bump.bump(cc.v2(this.x, this.equation(this.x)));
-        }
-
-        this.x = next;
-
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.x, this.equation(this.x));
-        this.g.bezierCurveTo(this.x, this.equation(this.x), this.x - 5, this.equation(this.x - 5), this.x - 10, this.equation(this.x - 10));
-        this.g.stroke();
-    },
-});

+ 0 - 9
assets/scripts/balls/minepatrtor.js.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.0.5",
-  "uuid": "68dfb62e-e6f5-417f-9f5f-c738754e3775",
-  "isPlugin": false,
-  "loadPluginInWeb": true,
-  "loadPluginInNative": true,
-  "loadPluginInEditor": false,
-  "subMetas": {}
-}

+ 0 - 126
assets/scripts/balls/minepeelrtor.js

@@ -1,126 +0,0 @@
-// 我方削球,从右侧到右侧
-
-// 角色的方向
-var Peel_State = cc.Enum ({
-    Peel_Fly: 1,
-    Peel_Flip: 2
-});
-
-var Bump = require("bump")
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        g: {
-            default: null,
-            type: cc.Graphics,
-        },
-
-        bump: {
-            default: null,
-            type: Bump,
-        },
-    },
-
-    // LIFE-CYCLE CALLBACKS:
-
-    // onLoad () {},
-
-    start () {
-        this.initValues();
-    },
-
-    // 初始化
-    initValues:function() {
-        // 球的状态信息
-        this.ballconfig = require("ballconfig");
-
-        this.state = Peel_State.Peel_Fly;
-
-        // 球的运动区间
-        this.flyRight = 159;
-        this.flyLeft = 78;
-        this.flipRight = 109;
-
-        // 配置方程式的各项数据
-        // 飞翔时候的数据
-        this.flyX = 75;
-        this.flyY = 105;
-        this.flyDown = -25;
-
-        // 弹起来时候的数据
-        this.flipX = 0;
-        this.flipY = -800;
-        this.flipDown = 11.8;
-    },
-
-    // 发球时的方程式
-    equation:function(x) {
-        if (this.state == Peel_State.Peel_Fly) {  
-            return (x * x - this.flyX * 2 * x + this.flyX * this.flyX) / this.flyDown + this.flyY;
-        } else {
-            return x * this.flipDown + this.flipY;
-        }
-
-        return 0;
-    },
-
-    ballPeel:function() {
-        this.unschedule(this.peelUpdate);
-        this.x = this.flyRight;
-        this.schedule(this.peelUpdate, 1.0 / 60);
-    },
-
-    ballStop:function() {
-        this.unschedule(this.peelUpdate);
-    },
-    
-    peelUpdate:function (dt) {
-        this.g.clear();
-
-        var speed = 0;
-        var state;
-
-        if (this.state == Peel_State.Peel_Fly) {
-            if (this.x >= this.flyLeft) {
-                speed = -2;
-                state = this.ballconfig.BALL_STATE_MINE_RIGHT_TO_RIGHT_FLY;
-            } else {
-                this.state = Peel_State.Peel_Flip;
-            }
-        } else {
-            if (this.x <= this.flipRight) {
-                speed = 1;
-                state = this.ballconfig.BALL_STATE_MINE_RIGHT_TO_RIGHT_FLIP;
-            } else {
-                speed = 1;
-                state = this.ballconfig.BALL_STATE_DROP_IN_RIVAL;
-            }
-        }
-
-        if (this.stateCallback != null) {
-            // 给控制器传递发球左侧的状态
-            this.stateCallback(state);
-        }
-
-        // 判断是否需要磕碰
-        var next = this.x + speed;
-        if (this.x < this.flyRight && next >= this.flyRight) {
-            this.bump.bump(cc.v2(this.x, this.equation(this.x)));
-        }
-
-        this.x = next;
-
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.x, this.equation(this.x));
-        if (this.state == Peel_State.Peel_Fly) {
-            this.g.bezierCurveTo(this.x, this.equation(this.x), this.x - 5, this.equation(this.x - 5), this.x - 10, this.equation(this.x - 10));
-        } else {
-            this.g.bezierCurveTo(this.x, this.equation(this.x), this.x + 1, this.equation(this.x + 1), this.x + 2, this.equation(this.x + 2));
-        }
-
-        this.g.stroke();
-    },
-
-    // update (dt) {},
-});

+ 0 - 9
assets/scripts/balls/minepeelrtor.js.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.0.5",
-  "uuid": "30a8114a-79ca-4dd4-acd6-c716a4c93554",
-  "isPlugin": false,
-  "loadPluginInWeb": true,
-  "loadPluginInNative": true,
-  "loadPluginInEditor": false,
-  "subMetas": {}
-}

+ 0 - 108
assets/scripts/balls/rivalpatrtol.js

@@ -1,108 +0,0 @@
-// 敌方接球,从地方右侧至敌方左侧
-
-var Bump = require("bump")
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        g: {
-            default: null,
-            type: cc.Graphics,
-        },
-
-        bump: {
-            default: null,
-            type: Bump,
-        },
-    },
-
-    // LIFE-CYCLE CALLBACKS:
-
-    // onLoad () {},
-
-    start () {
-        this.initValues();
-    },
-
-    // 初始化
-    initValues:function() {
-        // 球的状态信息
-        this.ballconfig = require("ballconfig");
- 
-        // 球的运动区间
-        this.flyRight = 123;
-        this.flyLeft = -21;
-        this.flipLeft = -140;
-
-        // 配置方程式的各项数据
-        // 飞翔时候的数据
-        this.flyX = 0;
-        this.flyY = 70;
-        this.flyDown = 2.35;
-
-        // 弹起来时候的数据
-        this.flipX = -5;
-        this.flipY = 25;
-        this.flipDown = -80;
-    },
-
-    // update (dt) {},
-
-    // 发球时的方程式
-    equation:function(x) {
-        // return (x * x - this.flipX * 2 * x + this.flipX * this.flipX) / this.flipDown + this.flipY;
-        
-        if (x <= this.flyRight + 10 && x > this.flyLeft) {
-            return x * this.flyDown + this.flyY;
-        } else if (x <= this.flyLeft && x > this.flipLeft) {
-            return (x * x - this.flipX * 2 * x + this.flipX * this.flipX) / this.flipDown + this.flipY;
-        }
-
-        return (x * x - this.flipX * 2 * x + this.flipX * this.flipX) / this.flipDown + this.flipY;
-    },
-
-    ballPat:function() {
-        this.unschedule(this.patUpdate);
-        this.x = this.flyRight;
-        this.schedule(this.patUpdate, 1.0 / 60);
-    },
-
-    ballStop:function() {
-        this.unschedule(this.patUpdate);
-    },
-    
-    patUpdate:function (dt) {
-        this.g.clear();
-
-        var speed = 0;
-        var state;
-        if (this.x <= this.flyRight + 10 && this.x > this.flyLeft) {
-            speed = 7;
-            state = this.ballconfig.BALL_STATE_RIVAL_RIGHT_TO_LEFT_FLY;
-        } else if (this.x <= this.flyLeft && this.x > this.flipLeft) {
-            speed = 5;
-            state = this.ballconfig.BALL_STATE_RIVAL_RIGHT_TO_LEFT_FLIP;
-        } else if (this.x <= this.flipLeft) {
-            speed = 5;
-            state = this.ballconfig.BALL_STATE_DROP_IN_MINE;
-        }
-
-        if (this.stateCallback != null) {
-            // 给控制器传递发球左侧的状态
-            this.stateCallback(state);
-        }
-
-        // 判断是否需要磕碰
-        var next = this.x - speed;
-        if (this.x > this.flyLeft && next <= this.flyLeft) {
-            this.bump.bump(cc.v2(this.x, this.equation(this.x)));
-        }
-
-        this.x = next;
-
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.x, this.equation(this.x));
-        this.g.bezierCurveTo(this.x, this.equation(this.x), this.x - 5, this.equation(this.x - 5), this.x - 10, this.equation(this.x - 10));
-        this.g.stroke();
-    },
-});

+ 0 - 9
assets/scripts/balls/rivalpatrtol.js.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.0.5",
-  "uuid": "c17c11b2-314b-4e54-bb9b-28a856d965f2",
-  "isPlugin": false,
-  "loadPluginInWeb": true,
-  "loadPluginInNative": true,
-  "loadPluginInEditor": false,
-  "subMetas": {}
-}

+ 0 - 110
assets/scripts/balls/rivalpeelrtor.js

@@ -1,110 +0,0 @@
-// 对手削球,从右侧到右侧
-
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        
-    },
-
-    // LIFE-CYCLE CALLBACKS:
-
-    onLoad () {
-        this.initValues();
-        this.initNodes();
-    },
-
-    start () {
-        this.initActions();
-    },
-
-    // 初始化
-    initValues:function () {
-        // 配置绘制的数据
-        // 从配置中心获取数据
-        this.config = require ("gameconfig")
-        // 配置绘制组件
-        this.g = this.getComponent(cc.Graphics);
-
-        // 记录下节点
-        this.poses = new Array();
-        this.beginPos = cc.v2(-95, 263);
-        this.centerPos = cc.v2(-75, 58);
-        this.endPos = cc.v2(-66, -163);
-    },
-
-    // 初始化子节点
-    initNodes:function() {
-        this.head = new cc.Node("");
-        this.head.setPosition(this.beginPos);
-        this.head.parent = this.node;
-    },
-
-    // 初始化头部节点的运动
-    initActions:function() {
-        var bezier_01 = [this.beginPos, cc.v2(-230, 410), this.centerPos];
-        var move_01 = cc.bezierTo(1, bezier_01);
-        var move_01_End = cc.callFunc(this.move_01_End, this);
-        var bezier_02 = [this.centerPos, cc.v2(-125, 40), this.endPos];
-        var move_02 = cc.bezierTo(1, bezier_02);
-        var move_02_End = cc.callFunc(this.move_02_End, this);
-
-        this.head.runAction(cc.sequence(move_01, move_01_End, move_02, move_02_End));
-    },
-
-    // 第一步动作结束
-    move_01_End:function() {
-        cc.log ("Move 01 End ... ")
-    },
-
-    // 第二部动作结束
-    move_02_End:function() {
-        cc.log ("Move 02 End ... ")
-    },
-
-    // 外部调用
-    ballStop:function() {
-
-    },
-
-    // 
-
-    // 绘图
-    draw:function() {
-        this.g.clear();
-
-        // 画脑袋和身体
-        this.g.lineWidth = this.config.CIRCLE_WIDTH
-
-        // 画个头部
-        this.g.fillColor.fromHEX('#ff00000');
-        this.g.circle(this.head.x, this.head.y, this.config.HEAD_SIZE);
-        this.g.close();
-        this.g.stroke();
-        this.g.fill();
-        
-        var pos = this.poses[0];
-        this.g.lineWidth = 3;
-        this.g.moveTo(pos.x, pos.y)
-        for (var i = 0; i < this.poses.length; i++) {
-            var getPos = this.poses[i];
-            this.g.lineTo(getPos.x, getPos.y);
-        }
-
-        this.g.stroke();
-
-    },
-
-    update (dt) {
-        // 记录当前的位置
-        var news = [this.head.position];
-        // 在结合当前的数组
-        this.poses = news.concat(this.poses);
-        // 如果数组长度大于20,则将最后一个删除
-        if (this.poses.length > 20) {
-            this.poses.pop();
-        }
-
-        this.draw();
-    },
-});

+ 0 - 9
assets/scripts/balls/rivalpeelrtor.js.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.0.5",
-  "uuid": "e90ebd4a-b013-437d-8a8d-21dd4192b53e",
-  "isPlugin": false,
-  "loadPluginInWeb": true,
-  "loadPluginInNative": true,
-  "loadPluginInEditor": false,
-  "subMetas": {}
-}

+ 0 - 148
assets/scripts/balls/rivalserve.js

@@ -1,148 +0,0 @@
-// 对手发球的运动
-var Bump = require("bump")
-
-cc.Class({
-    extends: cc.Component,
-
-    properties: {
-        g: {
-            default: null,
-            type: cc.Graphics,
-        },
-
-        bump: {
-            default: null,
-            type: Bump,
-        },
-    },
-
-    // LIFE-CYCLE CALLBACKS:
-
-    // onLoad () {},
-
-    start () {
-        this.initValues();
-    },
-
-    // 初始化数据
-    initValues:function() {
-        // 球的状态信息
-        this.ballconfig = require("ballconfig");
-        // 球的动作
-
-        // 发球开始的区间
-        this.serveStartRight = 167;
-        this.serveStartLeft = 105;
-
-        // 发球右的区间
-        this.serveRightLeft = 28;
-        // 发球中的区间
-        this.serveMidLeft = -10;
-        // 发球左的区间
-        this.serveLeftLeft = -100;
-
-        // 配置方程式的各项数据
-        // 发球时数据
-        this.serveStartX = 135;
-        this.serveStartY = 350;
-        this.serveStartDown = -30;
-
-        // 发球时右边位置数据
-        this.serveRightX = 118;
-        this.serveRightY = 285;
-        this.serveRightDown = -45;
-
-        // 发球时中间位置数据
-        this.serveMidX = 118;
-        this.serveMidY = 190;
-        this.serveMidDown = -95;
-
-        // 发球时左侧的位置数据
-        this.serveLeftX = 0;
-        this.serveLeftY = 18;
-        this.serveLeftDown = -92;
-
-        this.g.lineWidth = 4;
-        this.g.fillColor.fromHEX('#ffffff');
-
-        this.x = this.serveStartRight;
-    },
-
-    ballServe:function() {
-        this.unschedule(this.ballUpdate);
-        this.x = this.serveStartRight;
-        this.schedule(this.ballUpdate, 1.0 / 60);
-    },
-
-    ballStop:function() {
-        this.unschedule(this.ballUpdate);
-    },
-
-    ballUpdate:function (dt) {
-        this.g.clear();
-
-        var speed = 0;
-        var state;
-        if (this.x <= this.serveStartRight + 10 && this.x >= this.serveStartLeft) {
-            speed = 1.309;
-            state = this.ballconfig.BALL_STATE_SERVE_START;
-        } else if (this.x < this.serveStartLeft  && this.x >= this.serveRightLeft) {
-            speed = 12;
-            state = this.ballconfig.BALL_STATE_SERVE_RIGHT;
-        } else if (this.x < this.serveRightLeft && this.x >= this.serveMidLeft) {
-            speed = 9;
-            state = this.ballconfig.BALL_STATE_SERVE_MID;
-        } else if (this.x < this.serveMidLeft && this.x >= this.serveLeftLeft) {
-            speed = 8;
-            state = this.ballconfig.BALL_STATE_SERVE_LEFT;
-        } else {
-            speed = 8;
-            state = this.ballconfig.BALL_STATE_DROP_IN_MINE;
-        }
-
-        if (this.stateCallback != null) {
-            // 给控制器传递发球左侧的状态
-            this.stateCallback(state);
-        }
-
-        // 判断是否需要磕碰
-        var next = this.x - speed;
-        if (this.x > this.serveMidLeft && next < this.serveMidLeft) {
-            this.bump.bump(cc.v2(this.x, this.serveEquation(this.x)));
-        }
-
-        this.x = next;
-
-        this.g.lineWidth = 3;
-        this.g.moveTo(this.x, this.serveEquation(this.x));
-        this.g.bezierCurveTo(this.x, this.serveEquation(this.x), this.x + 5, this.serveEquation(this.x + 5), this.x + 10, this.serveEquation(this.x + 10));
-        this.g.stroke();
-    },
-
-    // 发球时的方程式
-    serveEquation:function(x) {
-        // 判断各个不同的区间
-        if (x <= this.serveStartRight + 10 && x >= this.serveStartLeft) {
-            return (x * x - this.serveStartX * 2 * x + this.serveStartX * this.serveStartX) / this.serveStartDown + this.serveStartY;
-        } else if (x < this.serveStartLeft  && x >= this.serveRightLeft) {
-            return (x * x - this.serveRightX * 2 * x + this.serveRightX * this.serveRightX) / this.serveRightDown + this.serveRightY;
-        } else if (x < this.serveRightLeft && x >= this.serveMidLeft) {
-            return (x * x - this.serveMidX * 2 * x + this.serveMidX * this.serveMidX) / this.serveMidDown + this.serveMidY;
-        }
-
-        return (x * x - this.serveLeftX * 2 * x + this.serveLeftX * this.serveLeftX) / this.serveLeftDown + this.serveLeftY;
-        // return 0;
-    },
-
-    // 绘制坐标线
-    drawAxle:function() {
-        this.g.lineWidth = 2;
-        this.g.moveTo(-1000, 0);
-        this.g.lineTo(1000, 0);
-        this.g.stroke();
-
-        this.g.moveTo(0, -1000);
-        this.g.lineTo(0, 1000);
-        this.g.stroke();
-    },
-});

+ 0 - 9
assets/scripts/balls/rivalserve.js.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.0.5",
-  "uuid": "6e6459f8-4156-4f20-993f-47147fa2fcd9",
-  "isPlugin": false,
-  "loadPluginInWeb": true,
-  "loadPluginInNative": true,
-  "loadPluginInEditor": false,
-  "subMetas": {}
-}

+ 29 - 0
assets/scripts/configs/ballconfig.js

@@ -20,6 +20,35 @@ module.exports = {
     BALL_STATE_RIVAL_RIGHT_TO_LEFT_FLY: 11,
     BALL_STATE_RIVAL_RIGHT_TO_LEFT_FLIP: 12,
 
+    // 飞翔中
+    BALL_STATE_FLYING: 50,
+
+    // 我方左侧,可以接球
+    BALL_STATE_MINE_LEFT_PAT: 51,
+    // 我方左侧,可以削球
+    BALL_STATE_MINE_LEFT_PEEL: 52,
+    // 我方左侧,两种方式都可以
+    BALL_STATE_MINE_LEFT_ALL: 53,
+    // 我方右侧,可以接球
+    BALL_STATE_MINE_RIGHT_PAT: 54,
+    // 我方右侧,可以削球
+    BALL_STATE_MINE_RIGHT_PEEL: 55,
+    // 我方右侧,两种方式都可以
+    BALL_STATE_MINE_RIGHT_ALL: 56,
+
+    // 敌方左侧,可以接球
+    BALL_STATE_RIVAL_LEFT_PAT: 57,
+    // 敌方左侧,可以削球
+    BALL_STATE_RIVAL_LEFT_PEEL: 58,
+    // 敌方左侧,两种方式都可以
+    BALL_STATE_RIVAL_LEFT_ALL: 59,
+    // 敌方右侧,可以接球
+    BALL_STATE_RIVAL_RIGHT_PAT: 60,
+    // 敌方右侧,可以削球
+    BALL_STATE_RIVAL_RIGHT_PEEL: 61,
+    // 敌方右侧,两种方式都可以
+    BALL_STATE_RIVAL_RIGHT_ALL: 62,
+
     // 结束后的状态
     BALL_STATE_DROP_IN_MINE: 100,
     BALL_STATE_DROP_IN_RIVAL: 101,

assets/scripts/main.meta → assets/scripts/ctrls.meta


+ 0 - 0
assets/scripts/ctrls/mainctrl.js


Some files were not shown because too many files changed in this diff