瀏覽代碼

稳定版本

里飞沙 5 年之前
父節點
當前提交
6cd8694517
共有 63 個文件被更改,包括 1598 次插入418 次删除
  1. 二進制
      assets/resources/hud/back.png
  2. 4 4
      assets/resources/hud/back.png.meta
  3. 二進制
      assets/resources/hud/friend.png
  4. 4 4
      assets/resources/hud/friend.png.meta
  5. 二進制
      assets/resources/hud/infi.png
  6. 4 4
      assets/resources/hud/infi.png.meta
  7. 二進制
      assets/resources/hud/left.png
  8. 4 4
      assets/resources/hud/left.png.meta
  9. 二進制
      assets/resources/hud/rank.png
  10. 4 4
      assets/resources/hud/rank.png.meta
  11. 二進制
      assets/resources/hud/restart.png
  12. 4 4
      assets/resources/hud/restart.png.meta
  13. 二進制
      assets/resources/hud/right.png
  14. 4 4
      assets/resources/hud/right.png.meta
  15. 二進制
      assets/resources/hud/scorepanel.png
  16. 4 4
      assets/resources/hud/scorepanel.png.meta
  17. 二進制
      assets/resources/hud/share.png
  18. 4 4
      assets/resources/hud/share.png.meta
  19. 二進制
      assets/resources/hud/start.png
  20. 4 4
      assets/resources/hud/start.png.meta
  21. 二進制
      assets/resources/music/crash.mp3
  22. 1 1
      assets/resources/music/start_bgm.ogg.meta
  23. 二進制
      assets/resources/music/crash.ogg
  24. 二進制
      assets/resources/music/fail_music.mp3
  25. 1 1
      assets/resources/music/crash.ogg.meta
  26. 二進制
      assets/resources/music/fail_music.ogg
  27. 二進制
      assets/resources/music/start_bgm.mp3
  28. 1 1
      assets/resources/music/fail_music.ogg.meta
  29. 二進制
      assets/resources/music/start_bgm.ogg
  30. 二進制
      assets/resources/music/win_music.mp3
  31. 1 1
      assets/resources/music/win_music.ogg.meta
  32. 二進制
      assets/resources/music/win_music.ogg
  33. 二進制
      assets/resources/nums/num_0.png
  34. 4 4
      assets/resources/nums/num_0.png.meta
  35. 二進制
      assets/resources/nums/num_1.png
  36. 4 4
      assets/resources/nums/num_1.png.meta
  37. 二進制
      assets/resources/nums/num_2.png
  38. 4 4
      assets/resources/nums/num_2.png.meta
  39. 二進制
      assets/resources/nums/num_3.png
  40. 4 4
      assets/resources/nums/num_3.png.meta
  41. 二進制
      assets/resources/nums/num_4.png
  42. 4 4
      assets/resources/nums/num_4.png.meta
  43. 二進制
      assets/resources/nums/num_5.png
  44. 4 4
      assets/resources/nums/num_5.png.meta
  45. 二進制
      assets/resources/nums/num_6.png
  46. 4 4
      assets/resources/nums/num_6.png.meta
  47. 二進制
      assets/resources/nums/num_7.png
  48. 4 4
      assets/resources/nums/num_7.png.meta
  49. 二進制
      assets/resources/nums/num_8.png
  50. 4 4
      assets/resources/nums/num_8.png.meta
  51. 二進制
      assets/resources/nums/num_9.png
  52. 4 4
      assets/resources/nums/num_9.png.meta
  53. 338 241
      assets/scenes/mainscene.fire
  54. 747 9
      assets/scenes/rankscene.fire
  55. 43 22
      assets/scenes/startscene.fire
  56. 56 29
      assets/scripts/balls/ball.js
  57. 55 0
      assets/scripts/configs/global.js
  58. 9 0
      assets/scripts/configs/global.js.meta
  59. 111 15
      assets/scripts/ctrls/mainctrl.js
  60. 65 13
      assets/scripts/ctrls/rankctrl.js
  61. 59 0
      assets/scripts/ctrls/startctrl.js
  62. 27 2
      settings/project.json
  63. 4 3
      settings/services.json

二進制
assets/resources/hud/back.png


+ 4 - 4
assets/resources/hud/back.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 646,
-      "height": 337,
-      "rawWidth": 646,
-      "rawHeight": 337,
+      "width": 155,
+      "height": 81,
+      "rawWidth": 155,
+      "rawHeight": 81,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/hud/friend.png


+ 4 - 4
assets/resources/hud/friend.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 1033,
-      "height": 331,
-      "rawWidth": 1033,
-      "rawHeight": 331,
+      "width": 248,
+      "height": 79,
+      "rawWidth": 248,
+      "rawHeight": 79,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/hud/infi.png


+ 4 - 4
assets/resources/hud/infi.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 1033,
-      "height": 331,
-      "rawWidth": 1033,
-      "rawHeight": 331,
+      "width": 249,
+      "height": 81,
+      "rawWidth": 249,
+      "rawHeight": 81,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/hud/left.png


+ 4 - 4
assets/resources/hud/left.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 772,
-      "height": 567,
-      "rawWidth": 772,
-      "rawHeight": 567,
+      "width": 111,
+      "height": 82,
+      "rawWidth": 111,
+      "rawHeight": 82,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/hud/rank.png


+ 4 - 4
assets/resources/hud/rank.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 853,
-      "height": 335,
-      "rawWidth": 853,
-      "rawHeight": 335,
+      "width": 205,
+      "height": 80,
+      "rawWidth": 205,
+      "rawHeight": 80,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/hud/restart.png


+ 4 - 4
assets/resources/hud/restart.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 1033,
-      "height": 331,
-      "rawWidth": 1033,
-      "rawHeight": 331,
+      "width": 248,
+      "height": 80,
+      "rawWidth": 248,
+      "rawHeight": 80,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/hud/right.png


+ 4 - 4
assets/resources/hud/right.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 772,
-      "height": 567,
-      "rawWidth": 772,
-      "rawHeight": 567,
+      "width": 111,
+      "height": 82,
+      "rawWidth": 111,
+      "rawHeight": 82,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/hud/scorepanel.png


+ 4 - 4
assets/resources/hud/scorepanel.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 1033,
-      "height": 331,
-      "rawWidth": 1033,
-      "rawHeight": 331,
+      "width": 249,
+      "height": 80,
+      "rawWidth": 249,
+      "rawHeight": 80,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/hud/share.png


+ 4 - 4
assets/resources/hud/share.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 646,
-      "height": 337,
-      "rawWidth": 646,
-      "rawHeight": 337,
+      "width": 155,
+      "height": 81,
+      "rawWidth": 155,
+      "rawHeight": 81,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/hud/start.png


+ 4 - 4
assets/resources/hud/start.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 646,
-      "height": 337,
-      "rawWidth": 646,
-      "rawHeight": 337,
+      "width": 155,
+      "height": 81,
+      "rawWidth": 155,
+      "rawHeight": 81,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/music/crash.mp3


+ 1 - 1
assets/resources/music/start_bgm.ogg.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.0.0",
-  "uuid": "52bc1017-3568-4920-8aa5-ec811bd2eafd",
+  "uuid": "614ed0d7-da5d-451b-a0d7-cf14360a73a6",
   "downloadMode": 0,
   "subMetas": {}
 }

二進制
assets/resources/music/crash.ogg


二進制
assets/resources/music/fail_music.mp3


+ 1 - 1
assets/resources/music/crash.ogg.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.0.0",
-  "uuid": "0e9b9cd3-3326-4884-a1f7-a465da07bfaa",
+  "uuid": "47d9e8be-98c2-454d-b476-04629ac01b91",
   "downloadMode": 0,
   "subMetas": {}
 }

二進制
assets/resources/music/fail_music.ogg


二進制
assets/resources/music/start_bgm.mp3


+ 1 - 1
assets/resources/music/fail_music.ogg.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.0.0",
-  "uuid": "382579e6-d259-44fc-91cf-a8b825678177",
+  "uuid": "f3796fcc-24e4-420a-a0c3-be2bd92c603b",
   "downloadMode": 0,
   "subMetas": {}
 }

二進制
assets/resources/music/start_bgm.ogg


二進制
assets/resources/music/win_music.mp3


+ 1 - 1
assets/resources/music/win_music.ogg.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.0.0",
-  "uuid": "2fc3ef7c-544c-494d-a40d-07f584b21dfd",
+  "uuid": "0c29d6f4-68dc-4119-8b70-8ced3c7fb10f",
   "downloadMode": 0,
   "subMetas": {}
 }

二進制
assets/resources/music/win_music.ogg


二進制
assets/resources/nums/num_0.png


+ 4 - 4
assets/resources/nums/num_0.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 126,
-      "height": 185,
-      "rawWidth": 126,
-      "rawHeight": 185,
+      "width": 31,
+      "height": 46,
+      "rawWidth": 31,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/nums/num_1.png


+ 4 - 4
assets/resources/nums/num_1.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 118,
-      "height": 184,
-      "rawWidth": 118,
-      "rawHeight": 184,
+      "width": 30,
+      "height": 46,
+      "rawWidth": 30,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/nums/num_2.png


+ 4 - 4
assets/resources/nums/num_2.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 118,
-      "height": 182,
-      "rawWidth": 118,
-      "rawHeight": 182,
+      "width": 29,
+      "height": 46,
+      "rawWidth": 29,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/nums/num_3.png


+ 4 - 4
assets/resources/nums/num_3.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 112,
-      "height": 183,
-      "rawWidth": 112,
-      "rawHeight": 183,
+      "width": 29,
+      "height": 46,
+      "rawWidth": 29,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/nums/num_4.png


+ 4 - 4
assets/resources/nums/num_4.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 138,
-      "height": 185,
-      "rawWidth": 138,
-      "rawHeight": 185,
+      "width": 35,
+      "height": 46,
+      "rawWidth": 35,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/nums/num_5.png


+ 4 - 4
assets/resources/nums/num_5.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 104,
-      "height": 183,
-      "rawWidth": 104,
-      "rawHeight": 183,
+      "width": 25,
+      "height": 46,
+      "rawWidth": 25,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/nums/num_6.png


+ 4 - 4
assets/resources/nums/num_6.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 109,
-      "height": 183,
-      "rawWidth": 109,
-      "rawHeight": 183,
+      "width": 27,
+      "height": 46,
+      "rawWidth": 27,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/nums/num_7.png


+ 4 - 4
assets/resources/nums/num_7.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 123,
-      "height": 185,
-      "rawWidth": 123,
-      "rawHeight": 185,
+      "width": 31,
+      "height": 46,
+      "rawWidth": 31,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/nums/num_8.png


+ 4 - 4
assets/resources/nums/num_8.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 112,
-      "height": 183,
-      "rawWidth": 112,
-      "rawHeight": 183,
+      "width": 28,
+      "height": 46,
+      "rawWidth": 28,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

二進制
assets/resources/nums/num_9.png


+ 4 - 4
assets/resources/nums/num_9.png.meta

@@ -17,10 +17,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 109,
-      "height": 183,
-      "rawWidth": 109,
-      "rawHeight": 183,
+      "width": 27,
+      "height": 46,
+      "rawWidth": 27,
+      "rawHeight": 46,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

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


+ 747 - 9
assets/scenes/rankscene.fire

@@ -41,8 +41,8 @@
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.310546875,
-      "y": 0.310546875,
+      "x": 0.26360677083333334,
+      "y": 0.26360677083333334,
       "z": 1
     },
     "_quat": {
@@ -72,13 +72,19 @@
       },
       {
         "__id__": 9
+      },
+      {
+        "__id__": 13
+      },
+      {
+        "__id__": 21
       }
     ],
     "_active": true,
     "_level": 0,
     "_components": [
       {
-        "__id__": 13
+        "__id__": 29
       }
     ],
     "_prefab": null,
@@ -237,8 +243,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 646,
-      "height": 337
+      "width": 155,
+      "height": 81
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -247,14 +253,14 @@
     },
     "_position": {
       "__type__": "cc.Vec3",
-      "x": -187.2,
+      "x": -161,
       "y": 416,
       "z": 0
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.176,
-      "y": 0.176,
+      "x": 1,
+      "y": 1,
       "z": 1
     },
     "_rotationX": 0,
@@ -283,7 +289,7 @@
       "__uuid__": "7f5d3a91-4752-45b1-9392-12a2835af0f9"
     },
     "_type": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillType": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
@@ -463,6 +469,8 @@
       "__id__": 9
     },
     "_enabled": true,
+    "normalbtn": null,
+    "infibtn": null,
     "_id": "b5JBO8N8ZLmZj7qFMgQRpV"
   },
   {
@@ -492,6 +500,736 @@
     "_id": "69lDEsCnNPFYq1EtCKroXi"
   },
   {
+    "__type__": "cc.Node",
+    "_name": "normal_btn",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 14
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 19
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -100,
+      "y": -425,
+      "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": "e2JbHXLslDt4mp5Kxjt8K1"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Background",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 13
+    },
+    "_children": [
+      {
+        "__id__": 15
+      }
+    ],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 17
+      },
+      {
+        "__id__": 18
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 230,
+      "g": 230,
+      "b": 230,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_quat": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "groupIndex": 0,
+    "_id": "43NKzXNNtOTYgeibdhqOCr"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 14
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 3,
+    "_components": [
+      {
+        "__id__": 16
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_quat": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "groupIndex": 0,
+    "_id": "90+tgxMc1F4awLCZgfEy7m"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 15
+    },
+    "_enabled": true,
+    "_useOriginalSize": false,
+    "_string": "普通模式",
+    "_N$string": "普通模式",
+    "_fontSize": 20,
+    "_lineHeight": 40,
+    "_enableWrapText": false,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 1,
+    "_N$cacheMode": 0,
+    "_id": "b0kvVS8ytLIqHcUryFMcqZ"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "_spriteFrame": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_state": 0,
+    "_atlas": null,
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_id": "c2roB0gd5MZJ/bLwgxar5/"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 100,
+    "_originalHeight": 40,
+    "_id": "7fSmYws89LXI6b1dUskqSu"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 13
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 20
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 2,
+    "transition": 2,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 230,
+      "g": 230,
+      "b": 230,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 120,
+      "g": 120,
+      "b": 120,
+      "a": 200
+    },
+    "_N$normalSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "_N$hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$disabledSprite": {
+      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
+    },
+    "_N$target": {
+      "__id__": 14
+    },
+    "_id": "9b8GCcqdlFaqUK55th5vwD"
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 9
+    },
+    "component": "",
+    "_componentId": "318bdR/UelGl6Zp2tEBPujR",
+    "handler": "normalClicked",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "normal_btn",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 22
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [
+      {
+        "__id__": 27
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 100,
+      "y": -425,
+      "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": "ddsnrQqPFN6qqe/O5oaRW2"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Background",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 21
+    },
+    "_children": [
+      {
+        "__id__": 23
+      }
+    ],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 25
+      },
+      {
+        "__id__": 26
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 230,
+      "g": 230,
+      "b": 230,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_quat": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "groupIndex": 0,
+    "_id": "142J2AdPRA6K2apN1n9Dan"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 22
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 3,
+    "_components": [
+      {
+        "__id__": 24
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_rotationX": 0,
+    "_rotationY": 0,
+    "_quat": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "groupIndex": 0,
+    "_id": "7aLWcbszNNBojTX86KCbKz"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 23
+    },
+    "_enabled": true,
+    "_useOriginalSize": false,
+    "_string": "无限模式",
+    "_N$string": "无限模式",
+    "_fontSize": 20,
+    "_lineHeight": 40,
+    "_enableWrapText": false,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 1,
+    "_N$cacheMode": 0,
+    "_id": "6dEEyI+bpHzILYsZ2C3eyV"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 22
+    },
+    "_enabled": true,
+    "_spriteFrame": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_state": 0,
+    "_atlas": null,
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_id": "b8M4BU999HE5lT/VlqgFki"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 22
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 100,
+    "_originalHeight": 40,
+    "_id": "c9ECLqLEVE162dW3294KlZ"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 21
+    },
+    "_enabled": true,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [
+      {
+        "__id__": 28
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 2,
+    "transition": 2,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 230,
+      "g": 230,
+      "b": 230,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 200,
+      "g": 200,
+      "b": 200,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 120,
+      "g": 120,
+      "b": 120,
+      "a": 200
+    },
+    "_N$normalSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "pressedSprite": {
+      "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
+    },
+    "_N$hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "hoverSprite": {
+      "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
+    },
+    "_N$disabledSprite": {
+      "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
+    },
+    "_N$target": {
+      "__id__": 22
+    },
+    "_id": "61OY7roclN9KW5PAt5FHhw"
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 9
+    },
+    "component": "",
+    "_componentId": "318bdR/UelGl6Zp2tEBPujR",
+    "handler": "infiClicked",
+    "customEventData": ""
+  },
+  {
     "__type__": "cc.Canvas",
     "_name": "",
     "_objFlags": 0,

+ 43 - 22
assets/scenes/startscene.fire

@@ -75,7 +75,7 @@
     "_level": 0,
     "_components": [
       {
-        "__id__": 23
+        "__id__": 24
       }
     ],
     "_prefab": null,
@@ -231,6 +231,9 @@
     "_components": [
       {
         "__id__": 22
+      },
+      {
+        "__id__": 23
       }
     ],
     "_prefab": null,
@@ -307,8 +310,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1033,
-      "height": 331
+      "width": 248,
+      "height": 79
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -323,8 +326,8 @@
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.22,
-      "y": 0.22,
+      "x": 1,
+      "y": 1,
       "z": 1
     },
     "_rotationX": 0,
@@ -353,7 +356,7 @@
       "__uuid__": "46173aec-5cb4-4c59-9881-1ac4778b834e"
     },
     "_type": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillType": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
@@ -478,8 +481,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 853,
-      "height": 335
+      "width": 205,
+      "height": 80
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -494,8 +497,8 @@
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.22,
-      "y": 0.22,
+      "x": 1,
+      "y": 1,
       "z": 1
     },
     "_rotationX": 0,
@@ -524,7 +527,7 @@
       "__uuid__": "ddf52628-d27b-4518-9e1a-e37642cefd62"
     },
     "_type": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillType": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
@@ -649,8 +652,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 646,
-      "height": 337
+      "width": 155,
+      "height": 81
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -665,8 +668,8 @@
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.22,
-      "y": 0.22,
+      "x": 1,
+      "y": 1,
       "z": 1
     },
     "_rotationX": 0,
@@ -695,7 +698,7 @@
       "__uuid__": "35e55c3a-00cd-4d51-98a0-508230940180"
     },
     "_type": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillType": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
@@ -799,7 +802,7 @@
       "__id__": 5
     },
     "_children": [],
-    "_active": false,
+    "_active": true,
     "_level": 2,
     "_components": [
       {
@@ -820,8 +823,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1033,
-      "height": 331
+      "width": 249,
+      "height": 81
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -836,8 +839,8 @@
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.22,
-      "y": 0.22,
+      "x": 1,
+      "y": 1,
       "z": 1
     },
     "_rotationX": 0,
@@ -866,7 +869,7 @@
       "__uuid__": "d06a7d9d-2ba5-48f0-87f0-1bc0277f2296"
     },
     "_type": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillType": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
@@ -973,6 +976,24 @@
     "_id": "00TA9W2tFC375KFsM1umJf"
   },
   {
+    "__type__": "cc.AudioSource",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 5
+    },
+    "_enabled": true,
+    "_clip": {
+      "__uuid__": "f3796fcc-24e4-420a-a0c3-be2bd92c603b"
+    },
+    "_volume": 1,
+    "_mute": false,
+    "_loop": true,
+    "playOnLoad": true,
+    "preload": false,
+    "_id": "ab7PwcAMxHkKMVj2g1xh4p"
+  },
+  {
     "__type__": "cc.Canvas",
     "_name": "",
     "_objFlags": 0,

+ 56 - 29
assets/scripts/balls/ball.js

@@ -4,7 +4,6 @@ cc.Class({
     extends: cc.Component,
 
     properties: {
-        
     },
 
     // LIFE-CYCLE CALLBACKS:
@@ -103,9 +102,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 300, bezier_02);
+
+        var move_02_time = this.speed / 300;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -135,9 +136,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 150, bezier_02);
+
+        var move_02_time = this.speed / 150;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -167,9 +170,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 150, bezier_02);
+
+        var move_02_time = this.speed / 150;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -199,9 +204,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 150, bezier_02);
+
+        var move_02_time = this.speed / 150;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -231,9 +238,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 200, bezier_02);
+
+        var move_02_time = this.speed / 200;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 2);
         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);
@@ -271,9 +280,11 @@ cc.Class({
         var move_03_end = cc.callFunc(function() {
             self.bump(jumpPos);
         });
-        var move_04 = cc.bezierTo(0.3, bezier_04);
+
+        var move_04_time = this.speed / 350;
+        var move_04 = cc.bezierTo(move_04_time, bezier_04);
         // 在第四条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.15);
+        var delay = cc.delayTime(move_04_time / 3);
         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);
@@ -305,9 +316,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 200, bezier_02);
+
+        var move_02_time = this.speed / 200;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -340,9 +353,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 150, bezier_02);
+
+        var move_02_time = this.speed / 150;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -375,9 +390,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 250, bezier_02);
+
+        var move_02_time = this.speed / 250;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -411,9 +428,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 250, bezier_02);
+
+        var move_02_time = this.speed / 200;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -446,9 +465,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 250, bezier_02);
+
+        var move_02_time = this.speed / 250;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -481,9 +502,11 @@ cc.Class({
         var move_01_end = cc.callFunc(function() {
             self.bump(dropPos);
         });
-        var move_02 = cc.bezierTo(this.speed / 150, bezier_02);
+        
+        var move_02_time = this.speed / 150;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -511,9 +534,11 @@ cc.Class({
             this.bump(centerPos);
         }, this);
         var bezier_02 = [centerPos, cc.v2(-125, 40), endPos];
-        var move_02 = cc.bezierTo(this.speed / 180, bezier_02);
+
+        var move_02_time = this.speed / 180;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);
@@ -541,9 +566,11 @@ cc.Class({
             this.bump(centerPos);
         }, this);
         var bezier_02 = [centerPos, cc.v2(110, 20), endPos];
-        var move_02 = cc.bezierTo(this.speed / 180, bezier_02);
+
+        var move_02_time = this.speed / 150;
+        var move_02 = cc.bezierTo(move_02_time, bezier_02);
         // 在第二条路线后开始的一段时间,需要通知控制器改变状态
-        var delay = cc.delayTime(0.25);
+        var delay = cc.delayTime(move_02_time / 4);
         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);

+ 55 - 0
assets/scripts/configs/global.js

@@ -0,0 +1,55 @@
+module.exports = {
+	// 初始化配置
+	initConfig:function() {
+		// 公共的
+		this.name = "我的名字"
+		// 判断是否登录状态
+		this.login = false
+		// 判断是展示好友排行还是群排行,1为好友排行,2为群排行
+		// 判断是否刚刚打开游戏
+        this.firstOpen = true
+        // 记录得分
+		this.score = 0;
+		// 是否无限模式
+		this.infiMode = false;
+		
+		var best = cc.sys.localStorage.getItem("save_best_score");
+        // 设置最高分数
+        if (best == null || best == "") {
+            this.bestscore = 0
+        } else {
+            this.bestscore = parseInt (best)
+		}
+
+		best = cc.sys.localStorage.getItem("save_best_time");
+		// 设置最高时间
+		if (best == null || best == "") {
+			this.besttime = 0;
+		} else {
+			this.besttime = parseInt (best);
+		}
+		
+		console.log ("最高时间 = " + this.besttime + ", 最高分 = " + this.bestscore);
+	},
+
+	// 外部调用
+	// 保存最高分
+	saveBestScore:function() {
+		// 如果传入的分数大于之前保存的最高分,则保存
+		if (this.score > this.bestscore) {
+			this.bestscore = this.score;
+			cc.sys.localStorage.setItem("save_best_score", this.bestscore.toString())
+		}
+	},
+
+	// 保存最长时间
+	saveBestTime:function() {
+		// 如果传入的分数大于之前保存的最高时间,则保存
+		if (this.score > this.besttime) {
+			this.besttime = this.score;
+			cc.sys.localStorage.setItem("save_best_time", this.besttime.toString())
+		}
+	}
+};
+
+require("global").initConfig()

+ 9 - 0
assets/scripts/configs/global.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "dc3236a6-cbb5-49fc-9cd9-45b8e257654f",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 111 - 15
assets/scripts/ctrls/mainctrl.js

@@ -51,6 +51,29 @@ cc.Class({
             default: null,
             type: cc.Node,
         },
+
+        // 音效
+        // 击打
+        crashclip: {
+            default: null,
+            type: cc.AudioClip,
+        },
+
+        winclip: {
+            default: null,
+            type: cc.AudioClip,
+        },
+
+        failclip: {
+            default: null,
+            type: cc.AudioClip,
+        },
+
+        // 摄像机
+        camera: {
+            default: null,
+            type: cc.Camera,
+        },
     },
 
     // LIFE-CYCLE CALLBACKS:
@@ -70,11 +93,23 @@ cc.Class({
     initValues:function() {
         // 球的状态信息
         this.ballconfig = require("ballconfig");
+        // 加载全局变量
+        this.global = require("global");
         // 当前球的状态,初始化为发球开始状态
         this.ballstate = this.ballconfig.BALL_STATE_SERVE_START;
 
+        // 我方得分和敌方得分
         this.mineScore = 0;
         this.rivalScore = 0;
+        
+        var index = Math.random() * 3;
+        if (index > 2) {
+            this.camera.backgroundColor = new cc.Color().fromHEX("#FFB4DE");
+        } else if (index > 1 && index < 2) {
+            this.camera.backgroundColor = new cc.Color().fromHEX("#FFF8E0");
+        } else {
+            this.camera.backgroundColor = new cc.Color().fromHEX("#E0FFF0");
+        }
     },
 
     // 初始化监听
@@ -85,6 +120,11 @@ cc.Class({
             // self.rivalserve.ballServe();
             self.ball.rivalServer();
             self.ball.ballAction();
+
+            // 发出撞击声
+            self.scheduleOnce (function() {
+                cc.audioEngine.play(self.crashclip, false, 1);
+            }, 1.2);
         }
 
         // 添加触摸开始事件
@@ -100,28 +140,33 @@ cc.Class({
             var value = Math.random() * 2;
             // 根据位置判断我方的方向
             if (loc.x < 0) {
-                cc.log ("在左侧 ... ")
+                console.log ("在左侧 ... ")
                 // 左侧可接,暂时我方左侧只有这个功能
                 self.mine.pat.pat();
                 self.mine.setDir(1);
                 if (self.ballstate == self.ballconfig.BALL_STATE_MINE_LEFT_PAT) {
                     self.ball.ballStop();
-    
+                    cc.audioEngine.play(self.crashclip, false, 1);       
+                    
+                    // self.ball.minePatLToL_01();
+
                     if (value > 1) {
+                        console.log ("往左侧打 ... ")
                         // 往左边打
                         self.ball.minePatLToL_01();
                     } else {
+                        console.log ("往左侧打 ... ")
                         // 往右边打
                         self.ball.minePatLToR_01();
                     }
                 }
             } else {
-                cc.log ("来右边 ... ")
+                console.log ("来右边 ... ")
                 self.mine.setDir(2);
-
                 
                 if (self.ballstate == self.ballconfig.BALL_STATE_MINE_RIGHT_PAT) {
                     self.ball.ballStop();
+                    cc.audioEngine.play(self.crashclip, false, 1);
                     // 右侧可接
                     self.mine.pat.pat();
                     // 这个里面只有往右的
@@ -134,6 +179,7 @@ cc.Class({
                         // 需要保证不是在结束状态
                         if (!this.isEnd) {
                             self.ball.ballStop();
+                            cc.audioEngine.play(self.crashclip, false, 1);
                             // 这个里面只有往左的
                             self.ball.minePeelRToL_01();
                         }
@@ -160,17 +206,35 @@ cc.Class({
     // 功能性方法
     // 帧判断,用来检测球状态,给对手的行为进行决策
     rivalUpdate:function (delay) {
+        
+        // 如果是无限模式,则永远不会失败
+        if (this.global.infiMode == false) {
+            // 否则需要进行校验
+            var count = parseInt(Math.random() * 100);
+            if (count > 15) {
+                return;
+            }
+        } else {
+            // 时间戳增加,用来调整难度
+            this.timestamp++;
+
+            // 保证速度不会小于50
+            if (this.ball.speed > 50) {
+                this.ball.speed -= 8.0 / 60;
+            }
+        }
+
         // 需要保证不打扰削球动作
         if (this.rival.ispeel == true) {
             return;
         }
 
         this.rival.ispeel = false;
-
         var value = Math.random() * 2;
 
         if (this.ballstate == this.ballconfig.BALL_STATE_RIVAL_LEFT_PAT) {
             this.ball.ballStop();
+            cc.audioEngine.play(this.crashclip, false, 1);
             this.rival.pat.pat();
             this.rival.setDir(3);
             // 敌方左侧可接
@@ -192,6 +256,7 @@ cc.Class({
 
                 if (!this.isEnd) {
                     this.ball.ballStop();
+                    cc.audioEngine.play(self.crashclip, false, 1);
                     // 敌方左侧可削
                     if (value > 1) {
                         // 往左侧削
@@ -204,6 +269,7 @@ cc.Class({
             }, 0.2);
         } else if (this.ballstate == this.ballconfig.BALL_STATE_RIVAL_RIGHT_PAT) {
             this.ball.ballStop();
+            cc.audioEngine.play(this.crashclip, false, 1);
             this.rival.pat.pat();
             this.rival.setDir(4);
             var index = Math.random() * 2;
@@ -251,15 +317,27 @@ cc.Class({
         // 其他数据
         this.isEnd = false;
 
+        // 时间戳
+        this.timestamp = 0;
+        // 初始化速度
+        this.ball.speed = 100;
+
         // 游戏开始,对方开始发球
         this.rival.setDir(4);
         this.rival.roleServe();
-        cc.log ("发起了 .. ")
-        this.schedule(this.rivalUpdate, 1.0 / 60);
+        
+        this.schedule(this.rivalUpdate, 1.0 / 45);
     },
 
     // 回合结束
     roundOver:function() {
+
+        if (this.global.infiMode) {
+            this.global.score = this.timestamp / 45;
+            console.log ("时间 -> " + this.global.score + ", 时间 = " + this.timestamp / 45)
+            this.global.saveBestTime();
+        }
+        
         this.unschedule(this.rivalUpdate);
         this.isEnd = true;
 
@@ -269,6 +347,7 @@ cc.Class({
 
         if (this.win) {
             cc.log ("游戏结束,胜利了 .. ")
+            cc.audioEngine.play(this.winclip, false, 1);
             this.mine.win.win();
             this.rival.fail.fail();
 
@@ -281,6 +360,7 @@ cc.Class({
             }
         } else {
             cc.log ("输了 ... ")
+            cc.audioEngine.play(this.failclip, false, 1);
             this.rival.win.win();
             this.mine.fail.fail();
 
@@ -298,11 +378,16 @@ cc.Class({
 
     // 游戏结束
     gameOver:function() {
-        if (this.mines.value == 5) {
-            cc.log("我方胜利 ... ");
-        } else {
-            cc.log("敌方胜利 ... ");
-        }
+        if (!this.global.infiMode) {
+            if (this.mines.value == 5) {
+                cc.log("我方胜利 ... ");
+                // 得一分
+                this.global.score ++;
+                this.global.saveBestScore();
+            } else {
+                cc.log("敌方胜利 ... ");
+            }
+        } 
 
         this.scorepanel.active = false;
         this.operatepanel.active = false;
@@ -316,6 +401,11 @@ cc.Class({
     },
 
     // 事件
+    // 返回
+    backClicked:function() {
+        cc.director.loadScene("startscene")
+    },
+
     // 重新开始
     restartClicked:function() {
         this.gameStart();
@@ -326,9 +416,15 @@ cc.Class({
         if (cc.sys.platform == cc.sys.WECHAT_GAME) {
             wx.shareAppMessage({
                 withShareTicket: true,
-                title: '我要主动拉起分享啦',
-                success: function(shareTickets,groupMsgInfos){console.log('主动成功')},
-                fail: function(res){console.log('主动失败');console.log(res);},
+                title: '乒乓高手',
+                query: "mode=" + "pingpong",
+                imageUrl: 'https://pics6.baidu.com/feed/a8014c086e061d95efd7d3f118ee0dd463d9ca02.jpeg?token=5f7a71d9129d97b8411b4965f7e23a7c&s=A8E2AF0810E09ABEE6B56DDE010050A2',
+                success: function(shareTickets,groupMsgInfos) {
+                    console.log('主动成功')
+                }, fail: function(res) {
+                    console.log('主动失败');
+                    console.log(res);
+                },
             });
         }
     }

+ 65 - 13
assets/scripts/ctrls/rankctrl.js

@@ -3,10 +3,15 @@ cc.Class({
     extends: cc.Component,
 
     properties: {
-        // panel: {
-        //     default: null,
-        //     type: cc.Sprite,
-        // },
+        normalbtn: {
+            default: null,
+            type: cc.Button,
+        },
+
+        infibtn: {
+            default: null,
+            type: cc.Button,
+        },
     },
 
     // LIFE-CYCLE CALLBACKS:
@@ -14,32 +19,46 @@ cc.Class({
     // onLoad () {},
 
     start () {
-        // this.initWx();
-        // this.initValues();
-
-        console.log("Start ... ")
+        this.initValues();
+        this.initWx();
     },
 
     // 初始化
     // 初始化数据
     initValues:function() {
-        this.texture = new cc.Texture2D();
+        // 加载全局变量
+        this.global = require("global");
     },
 
     // 初始化微信数据
     initWx:function() {
+        if (this.global) {
+            console.log ("最高分 = " + this.global.bestscore);
+        } else {
+            console.log ("没有数据 ... ")
+        }
         if (cc.sys.platform == cc.sys.WECHAT_GAME) {
+
             // 配置上传的数据
-            var kvScore = {}
-            kvScore.key = "score"
-            kvScore.value = "100"
+            var normalKv = {}
+            normalKv.key = "normal_score"
+            normalKv.value = this.global.bestscore.toString()
+
+            var infiKv = {}
+            infiKv.key = "infi_score";
+            infiKv.value = this.global.besttime.toString()
 
-            var kvList = [kvScore]
+            var kvList = [normalKv, infiKv]
 
             wx.setUserCloudStorage({
                 KVDataList : kvList,
                 success : function() {
                     console.log ("设置成功")
+
+                    // 再通知开放数据域更新数据
+                    wx.postMessage({
+                        message: "updaterank"
+                    })
                 },
                 fail : function() {
                     console.log ("设置失败")
@@ -52,7 +71,40 @@ cc.Class({
     },
     
     // 事件
+    // 返回按钮
     backClicked:function() {
         cc.director.loadScene("startscene")
     },
+
+    // 切换到普通模式
+    normalClicked:function() {
+        // 自己隐藏,无限模式按钮显示
+        // this.normalbtn.active = false
+        // this.infibtn.active = true;
+
+        console.log ("切换到普通模式 ... ")
+
+        if (cc.sys.platform == cc.sys.WECHAT_GAME) {
+            // 再通知开放数据域切换数据
+            wx.postMessage({
+                message: "show_normal_rank"
+            })
+        }
+    },
+
+    // 切换到无限模式
+    infiClicked:function() {
+        // 自己隐藏,普通模式按钮显示
+        // this.normalbtn.active = true
+        // this.infibtn.active = false;
+
+        console.log ("切换到无限模式 ... ")
+
+        if (cc.sys.platform == cc.sys.WECHAT_GAME) {
+            // 再通知开放数据域切换数据
+            wx.postMessage({
+                message: "show_infi_rank"
+            })
+        }
+    },
 });

+ 59 - 0
assets/scripts/ctrls/startctrl.js

@@ -13,16 +13,72 @@ cc.Class({
 
     start () {
         this.initValues();
+        this.wxLogin();
     },
 
     // 初始化
     // 初始化数据
     initValues:function() {
+        // 加载全局变量
+        this.global = require("global")
         this.rank = this.getComponent(RankCtrl);
     },
 
     // update (dt) {},
 
+
+    // 微信登陆
+    wxLogin:function() {
+        var self = this
+        if (cc.sys.platform == cc.sys.WECHAT_GAME) {
+            // 首先判断是否首次打开
+            if (this.global.firstOpen) {
+                // 配置分享信息
+                wx.showShareMenu({
+                    withShareTicket: true,
+                    success: function (res) {
+                        // 分享成功
+                        console.log('配置成功')
+                        console.log(res)
+                    },
+                    fail: function (res) {
+                        // 分享失败
+                        console.log('配置失败')
+                        console.log(res)
+                    }
+                })
+            }
+
+            // 判断是否登录
+            if (this.global.login == false) {
+                // 微信登陆
+                wx.login({
+                    success: function () {
+                        console.log ("登陆成功 ... ")
+                        wx.getUserInfo({
+                            success: function(res) {
+                                cc.log ("返回的json数据 : " + res.rawData)
+                                var rawData = JSON.parse(res.rawData)
+                                cc.log ("昵称 : " + rawData.nickName)
+                                self.global.name = rawData.nickName
+                                self.global.login = true
+
+                                // 对昵称进行截取,如果长度大于6,则为xx...的模式
+                                if (self.global.name.length > 6) {
+                                    var string = self.global.name
+                                    self.global.name = string.slice(0, 6)
+                                }
+                            }, fail: function(res) {
+                                self.global.name = ""
+                                console.log ("获取信息失败 ... " + res.errMsg)
+                            }
+                        })
+                    }
+                })
+            }
+        }
+    },
+
     // 各种事件
     // 好友
     friendClicked:function() {
@@ -39,11 +95,14 @@ cc.Class({
     // 开始
     startClicked:function() {
         cc.log("开始 。。。 ");
+        this.global.infiMode = false;
         cc.director.loadScene("mainscene")
     },
 
     // 无限
     infiClicked:function() {
         cc.log("无限 。。。 ");
+        this.global.infiMode = true;
+        cc.director.loadScene("mainscene")
     },
 });

+ 27 - 2
settings/project.json

@@ -7,7 +7,32 @@
   ],
   "design-resolution-height": 960,
   "design-resolution-width": 544,
-  "excluded-modules": [],
+  "excluded-modules": [
+    "Dynamic Atlas",
+    "ParticleSystem",
+    "TiledMap",
+    "Spine Skeleton",
+    "DragonBones",
+    "RichText",
+    "MotionStreak",
+    "ProgressBar",
+    "ScrollBar",
+    "ScrollView",
+    "Toggle",
+    "PageView",
+    "PageViewIndicator",
+    "Slider",
+    "Layout",
+    "EditBox",
+    "VideoPlayer",
+    "WebView",
+    "Collider",
+    "Physics",
+    "NodePool",
+    "StudioComponent",
+    "Intersection",
+    "Native Socket"
+  ],
   "facebook": {
     "appID": "",
     "audience": {
@@ -23,7 +48,7 @@
   "group-list": [
     "default"
   ],
-  "last-module-event-record-time": 1560945178185,
+  "last-module-event-record-time": 1561729403413,
   "simulator-orientation": false,
   "simulator-resolution": {
     "height": 640,

+ 4 - 3
settings/services.json

@@ -111,11 +111,12 @@
         "iOS",
         "HTML5"
       ],
-      "package_download_url": "http://download.cocos.com/CocosServices/plugins/service-agora/1.0.1_2.2.3.20_2.5.2.zip",
-      "package_version_desc": "first release.",
+      "package_download_url": "http://download.cocos.com/CocosServices/plugins/service-agora/1.0.2_2.2.3.20_2.5.2.zip",
+      "package_version_desc": "解决Bug:onAudioVolumeIndication 回调收不到.",
       "service_component_name": "service-agora",
       "package_versions": [
-        "1.0.1_2.2.3.20_2.5.2"
+        "1.0.1_2.2.3.20_2.5.2",
+        "1.0.2_2.2.3.20_2.5.2"
       ],
       "build_platform": [
         "web-mobile",