├── .gitignore ├── README.md ├── assets ├── Scene.meta ├── Scene │ ├── end.fire │ ├── end.fire.meta │ ├── game.fire │ ├── game.fire.meta │ ├── start.fire │ └── start.fire.meta ├── Script.meta ├── Script │ ├── bomb.js │ ├── bomb.js.meta │ ├── bus.js │ ├── bus.js.meta │ ├── coin.js │ ├── coin.js.meta │ ├── end.js │ ├── end.js.meta │ ├── game.js │ ├── game.js.meta │ ├── number.js │ ├── number.js.meta │ ├── score.js │ ├── score.js.meta │ ├── start.js │ └── start.js.meta ├── Texture.meta └── Texture │ ├── bomb.png │ ├── bomb.png.meta │ ├── bomb.prefab │ ├── bomb.prefab.meta │ ├── coin.png │ ├── coin.png.meta │ ├── coin.prefab │ ├── coin.prefab.meta │ ├── map.jpg │ ├── map.jpg.meta │ ├── player.png │ └── player.png.meta ├── capture ├── 1.png └── out.gif ├── creator.d.ts ├── jsconfig.json ├── project.json └── settings ├── builder.json └── project.json /.gitignore: -------------------------------------------------------------------------------- 1 | #///////////////////////////////////////////////////////////////////////////// 2 | # Fireball Projects 3 | #///////////////////////////////////////////////////////////////////////////// 4 | 5 | library/ 6 | temp/ 7 | local/ 8 | build/ 9 | 10 | #///////////////////////////////////////////////////////////////////////////// 11 | # Logs and databases 12 | #///////////////////////////////////////////////////////////////////////////// 13 | 14 | *.log 15 | *.sql 16 | *.sqlite 17 | 18 | #///////////////////////////////////////////////////////////////////////////// 19 | # files for debugger 20 | #///////////////////////////////////////////////////////////////////////////// 21 | 22 | *.sln 23 | *.csproj 24 | *.pidb 25 | *.unityproj 26 | *.suo 27 | 28 | #///////////////////////////////////////////////////////////////////////////// 29 | # OS generated files 30 | #///////////////////////////////////////////////////////////////////////////// 31 | 32 | .DS_Store 33 | ehthumbs.db 34 | Thumbs.db 35 | 36 | #///////////////////////////////////////////////////////////////////////////// 37 | # exvim files 38 | #///////////////////////////////////////////////////////////////////////////// 39 | 40 | *UnityVS.meta 41 | *.err 42 | *.err.meta 43 | *.exvim 44 | *.exvim.meta 45 | *.vimentry 46 | *.vimentry.meta 47 | *.vimproject 48 | *.vimproject.meta 49 | .vimfiles.*/ 50 | .exvim.*/ 51 | quick_gen_project_*_autogen.bat 52 | quick_gen_project_*_autogen.bat.meta 53 | quick_gen_project_*_autogen.sh 54 | quick_gen_project_*_autogen.sh.meta 55 | .exvim.app 56 | 57 | #///////////////////////////////////////////////////////////////////////////// 58 | # webstorm files 59 | #///////////////////////////////////////////////////////////////////////////// 60 | 61 | .idea/ 62 | 63 | #////////////////////////// 64 | # VS Code 65 | #////////////////////////// 66 | 67 | .vscode/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cocos creater做的接金币小游戏 2 | #### 游戏截图: 3 | ![截图](capture/out.gif) 4 | ## 简介 游戏主要分为三个场景 5 | ### start(点击按钮进入游戏) 6 | ### game(接到炸弹后游戏结束,接到金币分数增加) 7 | ### end(分数统计,点击retry重新开始游戏) 8 | 9 | #### 实现思路: 10 | 游戏中用到的Prefab是炸弹和金币,他们随机从上往下掉。然后使用碰撞系统,如果和人物发生碰撞,做出相应的处理。 11 | 12 | #### 游戏方法: 13 | 通过键盘的左右或者A、D按键来控制小人的移动。接到金币加10分,接到炸弹游戏结束。 14 | 只支持在pc上玩,因为这里监听的是键盘事件,分别监听了键盘的A和D,已经方向键左和右,keycode分别是65(A)、68(D)、37(左)、39(右)。 15 | 16 | #### 程序截图: 17 | ![截图](capture/1.png) 18 | 19 | 20 | -------------------------------------------------------------------------------- /assets/Scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "b05bc400-a96c-4202-9ea7-64f85e775f3a", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Scene/end.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_rawFiles": null, 7 | "scene": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Scene", 13 | "_objFlags": 0, 14 | "_parent": null, 15 | "_children": [ 16 | { 17 | "__id__": 2 18 | } 19 | ], 20 | "_tag": -1, 21 | "_active": true, 22 | "_components": [], 23 | "_prefab": null, 24 | "_id": "6f72eb9e-3e42-4cbb-935a-b8a773cbd318", 25 | "_opacity": 255, 26 | "_color": { 27 | "__type__": "cc.Color", 28 | "r": 255, 29 | "g": 255, 30 | "b": 255, 31 | "a": 255 32 | }, 33 | "_cascadeOpacityEnabled": true, 34 | "_anchorPoint": { 35 | "__type__": "cc.Vec2", 36 | "x": 0, 37 | "y": 0 38 | }, 39 | "_contentSize": { 40 | "__type__": "cc.Size", 41 | "width": 0, 42 | "height": 0 43 | }, 44 | "_localZOrder": 0, 45 | "_globalZOrder": 0, 46 | "_opacityModifyRGB": false, 47 | "groupIndex": 0, 48 | "autoReleaseAssets": false 49 | }, 50 | { 51 | "__type__": "cc.Node", 52 | "_name": "Canvas", 53 | "_objFlags": 0, 54 | "_parent": { 55 | "__id__": 1 56 | }, 57 | "_children": [ 58 | { 59 | "__id__": 3 60 | }, 61 | { 62 | "__id__": 5 63 | }, 64 | { 65 | "__id__": 10 66 | }, 67 | { 68 | "__id__": 13 69 | } 70 | ], 71 | "_tag": -1, 72 | "_active": true, 73 | "_components": [ 74 | { 75 | "__id__": 15 76 | }, 77 | { 78 | "__id__": 16 79 | } 80 | ], 81 | "_prefab": null, 82 | "_id": "65f47kYbkpPTKFcCpFscJc2", 83 | "_opacity": 255, 84 | "_color": { 85 | "__type__": "cc.Color", 86 | "r": 255, 87 | "g": 255, 88 | "b": 255, 89 | "a": 255 90 | }, 91 | "_cascadeOpacityEnabled": true, 92 | "_anchorPoint": { 93 | "__type__": "cc.Vec2", 94 | "x": 0.5, 95 | "y": 0.5 96 | }, 97 | "_contentSize": { 98 | "__type__": "cc.Size", 99 | "width": 960, 100 | "height": 640 101 | }, 102 | "_rotationX": 0, 103 | "_rotationY": 0, 104 | "_scaleX": 1, 105 | "_scaleY": 1, 106 | "_position": { 107 | "__type__": "cc.Vec2", 108 | "x": 480, 109 | "y": 320 110 | }, 111 | "_skewX": 0, 112 | "_skewY": 0, 113 | "_localZOrder": 0, 114 | "_globalZOrder": 0, 115 | "_opacityModifyRGB": false, 116 | "groupIndex": 0 117 | }, 118 | { 119 | "__type__": "cc.Node", 120 | "_name": "title", 121 | "_objFlags": 0, 122 | "_parent": { 123 | "__id__": 2 124 | }, 125 | "_children": [], 126 | "_tag": -1, 127 | "_active": true, 128 | "_components": [ 129 | { 130 | "__id__": 4 131 | } 132 | ], 133 | "_prefab": null, 134 | "_id": "191b5YMtcRAjYc0arP8dVLF", 135 | "_opacity": 255, 136 | "_color": { 137 | "__type__": "cc.Color", 138 | "r": 255, 139 | "g": 255, 140 | "b": 255, 141 | "a": 255 142 | }, 143 | "_cascadeOpacityEnabled": true, 144 | "_anchorPoint": { 145 | "__type__": "cc.Vec2", 146 | "x": 0.5, 147 | "y": 0.5 148 | }, 149 | "_contentSize": { 150 | "__type__": "cc.Size", 151 | "width": 206.72, 152 | "height": 40 153 | }, 154 | "_rotationX": 0, 155 | "_rotationY": 0, 156 | "_scaleX": 1, 157 | "_scaleY": 1, 158 | "_position": { 159 | "__type__": "cc.Vec2", 160 | "x": 2, 161 | "y": 151 162 | }, 163 | "_skewX": 0, 164 | "_skewY": 0, 165 | "_localZOrder": 0, 166 | "_globalZOrder": 0, 167 | "_opacityModifyRGB": false, 168 | "groupIndex": 0 169 | }, 170 | { 171 | "__type__": "cc.Label", 172 | "_name": "", 173 | "_objFlags": 0, 174 | "node": { 175 | "__id__": 3 176 | }, 177 | "_enabled": true, 178 | "_useOriginalSize": false, 179 | "_actualFontSize": 40, 180 | "_fontSize": 40, 181 | "_lineHeight": 40, 182 | "_enableWrapText": true, 183 | "_N$file": null, 184 | "_isSystemFontUsed": true, 185 | "_spacingX": 0, 186 | "_N$string": "Game Over", 187 | "_N$horizontalAlign": 1, 188 | "_N$verticalAlign": 1, 189 | "_N$fontFamily": "Arial", 190 | "_N$overflow": 0 191 | }, 192 | { 193 | "__type__": "cc.Node", 194 | "_name": "retry", 195 | "_objFlags": 0, 196 | "_parent": { 197 | "__id__": 2 198 | }, 199 | "_children": [ 200 | { 201 | "__id__": 6 202 | } 203 | ], 204 | "_tag": -1, 205 | "_active": true, 206 | "_components": [ 207 | { 208 | "__id__": 8 209 | }, 210 | { 211 | "__id__": 9 212 | } 213 | ], 214 | "_prefab": null, 215 | "_id": "66bffaHot5LdIb3SwrfA+CH", 216 | "_opacity": 255, 217 | "_color": { 218 | "__type__": "cc.Color", 219 | "r": 255, 220 | "g": 255, 221 | "b": 255, 222 | "a": 255 223 | }, 224 | "_cascadeOpacityEnabled": true, 225 | "_anchorPoint": { 226 | "__type__": "cc.Vec2", 227 | "x": 0.5, 228 | "y": 0.5 229 | }, 230 | "_contentSize": { 231 | "__type__": "cc.Size", 232 | "width": 100, 233 | "height": 40 234 | }, 235 | "_rotationX": 0, 236 | "_rotationY": 0, 237 | "_scaleX": 1, 238 | "_scaleY": 1, 239 | "_position": { 240 | "__type__": "cc.Vec2", 241 | "x": 12, 242 | "y": -231 243 | }, 244 | "_skewX": 0, 245 | "_skewY": 0, 246 | "_localZOrder": 0, 247 | "_globalZOrder": 0, 248 | "_opacityModifyRGB": false, 249 | "groupIndex": 0 250 | }, 251 | { 252 | "__type__": "cc.Node", 253 | "_name": "Label", 254 | "_objFlags": 0, 255 | "_parent": { 256 | "__id__": 5 257 | }, 258 | "_children": [], 259 | "_tag": -1, 260 | "_active": true, 261 | "_components": [ 262 | { 263 | "__id__": 7 264 | } 265 | ], 266 | "_prefab": null, 267 | "_id": "cacbdpn6EdBjJqVanOwOD66", 268 | "_opacity": 255, 269 | "_color": { 270 | "__type__": "cc.Color", 271 | "r": 0, 272 | "g": 0, 273 | "b": 0, 274 | "a": 255 275 | }, 276 | "_cascadeOpacityEnabled": true, 277 | "_anchorPoint": { 278 | "__type__": "cc.Vec2", 279 | "x": 0.5, 280 | "y": 0.5 281 | }, 282 | "_contentSize": { 283 | "__type__": "cc.Size", 284 | "width": 100, 285 | "height": 40 286 | }, 287 | "_rotationX": 0, 288 | "_rotationY": 0, 289 | "_scaleX": 1, 290 | "_scaleY": 1, 291 | "_position": { 292 | "__type__": "cc.Vec2", 293 | "x": 0, 294 | "y": 0 295 | }, 296 | "_skewX": 0, 297 | "_skewY": 0, 298 | "_localZOrder": 0, 299 | "_globalZOrder": 0, 300 | "_opacityModifyRGB": false, 301 | "groupIndex": 0 302 | }, 303 | { 304 | "__type__": "cc.Label", 305 | "_name": "", 306 | "_objFlags": 0, 307 | "node": { 308 | "__id__": 6 309 | }, 310 | "_enabled": true, 311 | "_useOriginalSize": false, 312 | "_actualFontSize": 20, 313 | "_fontSize": 20, 314 | "_lineHeight": 40, 315 | "_enableWrapText": false, 316 | "_N$file": null, 317 | "_isSystemFontUsed": true, 318 | "_spacingX": 0, 319 | "_N$string": "Retry", 320 | "_N$horizontalAlign": 1, 321 | "_N$verticalAlign": 1, 322 | "_N$fontFamily": "Arial", 323 | "_N$overflow": 1 324 | }, 325 | { 326 | "__type__": "cc.Sprite", 327 | "_name": "", 328 | "_objFlags": 0, 329 | "node": { 330 | "__id__": 5 331 | }, 332 | "_enabled": true, 333 | "_spriteFrame": { 334 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 335 | }, 336 | "_type": 1, 337 | "_sizeMode": 0, 338 | "_fillType": 0, 339 | "_fillCenter": { 340 | "__type__": "cc.Vec2", 341 | "x": 0, 342 | "y": 0 343 | }, 344 | "_fillStart": 0, 345 | "_fillRange": 0, 346 | "_isTrimmedMode": true, 347 | "_srcBlendFactor": 770, 348 | "_dstBlendFactor": 771, 349 | "_atlas": null 350 | }, 351 | { 352 | "__type__": "cc.Button", 353 | "_name": "", 354 | "_objFlags": 0, 355 | "node": { 356 | "__id__": 5 357 | }, 358 | "_enabled": true, 359 | "transition": 2, 360 | "pressedColor": { 361 | "__type__": "cc.Color", 362 | "r": 255, 363 | "g": 255, 364 | "b": 255, 365 | "a": 255 366 | }, 367 | "hoverColor": { 368 | "__type__": "cc.Color", 369 | "r": 255, 370 | "g": 255, 371 | "b": 255, 372 | "a": 255 373 | }, 374 | "duration": 0.1, 375 | "zoomScale": 1.2, 376 | "pressedSprite": { 377 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 378 | }, 379 | "hoverSprite": { 380 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 381 | }, 382 | "clickEvents": [], 383 | "_N$interactable": true, 384 | "_N$enableAutoGrayEffect": false, 385 | "_N$normalColor": { 386 | "__type__": "cc.Color", 387 | "r": 255, 388 | "g": 255, 389 | "b": 255, 390 | "a": 255 391 | }, 392 | "_N$disabledColor": { 393 | "__type__": "cc.Color", 394 | "r": 255, 395 | "g": 255, 396 | "b": 255, 397 | "a": 255 398 | }, 399 | "_N$normalSprite": { 400 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 401 | }, 402 | "_N$disabledSprite": { 403 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 404 | }, 405 | "_N$target": { 406 | "__id__": 5 407 | } 408 | }, 409 | { 410 | "__type__": "cc.Node", 411 | "_name": "number", 412 | "_objFlags": 0, 413 | "_parent": { 414 | "__id__": 2 415 | }, 416 | "_children": [], 417 | "_tag": -1, 418 | "_active": true, 419 | "_components": [ 420 | { 421 | "__id__": 11 422 | }, 423 | { 424 | "__id__": 12 425 | } 426 | ], 427 | "_prefab": null, 428 | "_id": "29df1PivoJO7ZpHoYnTctfn", 429 | "_opacity": 255, 430 | "_color": { 431 | "__type__": "cc.Color", 432 | "r": 240, 433 | "g": 18, 434 | "b": 18, 435 | "a": 255 436 | }, 437 | "_cascadeOpacityEnabled": true, 438 | "_anchorPoint": { 439 | "__type__": "cc.Vec2", 440 | "x": 0.5, 441 | "y": 0.5 442 | }, 443 | "_contentSize": { 444 | "__type__": "cc.Size", 445 | "width": 97.87, 446 | "height": 40 447 | }, 448 | "_rotationX": 0, 449 | "_rotationY": 0, 450 | "_scaleX": 1, 451 | "_scaleY": 1, 452 | "_position": { 453 | "__type__": "cc.Vec2", 454 | "x": 77, 455 | "y": 0 456 | }, 457 | "_skewX": 0, 458 | "_skewY": 0, 459 | "_localZOrder": 0, 460 | "_globalZOrder": 0, 461 | "_opacityModifyRGB": false, 462 | "groupIndex": 0 463 | }, 464 | { 465 | "__type__": "cc.Label", 466 | "_name": "", 467 | "_objFlags": 0, 468 | "node": { 469 | "__id__": 10 470 | }, 471 | "_enabled": true, 472 | "_useOriginalSize": false, 473 | "_actualFontSize": 40, 474 | "_fontSize": 40, 475 | "_lineHeight": 40, 476 | "_enableWrapText": true, 477 | "_N$file": null, 478 | "_isSystemFontUsed": true, 479 | "_spacingX": 0, 480 | "_N$string": "Label", 481 | "_N$horizontalAlign": 1, 482 | "_N$verticalAlign": 1, 483 | "_N$fontFamily": "Arial", 484 | "_N$overflow": 0 485 | }, 486 | { 487 | "__type__": "3cead7bLeJNnaOT18olndzE", 488 | "_name": "", 489 | "_objFlags": 0, 490 | "node": { 491 | "__id__": 10 492 | }, 493 | "_enabled": true, 494 | "number": 0, 495 | "scores": { 496 | "__id__": 11 497 | } 498 | }, 499 | { 500 | "__type__": "cc.Node", 501 | "_name": "New Label", 502 | "_objFlags": 0, 503 | "_parent": { 504 | "__id__": 2 505 | }, 506 | "_children": [], 507 | "_tag": -1, 508 | "_active": true, 509 | "_components": [ 510 | { 511 | "__id__": 14 512 | } 513 | ], 514 | "_prefab": null, 515 | "_id": "0d6cf/srwlAVYwVTZNbZK/9", 516 | "_opacity": 255, 517 | "_color": { 518 | "__type__": "cc.Color", 519 | "r": 255, 520 | "g": 255, 521 | "b": 255, 522 | "a": 255 523 | }, 524 | "_cascadeOpacityEnabled": true, 525 | "_anchorPoint": { 526 | "__type__": "cc.Vec2", 527 | "x": 0.5, 528 | "y": 0.5 529 | }, 530 | "_contentSize": { 531 | "__type__": "cc.Size", 532 | "width": 115.61, 533 | "height": 40 534 | }, 535 | "_rotationX": 0, 536 | "_rotationY": 0, 537 | "_scaleX": 1, 538 | "_scaleY": 1, 539 | "_position": { 540 | "__type__": "cc.Vec2", 541 | "x": -39, 542 | "y": 0 543 | }, 544 | "_skewX": 0, 545 | "_skewY": 0, 546 | "_localZOrder": 0, 547 | "_globalZOrder": 0, 548 | "_opacityModifyRGB": false, 549 | "groupIndex": 0 550 | }, 551 | { 552 | "__type__": "cc.Label", 553 | "_name": "", 554 | "_objFlags": 0, 555 | "node": { 556 | "__id__": 13 557 | }, 558 | "_enabled": true, 559 | "_useOriginalSize": false, 560 | "_actualFontSize": 40, 561 | "_fontSize": 40, 562 | "_lineHeight": 40, 563 | "_enableWrapText": true, 564 | "_N$file": null, 565 | "_isSystemFontUsed": true, 566 | "_spacingX": 0, 567 | "_N$string": "Score:", 568 | "_N$horizontalAlign": 1, 569 | "_N$verticalAlign": 1, 570 | "_N$fontFamily": "Arial", 571 | "_N$overflow": 0 572 | }, 573 | { 574 | "__type__": "cc.Canvas", 575 | "_name": "", 576 | "_objFlags": 0, 577 | "node": { 578 | "__id__": 2 579 | }, 580 | "_enabled": true, 581 | "_designResolution": { 582 | "__type__": "cc.Size", 583 | "width": 960, 584 | "height": 640 585 | }, 586 | "_fitWidth": false, 587 | "_fitHeight": true 588 | }, 589 | { 590 | "__type__": "12eeb9AGnJJwaxjSMdMeqO5", 591 | "_name": "", 592 | "_objFlags": 0, 593 | "node": { 594 | "__id__": 2 595 | }, 596 | "_enabled": true 597 | } 598 | ] -------------------------------------------------------------------------------- /assets/Scene/end.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "6f72eb9e-3e42-4cbb-935a-b8a773cbd318", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /assets/Scene/game.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_rawFiles": null, 7 | "scene": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Scene", 13 | "_objFlags": 0, 14 | "_parent": null, 15 | "_children": [ 16 | { 17 | "__id__": 2 18 | } 19 | ], 20 | "_tag": -1, 21 | "_active": true, 22 | "_components": [], 23 | "_prefab": null, 24 | "_id": "228fc92a-5394-44b1-816d-e33d3ec99e64", 25 | "_opacity": 255, 26 | "_color": { 27 | "__type__": "cc.Color", 28 | "r": 255, 29 | "g": 255, 30 | "b": 255, 31 | "a": 255 32 | }, 33 | "_cascadeOpacityEnabled": true, 34 | "_anchorPoint": { 35 | "__type__": "cc.Vec2", 36 | "x": 0, 37 | "y": 0 38 | }, 39 | "_contentSize": { 40 | "__type__": "cc.Size", 41 | "width": 0, 42 | "height": 0 43 | }, 44 | "_localZOrder": 0, 45 | "_globalZOrder": 0, 46 | "_opacityModifyRGB": false, 47 | "groupIndex": 0, 48 | "autoReleaseAssets": false 49 | }, 50 | { 51 | "__type__": "cc.Node", 52 | "_name": "Canvas", 53 | "_objFlags": 0, 54 | "_parent": { 55 | "__id__": 1 56 | }, 57 | "_children": [ 58 | { 59 | "__id__": 3 60 | }, 61 | { 62 | "__id__": 5 63 | }, 64 | { 65 | "__id__": 10 66 | }, 67 | { 68 | "__id__": 12 69 | } 70 | ], 71 | "_tag": -1, 72 | "_active": true, 73 | "_components": [ 74 | { 75 | "__id__": 15 76 | }, 77 | { 78 | "__id__": 16 79 | } 80 | ], 81 | "_prefab": null, 82 | "_id": "b526bi774lL4pY4QeDmclhT", 83 | "_opacity": 255, 84 | "_color": { 85 | "__type__": "cc.Color", 86 | "r": 255, 87 | "g": 255, 88 | "b": 255, 89 | "a": 255 90 | }, 91 | "_cascadeOpacityEnabled": true, 92 | "_anchorPoint": { 93 | "__type__": "cc.Vec2", 94 | "x": 0.5, 95 | "y": 0.5 96 | }, 97 | "_contentSize": { 98 | "__type__": "cc.Size", 99 | "width": 960, 100 | "height": 640 101 | }, 102 | "_rotationX": 0, 103 | "_rotationY": 0, 104 | "_scaleX": 1, 105 | "_scaleY": 1, 106 | "_position": { 107 | "__type__": "cc.Vec2", 108 | "x": 480, 109 | "y": 320 110 | }, 111 | "_skewX": 0, 112 | "_skewY": 0, 113 | "_localZOrder": 0, 114 | "_globalZOrder": 0, 115 | "_opacityModifyRGB": false, 116 | "groupIndex": 0 117 | }, 118 | { 119 | "__type__": "cc.Node", 120 | "_name": "map", 121 | "_objFlags": 0, 122 | "_parent": { 123 | "__id__": 2 124 | }, 125 | "_children": [], 126 | "_tag": -1, 127 | "_active": true, 128 | "_components": [ 129 | { 130 | "__id__": 4 131 | } 132 | ], 133 | "_prefab": null, 134 | "_id": "6b4c4lCZGpHr5KvdGB42d3Q", 135 | "_opacity": 255, 136 | "_color": { 137 | "__type__": "cc.Color", 138 | "r": 255, 139 | "g": 255, 140 | "b": 255, 141 | "a": 255 142 | }, 143 | "_cascadeOpacityEnabled": true, 144 | "_anchorPoint": { 145 | "__type__": "cc.Vec2", 146 | "x": 0.5, 147 | "y": 0.5 148 | }, 149 | "_contentSize": { 150 | "__type__": "cc.Size", 151 | "width": 960, 152 | "height": 640 153 | }, 154 | "_rotationX": 0, 155 | "_rotationY": 0, 156 | "_scaleX": 1, 157 | "_scaleY": 1, 158 | "_position": { 159 | "__type__": "cc.Vec2", 160 | "x": 0, 161 | "y": 0 162 | }, 163 | "_skewX": 0, 164 | "_skewY": 0, 165 | "_localZOrder": 0, 166 | "_globalZOrder": 0, 167 | "_opacityModifyRGB": false, 168 | "groupIndex": 0 169 | }, 170 | { 171 | "__type__": "cc.Sprite", 172 | "_name": "", 173 | "_objFlags": 0, 174 | "node": { 175 | "__id__": 3 176 | }, 177 | "_enabled": true, 178 | "_spriteFrame": { 179 | "__uuid__": "de81ac34-2f87-427e-961c-f62f97972069" 180 | }, 181 | "_type": 0, 182 | "_sizeMode": 0, 183 | "_fillType": 0, 184 | "_fillCenter": { 185 | "__type__": "cc.Vec2", 186 | "x": 0, 187 | "y": 0 188 | }, 189 | "_fillStart": 0, 190 | "_fillRange": 0, 191 | "_isTrimmedMode": true, 192 | "_srcBlendFactor": 770, 193 | "_dstBlendFactor": 771, 194 | "_atlas": null 195 | }, 196 | { 197 | "__type__": "cc.Node", 198 | "_name": "player", 199 | "_objFlags": 0, 200 | "_parent": { 201 | "__id__": 2 202 | }, 203 | "_children": [ 204 | { 205 | "__id__": 6 206 | } 207 | ], 208 | "_tag": -1, 209 | "_active": true, 210 | "_components": [ 211 | { 212 | "__id__": 8 213 | }, 214 | { 215 | "__id__": 9 216 | } 217 | ], 218 | "_prefab": null, 219 | "_id": "d89784dRbBBzomALuWd3Wz/", 220 | "_opacity": 255, 221 | "_color": { 222 | "__type__": "cc.Color", 223 | "r": 255, 224 | "g": 255, 225 | "b": 255, 226 | "a": 255 227 | }, 228 | "_cascadeOpacityEnabled": true, 229 | "_anchorPoint": { 230 | "__type__": "cc.Vec2", 231 | "x": 0.5, 232 | "y": 0.5 233 | }, 234 | "_contentSize": { 235 | "__type__": "cc.Size", 236 | "width": 100, 237 | "height": 100 238 | }, 239 | "_rotationX": 0, 240 | "_rotationY": 0, 241 | "_scaleX": 1, 242 | "_scaleY": 1, 243 | "_position": { 244 | "__type__": "cc.Vec2", 245 | "x": 0, 246 | "y": -269 247 | }, 248 | "_skewX": 0, 249 | "_skewY": 0, 250 | "_localZOrder": 0, 251 | "_globalZOrder": 0, 252 | "_opacityModifyRGB": false, 253 | "groupIndex": 3 254 | }, 255 | { 256 | "__type__": "cc.Node", 257 | "_name": "player", 258 | "_objFlags": 0, 259 | "_parent": { 260 | "__id__": 5 261 | }, 262 | "_children": [], 263 | "_tag": -1, 264 | "_active": true, 265 | "_components": [ 266 | { 267 | "__id__": 7 268 | } 269 | ], 270 | "_prefab": null, 271 | "_id": "b7bc0YyL0lGtbIbUWvhmBmI", 272 | "_opacity": 255, 273 | "_color": { 274 | "__type__": "cc.Color", 275 | "r": 255, 276 | "g": 255, 277 | "b": 255, 278 | "a": 255 279 | }, 280 | "_cascadeOpacityEnabled": true, 281 | "_anchorPoint": { 282 | "__type__": "cc.Vec2", 283 | "x": 0.5, 284 | "y": 0.5 285 | }, 286 | "_contentSize": { 287 | "__type__": "cc.Size", 288 | "width": 94, 289 | "height": 100 290 | }, 291 | "_rotationX": 0, 292 | "_rotationY": 0, 293 | "_scaleX": 1, 294 | "_scaleY": 1, 295 | "_position": { 296 | "__type__": "cc.Vec2", 297 | "x": 0, 298 | "y": 0 299 | }, 300 | "_skewX": 0, 301 | "_skewY": 0, 302 | "_localZOrder": 0, 303 | "_globalZOrder": 0, 304 | "_opacityModifyRGB": false, 305 | "groupIndex": 0 306 | }, 307 | { 308 | "__type__": "cc.Sprite", 309 | "_name": "", 310 | "_objFlags": 0, 311 | "node": { 312 | "__id__": 6 313 | }, 314 | "_enabled": true, 315 | "_spriteFrame": { 316 | "__uuid__": "daedbd13-0720-4b6e-bdb6-8d6fa8e26dff" 317 | }, 318 | "_type": 0, 319 | "_sizeMode": 1, 320 | "_fillType": 0, 321 | "_fillCenter": { 322 | "__type__": "cc.Vec2", 323 | "x": 0, 324 | "y": 0 325 | }, 326 | "_fillStart": 0, 327 | "_fillRange": 0, 328 | "_isTrimmedMode": true, 329 | "_srcBlendFactor": 770, 330 | "_dstBlendFactor": 771, 331 | "_atlas": null 332 | }, 333 | { 334 | "__type__": "cc.Sprite", 335 | "_name": "", 336 | "_objFlags": 0, 337 | "node": { 338 | "__id__": 5 339 | }, 340 | "_enabled": true, 341 | "_spriteFrame": null, 342 | "_type": 0, 343 | "_sizeMode": 1, 344 | "_fillType": 0, 345 | "_fillCenter": { 346 | "__type__": "cc.Vec2", 347 | "x": 0, 348 | "y": 0 349 | }, 350 | "_fillStart": 0, 351 | "_fillRange": 0, 352 | "_isTrimmedMode": true, 353 | "_srcBlendFactor": 770, 354 | "_dstBlendFactor": 771, 355 | "_atlas": null 356 | }, 357 | { 358 | "__type__": "cc.BoxCollider", 359 | "_name": "", 360 | "_objFlags": 0, 361 | "node": { 362 | "__id__": 5 363 | }, 364 | "_enabled": true, 365 | "tag": 0, 366 | "_offset": { 367 | "__type__": "cc.Vec2", 368 | "x": 0, 369 | "y": 0 370 | }, 371 | "_size": { 372 | "__type__": "cc.Size", 373 | "width": 100, 374 | "height": 100 375 | } 376 | }, 377 | { 378 | "__type__": "cc.Node", 379 | "_name": "scoreLabel", 380 | "_objFlags": 0, 381 | "_parent": { 382 | "__id__": 2 383 | }, 384 | "_children": [], 385 | "_tag": -1, 386 | "_active": true, 387 | "_components": [ 388 | { 389 | "__id__": 11 390 | } 391 | ], 392 | "_prefab": null, 393 | "_id": "b6e3bMEjahOaa9NI4ncZcAa", 394 | "_opacity": 255, 395 | "_color": { 396 | "__type__": "cc.Color", 397 | "r": 255, 398 | "g": 255, 399 | "b": 255, 400 | "a": 255 401 | }, 402 | "_cascadeOpacityEnabled": true, 403 | "_anchorPoint": { 404 | "__type__": "cc.Vec2", 405 | "x": 0.5, 406 | "y": 0.5 407 | }, 408 | "_contentSize": { 409 | "__type__": "cc.Size", 410 | "width": 108.93, 411 | "height": 80 412 | }, 413 | "_rotationX": 0, 414 | "_rotationY": 0, 415 | "_scaleX": 1, 416 | "_scaleY": 1, 417 | "_position": { 418 | "__type__": "cc.Vec2", 419 | "x": -406, 420 | "y": 277 421 | }, 422 | "_skewX": 0, 423 | "_skewY": 0, 424 | "_localZOrder": 0, 425 | "_globalZOrder": 0, 426 | "_opacityModifyRGB": false, 427 | "groupIndex": 0 428 | }, 429 | { 430 | "__type__": "cc.Label", 431 | "_name": "", 432 | "_objFlags": 0, 433 | "node": { 434 | "__id__": 10 435 | }, 436 | "_enabled": true, 437 | "_useOriginalSize": false, 438 | "_actualFontSize": 40, 439 | "_fontSize": 40, 440 | "_lineHeight": 40, 441 | "_enableWrapText": true, 442 | "_N$file": null, 443 | "_isSystemFontUsed": true, 444 | "_spacingX": 0, 445 | "_N$string": "score:\n", 446 | "_N$horizontalAlign": 1, 447 | "_N$verticalAlign": 1, 448 | "_N$fontFamily": "Arial", 449 | "_N$overflow": 0 450 | }, 451 | { 452 | "__type__": "cc.Node", 453 | "_name": "score", 454 | "_objFlags": 0, 455 | "_parent": { 456 | "__id__": 2 457 | }, 458 | "_children": [], 459 | "_tag": -1, 460 | "_active": true, 461 | "_components": [ 462 | { 463 | "__id__": 13 464 | }, 465 | { 466 | "__id__": 14 467 | } 468 | ], 469 | "_prefab": null, 470 | "_id": "4f653lk6QJKvKY5bc8ZAi0J", 471 | "_opacity": 255, 472 | "_color": { 473 | "__type__": "cc.Color", 474 | "r": 10, 475 | "g": 243, 476 | "b": 47, 477 | "a": 255 478 | }, 479 | "_cascadeOpacityEnabled": true, 480 | "_anchorPoint": { 481 | "__type__": "cc.Vec2", 482 | "x": 0.5, 483 | "y": 0.5 484 | }, 485 | "_contentSize": { 486 | "__type__": "cc.Size", 487 | "width": 44.49, 488 | "height": 40 489 | }, 490 | "_rotationX": 0, 491 | "_rotationY": 0, 492 | "_scaleX": 1, 493 | "_scaleY": 1, 494 | "_position": { 495 | "__type__": "cc.Vec2", 496 | "x": -301, 497 | "y": 294 498 | }, 499 | "_skewX": 0, 500 | "_skewY": 0, 501 | "_localZOrder": 0, 502 | "_globalZOrder": 0, 503 | "_opacityModifyRGB": false, 504 | "groupIndex": 0 505 | }, 506 | { 507 | "__type__": "cc.Label", 508 | "_name": "", 509 | "_objFlags": 0, 510 | "node": { 511 | "__id__": 12 512 | }, 513 | "_enabled": true, 514 | "_useOriginalSize": false, 515 | "_actualFontSize": 40, 516 | "_fontSize": 40, 517 | "_lineHeight": 40, 518 | "_enableWrapText": true, 519 | "_N$file": null, 520 | "_isSystemFontUsed": true, 521 | "_spacingX": 0, 522 | "_N$string": "10", 523 | "_N$horizontalAlign": 1, 524 | "_N$verticalAlign": 1, 525 | "_N$fontFamily": "Arial", 526 | "_N$overflow": 0 527 | }, 528 | { 529 | "__type__": "48966S/uotK248X0NI6ndQj", 530 | "_name": "", 531 | "_objFlags": 0, 532 | "node": { 533 | "__id__": 12 534 | }, 535 | "_enabled": true, 536 | "number": 0, 537 | "myscores": { 538 | "__id__": 13 539 | } 540 | }, 541 | { 542 | "__type__": "cc.Canvas", 543 | "_name": "", 544 | "_objFlags": 0, 545 | "node": { 546 | "__id__": 2 547 | }, 548 | "_enabled": true, 549 | "_designResolution": { 550 | "__type__": "cc.Size", 551 | "width": 960, 552 | "height": 640 553 | }, 554 | "_fitWidth": false, 555 | "_fitHeight": true 556 | }, 557 | { 558 | "__type__": "75ef6DZwGRHYKbw7PSlgOBX", 559 | "_name": "", 560 | "_objFlags": 0, 561 | "node": { 562 | "__id__": 2 563 | }, 564 | "_enabled": true, 565 | "bomb": { 566 | "__uuid__": "3ec57a1a-1987-4706-a6d1-9955cadcebf3" 567 | }, 568 | "coin": { 569 | "__uuid__": "254251f8-d760-47a4-859d-22b3c63253ed" 570 | }, 571 | "playerY": -269, 572 | "leftx": -410, 573 | "rightx": 410, 574 | "movedis": 40, 575 | "runTime": 0.1 576 | } 577 | ] -------------------------------------------------------------------------------- /assets/Scene/game.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "228fc92a-5394-44b1-816d-e33d3ec99e64", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /assets/Scene/start.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_rawFiles": null, 7 | "scene": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Scene", 13 | "_objFlags": 0, 14 | "_parent": null, 15 | "_children": [ 16 | { 17 | "__id__": 2 18 | } 19 | ], 20 | "_tag": -1, 21 | "_active": true, 22 | "_components": [], 23 | "_prefab": null, 24 | "_id": "da95aac9-2fe0-46ad-a7d5-da61f0d077e7", 25 | "_opacity": 255, 26 | "_color": { 27 | "__type__": "cc.Color", 28 | "r": 255, 29 | "g": 255, 30 | "b": 255, 31 | "a": 255 32 | }, 33 | "_cascadeOpacityEnabled": true, 34 | "_anchorPoint": { 35 | "__type__": "cc.Vec2", 36 | "x": 0, 37 | "y": 0 38 | }, 39 | "_contentSize": { 40 | "__type__": "cc.Size", 41 | "width": 0, 42 | "height": 0 43 | }, 44 | "_localZOrder": 0, 45 | "_globalZOrder": 0, 46 | "_opacityModifyRGB": false, 47 | "groupIndex": 0, 48 | "autoReleaseAssets": false 49 | }, 50 | { 51 | "__type__": "cc.Node", 52 | "_name": "Canvas", 53 | "_objFlags": 0, 54 | "_parent": { 55 | "__id__": 1 56 | }, 57 | "_children": [ 58 | { 59 | "__id__": 3 60 | }, 61 | { 62 | "__id__": 5 63 | } 64 | ], 65 | "_tag": -1, 66 | "_active": true, 67 | "_components": [ 68 | { 69 | "__id__": 10 70 | }, 71 | { 72 | "__id__": 11 73 | } 74 | ], 75 | "_prefab": null, 76 | "_id": "89be2lqo3RLQ6MjaUa2HwsB", 77 | "_opacity": 255, 78 | "_color": { 79 | "__type__": "cc.Color", 80 | "r": 255, 81 | "g": 255, 82 | "b": 255, 83 | "a": 255 84 | }, 85 | "_cascadeOpacityEnabled": true, 86 | "_anchorPoint": { 87 | "__type__": "cc.Vec2", 88 | "x": 0.5, 89 | "y": 0.5 90 | }, 91 | "_contentSize": { 92 | "__type__": "cc.Size", 93 | "width": 960, 94 | "height": 640 95 | }, 96 | "_rotationX": 0, 97 | "_rotationY": 0, 98 | "_scaleX": 1, 99 | "_scaleY": 1, 100 | "_position": { 101 | "__type__": "cc.Vec2", 102 | "x": 480, 103 | "y": 320 104 | }, 105 | "_skewX": 0, 106 | "_skewY": 0, 107 | "_localZOrder": 0, 108 | "_globalZOrder": 0, 109 | "_opacityModifyRGB": false, 110 | "groupIndex": 0 111 | }, 112 | { 113 | "__type__": "cc.Node", 114 | "_name": "title", 115 | "_objFlags": 0, 116 | "_parent": { 117 | "__id__": 2 118 | }, 119 | "_children": [], 120 | "_tag": -1, 121 | "_active": true, 122 | "_components": [ 123 | { 124 | "__id__": 4 125 | } 126 | ], 127 | "_prefab": null, 128 | "_id": "bb1c6BxWg1GVa4N/pafi2cA", 129 | "_opacity": 255, 130 | "_color": { 131 | "__type__": "cc.Color", 132 | "r": 255, 133 | "g": 255, 134 | "b": 255, 135 | "a": 255 136 | }, 137 | "_cascadeOpacityEnabled": true, 138 | "_anchorPoint": { 139 | "__type__": "cc.Vec2", 140 | "x": 0.5, 141 | "y": 0.5 142 | }, 143 | "_contentSize": { 144 | "__type__": "cc.Size", 145 | "width": 135.61, 146 | "height": 40 147 | }, 148 | "_rotationX": 0, 149 | "_rotationY": 0, 150 | "_scaleX": 1, 151 | "_scaleY": 1, 152 | "_position": { 153 | "__type__": "cc.Vec2", 154 | "x": 4, 155 | "y": 103 156 | }, 157 | "_skewX": 0, 158 | "_skewY": 0, 159 | "_localZOrder": 0, 160 | "_globalZOrder": 0, 161 | "_opacityModifyRGB": false, 162 | "groupIndex": 0 163 | }, 164 | { 165 | "__type__": "cc.Label", 166 | "_name": "", 167 | "_objFlags": 0, 168 | "node": { 169 | "__id__": 3 170 | }, 171 | "_enabled": true, 172 | "_useOriginalSize": false, 173 | "_actualFontSize": 40, 174 | "_fontSize": 40, 175 | "_lineHeight": 40, 176 | "_enableWrapText": true, 177 | "_N$file": null, 178 | "_isSystemFontUsed": true, 179 | "_spacingX": 0, 180 | "_N$string": "Catch it", 181 | "_N$horizontalAlign": 1, 182 | "_N$verticalAlign": 1, 183 | "_N$fontFamily": "Arial", 184 | "_N$overflow": 0 185 | }, 186 | { 187 | "__type__": "cc.Node", 188 | "_name": "Play Button", 189 | "_objFlags": 0, 190 | "_parent": { 191 | "__id__": 2 192 | }, 193 | "_children": [ 194 | { 195 | "__id__": 6 196 | } 197 | ], 198 | "_tag": -1, 199 | "_active": true, 200 | "_components": [ 201 | { 202 | "__id__": 8 203 | }, 204 | { 205 | "__id__": 9 206 | } 207 | ], 208 | "_prefab": null, 209 | "_id": "30041dWmjBA4rJYHZAoBzOo", 210 | "_opacity": 255, 211 | "_color": { 212 | "__type__": "cc.Color", 213 | "r": 255, 214 | "g": 255, 215 | "b": 255, 216 | "a": 255 217 | }, 218 | "_cascadeOpacityEnabled": true, 219 | "_anchorPoint": { 220 | "__type__": "cc.Vec2", 221 | "x": 0.5, 222 | "y": 0.5 223 | }, 224 | "_contentSize": { 225 | "__type__": "cc.Size", 226 | "width": 100, 227 | "height": 40 228 | }, 229 | "_rotationX": 0, 230 | "_rotationY": 0, 231 | "_scaleX": 1, 232 | "_scaleY": 1, 233 | "_position": { 234 | "__type__": "cc.Vec2", 235 | "x": 0, 236 | "y": -226 237 | }, 238 | "_skewX": 0, 239 | "_skewY": 0, 240 | "_localZOrder": 0, 241 | "_globalZOrder": 0, 242 | "_opacityModifyRGB": false, 243 | "groupIndex": 0 244 | }, 245 | { 246 | "__type__": "cc.Node", 247 | "_name": "Label", 248 | "_objFlags": 0, 249 | "_parent": { 250 | "__id__": 5 251 | }, 252 | "_children": [], 253 | "_tag": -1, 254 | "_active": true, 255 | "_components": [ 256 | { 257 | "__id__": 7 258 | } 259 | ], 260 | "_prefab": null, 261 | "_id": "ac3a2fr6i9J6a3Y3UxPjx83", 262 | "_opacity": 255, 263 | "_color": { 264 | "__type__": "cc.Color", 265 | "r": 0, 266 | "g": 0, 267 | "b": 0, 268 | "a": 255 269 | }, 270 | "_cascadeOpacityEnabled": true, 271 | "_anchorPoint": { 272 | "__type__": "cc.Vec2", 273 | "x": 0.5, 274 | "y": 0.5 275 | }, 276 | "_contentSize": { 277 | "__type__": "cc.Size", 278 | "width": 100, 279 | "height": 40 280 | }, 281 | "_rotationX": 0, 282 | "_rotationY": 0, 283 | "_scaleX": 1, 284 | "_scaleY": 1, 285 | "_position": { 286 | "__type__": "cc.Vec2", 287 | "x": 0, 288 | "y": 0 289 | }, 290 | "_skewX": 0, 291 | "_skewY": 0, 292 | "_localZOrder": 0, 293 | "_globalZOrder": 0, 294 | "_opacityModifyRGB": false, 295 | "groupIndex": 0 296 | }, 297 | { 298 | "__type__": "cc.Label", 299 | "_name": "", 300 | "_objFlags": 0, 301 | "node": { 302 | "__id__": 6 303 | }, 304 | "_enabled": true, 305 | "_useOriginalSize": false, 306 | "_actualFontSize": 20, 307 | "_fontSize": 20, 308 | "_lineHeight": 40, 309 | "_enableWrapText": false, 310 | "_N$file": null, 311 | "_isSystemFontUsed": true, 312 | "_spacingX": 0, 313 | "_N$string": "PLAY", 314 | "_N$horizontalAlign": 1, 315 | "_N$verticalAlign": 1, 316 | "_N$fontFamily": "Arial", 317 | "_N$overflow": 1 318 | }, 319 | { 320 | "__type__": "cc.Sprite", 321 | "_name": "", 322 | "_objFlags": 0, 323 | "node": { 324 | "__id__": 5 325 | }, 326 | "_enabled": true, 327 | "_spriteFrame": { 328 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 329 | }, 330 | "_type": 1, 331 | "_sizeMode": 0, 332 | "_fillType": 0, 333 | "_fillCenter": { 334 | "__type__": "cc.Vec2", 335 | "x": 0, 336 | "y": 0 337 | }, 338 | "_fillStart": 0, 339 | "_fillRange": 0, 340 | "_isTrimmedMode": true, 341 | "_srcBlendFactor": 770, 342 | "_dstBlendFactor": 771, 343 | "_atlas": null 344 | }, 345 | { 346 | "__type__": "cc.Button", 347 | "_name": "", 348 | "_objFlags": 0, 349 | "node": { 350 | "__id__": 5 351 | }, 352 | "_enabled": true, 353 | "transition": 2, 354 | "pressedColor": { 355 | "__type__": "cc.Color", 356 | "r": 255, 357 | "g": 255, 358 | "b": 255, 359 | "a": 255 360 | }, 361 | "hoverColor": { 362 | "__type__": "cc.Color", 363 | "r": 255, 364 | "g": 255, 365 | "b": 255, 366 | "a": 255 367 | }, 368 | "duration": 0.1, 369 | "zoomScale": 1.2, 370 | "pressedSprite": { 371 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 372 | }, 373 | "hoverSprite": null, 374 | "clickEvents": [], 375 | "_N$interactable": true, 376 | "_N$enableAutoGrayEffect": false, 377 | "_N$normalColor": { 378 | "__type__": "cc.Color", 379 | "r": 255, 380 | "g": 255, 381 | "b": 255, 382 | "a": 255 383 | }, 384 | "_N$disabledColor": { 385 | "__type__": "cc.Color", 386 | "r": 255, 387 | "g": 255, 388 | "b": 255, 389 | "a": 255 390 | }, 391 | "_N$normalSprite": { 392 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 393 | }, 394 | "_N$disabledSprite": { 395 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 396 | }, 397 | "_N$target": { 398 | "__id__": 5 399 | } 400 | }, 401 | { 402 | "__type__": "cc.Canvas", 403 | "_name": "", 404 | "_objFlags": 0, 405 | "node": { 406 | "__id__": 2 407 | }, 408 | "_enabled": true, 409 | "_designResolution": { 410 | "__type__": "cc.Size", 411 | "width": 960, 412 | "height": 640 413 | }, 414 | "_fitWidth": false, 415 | "_fitHeight": true 416 | }, 417 | { 418 | "__type__": "89a3c8kQR5PvZ/aZMMXE041", 419 | "_name": "", 420 | "_objFlags": 0, 421 | "node": { 422 | "__id__": 2 423 | }, 424 | "_enabled": true 425 | } 426 | ] -------------------------------------------------------------------------------- /assets/Scene/start.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "da95aac9-2fe0-46ad-a7d5-da61f0d077e7", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /assets/Script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "d6919484-ea88-4e38-a91e-2e06e55211c0", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Script/bomb.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | }, 6 | 7 | // use this for initialization 8 | onLoad: function () { 9 | var manager = cc.director.getCollisionManager(); 10 | manager.enabled = true; 11 | }, 12 | 13 | /** 14 | * 当碰撞产生的时候调用 15 | * @param {Collider} other 产生碰撞的另一个碰撞组件 16 | * @param {Collider} self 产生碰撞的自身的碰撞组件 17 | */ 18 | onCollisionEnter: function (other, self) { 19 | console.log('on collision enter'); 20 | 21 | // 碰撞系统会计算出碰撞组件在世界坐标系下的相关的值,并放到 world 这个属性里面 22 | var world = self.world; 23 | 24 | // 碰撞组件的 aabb 碰撞框 25 | var aabb = world.aabb; 26 | 27 | // 上一次计算的碰撞组件的 aabb 碰撞框 28 | var preAabb = world.preAabb; 29 | 30 | // 碰撞框的世界矩阵 31 | var t = world.transform; 32 | 33 | // 以下属性为圆形碰撞组件特有属性 34 | var r = world.radius; 35 | var p = world.position; 36 | 37 | // 以下属性为 矩形 和 多边形 碰撞组件特有属性 38 | var ps = world.points; 39 | }, 40 | 41 | /** 42 | * 当碰撞产生后,碰撞结束前的情况下,每次计算碰撞结果后调用 43 | * @param {Collider} other 产生碰撞的另一个碰撞组件 44 | * @param {Collider} self 产生碰撞的自身的碰撞组件 45 | */ 46 | onCollisionStay: function (other, self) { 47 | this.node.removeFromParent(); 48 | cc.director.loadScene("end"); 49 | }, 50 | 51 | /** 52 | * 当碰撞结束后调用 53 | * @param {Collider} other 产生碰撞的另一个碰撞组件 54 | * @param {Collider} self 产生碰撞的自身的碰撞组件 55 | */ 56 | onCollisionExit: function (other, self) { 57 | } 58 | 59 | }); 60 | -------------------------------------------------------------------------------- /assets/Script/bomb.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "a6480711-29cc-4587-8ba2-380d55296179", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/bus.js: -------------------------------------------------------------------------------- 1 | module.exports= { 2 | score:0 3 | } -------------------------------------------------------------------------------- /assets/Script/bus.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "87bba65c-e9fe-4e57-91f8-30551e8e2ae7", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/coin.js: -------------------------------------------------------------------------------- 1 | var tmpscore = require("score"); 2 | var Bus = require("bus"); 3 | cc.Class({ 4 | extends: cc.Component, 5 | 6 | properties: { 7 | tscore:null, 8 | }, 9 | 10 | // use this for initialization 11 | onLoad: function () { 12 | var manager = cc.director.getCollisionManager(); 13 | manager.enabled = true; 14 | }, 15 | 16 | /** 17 | * 当碰撞产生的时候调用 18 | * @param {Collider} other 产生碰撞的另一个碰撞组件 19 | * @param {Collider} self 产生碰撞的自身的碰撞组件 20 | */ 21 | onCollisionEnter: function (other, self) { 22 | console.log('on collision enter'); 23 | 24 | // 碰撞系统会计算出碰撞组件在世界坐标系下的相关的值,并放到 world 这个属性里面 25 | var world = self.world; 26 | 27 | // 碰撞组件的 aabb 碰撞框 28 | var aabb = world.aabb; 29 | 30 | // 上一次计算的碰撞组件的 aabb 碰撞框 31 | var preAabb = world.preAabb; 32 | 33 | // 碰撞框的世界矩阵 34 | var t = world.transform; 35 | 36 | // 以下属性为圆形碰撞组件特有属性 37 | var r = world.radius; 38 | var p = world.position; 39 | 40 | // 以下属性为 矩形 和 多边形 碰撞组件特有属性 41 | var ps = world.points; 42 | }, 43 | 44 | /** 45 | * 当碰撞产生后,碰撞结束前的情况下,每次计算碰撞结果后调用 46 | * @param {Collider} other 产生碰撞的另一个碰撞组件 47 | * @param {Collider} self 产生碰撞的自身的碰撞组件 48 | */ 49 | onCollisionStay: function (other, self) { 50 | this.tscore.addScore(10); 51 | Bus.score += 10; 52 | this.node.removeFromParent(); 53 | }, 54 | 55 | /** 56 | * 当碰撞结束后调用 57 | * @param {Collider} other 产生碰撞的另一个碰撞组件 58 | * @param {Collider} self 产生碰撞的自身的碰撞组件 59 | */ 60 | onCollisionExit: function (other, self) { 61 | 62 | }, 63 | 64 | update:function(dt){ 65 | this.tscore = cc.find("Canvas/score").getComponent(tmpscore); 66 | } 67 | 68 | }); 69 | -------------------------------------------------------------------------------- /assets/Script/coin.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "5346581d-8151-42bb-97fa-56e101b7fda1", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/end.js: -------------------------------------------------------------------------------- 1 | var Bus = require("bus"); 2 | var tmpscore = require("number"); 3 | cc.Class({ 4 | extends: cc.Component, 5 | 6 | properties: { 7 | }, 8 | 9 | // use this for initialization 10 | onLoad: function () { 11 | this.node.getChildByName("retry").on('click',this.callback,this); 12 | this.tscore = cc.find("Canvas/number").getComponent(tmpscore); 13 | this.tscore.setScore(Bus.score); 14 | }, 15 | 16 | callback:function(){ 17 | cc.director.loadScene("game"); 18 | Bus.score = 0; 19 | } 20 | }); 21 | -------------------------------------------------------------------------------- /assets/Script/end.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "12eebf40-1a72-49c1-ac63-48c74c7aa3b9", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/game.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | bomb:{ 6 | default:null, 7 | type:cc.Prefab 8 | }, 9 | coin:{ 10 | default:null, 11 | type:cc.Prefab 12 | }, 13 | playerY:-269, 14 | leftx1:-420,// -960/2 + 50 ,左边墙的边缘 15 | rightx1:420,// 960/2 - 50 ,右边墙的边缘 16 | movedis:10,//每次移动距离 17 | runTime1:0.1//移动时间 18 | }, 19 | 20 | // use this for initialization 21 | onLoad: function () { 22 | this.init(); 23 | this.updateObject(); 24 | }, 25 | 26 | updateObject:function(){ 27 | this.schedule(this.updateBomb,1.5);//1s update a bomb 28 | this.schedule(this.updateCoin,1);//1s update a coin 29 | }, 30 | 31 | init: function(){ 32 | var self = this; 33 | // 添加键盘事件监听器 34 | var listener = { 35 | event: cc.EventListener.KEYBOARD, 36 | onKeyPressed: function (keyCode, event) { 37 | //37 left 39 right 65 a 68 dcc 38 | switch(keyCode){ 39 | case 37: 40 | if(self.stop("left",self.node.getChildByName("player").x)){ 41 | self.moveDistance(1); 42 | } 43 | break; 44 | case 39: 45 | if(self.stop("right",self.node.getChildByName("player").x)){ 46 | self.moveDistance(2); 47 | } 48 | break; 49 | case 65: 50 | if(self.stop("left",self.node.getChildByName("player").x)){ 51 | self.moveDistance(1); 52 | } 53 | break; 54 | case 68: 55 | if(self.stop("right",self.node.getChildByName("player").x)){ 56 | self.moveDistance(2); 57 | } 58 | break; 59 | default: 60 | break; 61 | } 62 | }, 63 | onKeyReleased: function (keyCode, event) { 64 | 65 | } 66 | } 67 | // 绑定键盘事件 68 | cc.eventManager.addListener(listener, this.node); 69 | 70 | }, 71 | //根据type决定左移还是右移 72 | moveDistance:function(type){ 73 | if(type == 1){ 74 | var tempx = this.node.getChildByName("player").x - this.movedis; 75 | var action = cc.moveTo(this.runTime1,cc.p(tempx,this.playerY)); 76 | this.node.getChildByName("player").runAction(action); 77 | }else if(type == 2){ 78 | var tempx1 = this.node.getChildByName("player").x + this.movedis; 79 | var action1 = cc.moveTo(this.runTime1,cc.p(tempx1,this.playerY)); 80 | this.node.getChildByName("player").runAction(action1); 81 | } 82 | }, 83 | 84 | //判断是否碰壁 85 | stop:function(type,distance){ 86 | if(type == "left"){ 87 | cc.log("left====="+this.leftx1) 88 | if(distance <= this.leftx1){ 89 | return false; 90 | } 91 | }else if(type == "right"){ 92 | if(distance >= this.rightx1){ 93 | return false; 94 | } 95 | } 96 | return true; 97 | }, 98 | 99 | callback: function(event) { 100 | var button = event.detail; 101 | cc.log(button); 102 | }, 103 | 104 | updateBomb:function(){ 105 | this.newBomb(); 106 | }, 107 | 108 | updateCoin:function(){ 109 | this.newCoin(); 110 | }, 111 | 112 | newBomb:function(){ 113 | // 使用给定的模板在场景中生成一个新节点 114 | var newBomb = cc.instantiate(this.bomb); 115 | // 将新增的节点添加到 Canvas 节点下面 116 | this.node.addChild(newBomb,0); 117 | // 为newBomb设置一个随机位置 118 | newBomb.setPosition(this.getNewStarPosition()); 119 | var moveto = cc.moveTo(3.8, cc.p(newBomb.getPositionX(), - this.node.height/2 - 250)); 120 | var finish = cc.moveTo(3.8, cc.p(newBomb.getPositionX(), - this.node.height/2 - 50)); 121 | var myAction = cc.sequence(moveto, finish); 122 | newBomb.runAction(myAction); 123 | }, 124 | 125 | newCoin:function(){ 126 | // 使用给定的模板在场景中生成一个新节点 127 | var newCoin = cc.instantiate(this.coin); 128 | // 将新增的节点添加到 Canvas 节点下面 129 | this.node.addChild(newCoin,0); 130 | // 为newCoin设置一个随机位置 131 | newCoin.setPosition(this.getNewStarPosition()); 132 | var moveto = cc.moveTo(5.8, cc.p(newCoin.getPositionX(), - this.node.height/2 - 250)); 133 | var finish = cc.moveTo(3.8, cc.p(newCoin.getPositionX(), - this.node.height/2 - 50)); 134 | var myAction = cc.sequence(moveto, finish); 135 | newCoin.runAction(myAction); 136 | }, 137 | //动态生成坐标 138 | getNewStarPosition: function () { 139 | // 随机得到一个物品的 y 坐标 140 | var randX = 460 - 2 * cc.random0To1() * 460; 141 | //var randX = 100; 142 | // 根据屏幕宽度,随机得到一个物品 x 坐标 143 | var randY = this.node.height/2 + 100; 144 | // 返回坐标 145 | return cc.p(randX, randY); 146 | }, 147 | 148 | }); 149 | -------------------------------------------------------------------------------- /assets/Script/game.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "75ef60d9-c064-4760-a6f0-ecf4a580e057", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/number.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | number:0, 6 | //积分更新 7 | scores: { 8 | default: null, 9 | type: cc.Label 10 | }, 11 | }, 12 | 13 | // use this for initialization 14 | onLoad: function () { 15 | // this.number = 0; 16 | }, 17 | 18 | updateScore:function(){ 19 | this.scores.string = this.number.toString(); 20 | }, 21 | 22 | setScore: function(tmpscore) 23 | { 24 | this.number += tmpscore; 25 | }, 26 | 27 | // called every frame, uncomment this function to activate update callback 28 | update: function (dt) { 29 | this.updateScore(); 30 | }, 31 | 32 | }); 33 | -------------------------------------------------------------------------------- /assets/Script/number.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "3ceadedb-2de2-4d9d-a393-d7ca259ddcc4", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/score.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | number:0, 6 | //积分更新 7 | myscores: { 8 | default: null, 9 | type: cc.Label 10 | }, 11 | }, 12 | 13 | // use this for initialization 14 | onLoad: function () { 15 | this.number = 0; 16 | this.updateScore(); 17 | }, 18 | 19 | updateScore:function(){ 20 | this.myscores.string = this.number.toString(); 21 | }, 22 | 23 | addScore: function(tmpscore) 24 | { 25 | this.number += tmpscore; 26 | }, 27 | 28 | // called every frame, uncomment this function to activate update callback 29 | update: function (dt) { 30 | this.updateScore(); 31 | }, 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /assets/Script/score.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "489664bf-ba8b-4adb-8f17-d0d23a9dd423", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Script/start.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | 6 | }, 7 | 8 | // use this for initialization 9 | onLoad: function () { 10 | this.node.getChildByName("Play Button").on('click',this.callback,this); 11 | }, 12 | 13 | callback: function(event){ 14 | // var button = event.detail; 15 | // button.enabled = false; 16 | // this.setHide(); 17 | cc.director.loadScene("game"); 18 | }, 19 | 20 | setHide: function(){ 21 | this.node.opacity = 0; 22 | } 23 | 24 | }); 25 | -------------------------------------------------------------------------------- /assets/Script/start.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "89a3cf24-411e-4fbd-9fda-64c317134e35", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/Texture.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "a725a761-b2c4-468e-b6dc-6bee2c13534d", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Texture/bomb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzou/takeit/43c271d301090a21bc5e0a6a52ee7f7dae3b4f27/assets/Texture/bomb.png -------------------------------------------------------------------------------- /assets/Texture/bomb.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "1810caeb-eb87-4014-8ade-e6f148769d9d", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "bomb": { 9 | "ver": "1.0.3", 10 | "uuid": "b0a0993c-ac65-479d-8d9d-9b8388625dd1", 11 | "rawTextureUuid": "1810caeb-eb87-4014-8ade-e6f148769d9d", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 8, 19 | "width": 64, 20 | "height": 48, 21 | "rawWidth": 64, 22 | "rawHeight": 64, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/Texture/bomb.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_rawFiles": null, 7 | "data": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Node", 13 | "_name": "bomb", 14 | "_objFlags": 0, 15 | "_parent": null, 16 | "_children": [], 17 | "_tag": -1, 18 | "_active": true, 19 | "_components": [ 20 | { 21 | "__id__": 2 22 | }, 23 | { 24 | "__id__": 3 25 | }, 26 | { 27 | "__id__": 4 28 | } 29 | ], 30 | "_prefab": { 31 | "__id__": 5 32 | }, 33 | "_id": "", 34 | "_opacity": 255, 35 | "_color": { 36 | "__type__": "cc.Color", 37 | "r": 255, 38 | "g": 255, 39 | "b": 255, 40 | "a": 255 41 | }, 42 | "_cascadeOpacityEnabled": true, 43 | "_anchorPoint": { 44 | "__type__": "cc.Vec2", 45 | "x": 0.5, 46 | "y": 0.5 47 | }, 48 | "_contentSize": { 49 | "__type__": "cc.Size", 50 | "width": 50, 51 | "height": 38 52 | }, 53 | "_rotationX": 0, 54 | "_rotationY": 0, 55 | "_scaleX": 1, 56 | "_scaleY": 1, 57 | "_position": { 58 | "__type__": "cc.Vec2", 59 | "x": 0, 60 | "y": 0 61 | }, 62 | "_skewX": 0, 63 | "_skewY": 0, 64 | "_localZOrder": 0, 65 | "_globalZOrder": 0, 66 | "_opacityModifyRGB": false, 67 | "groupIndex": 1 68 | }, 69 | { 70 | "__type__": "cc.Sprite", 71 | "_name": "", 72 | "_objFlags": 0, 73 | "node": { 74 | "__id__": 1 75 | }, 76 | "_enabled": true, 77 | "_spriteFrame": { 78 | "__uuid__": "b0a0993c-ac65-479d-8d9d-9b8388625dd1" 79 | }, 80 | "_type": 0, 81 | "_sizeMode": 0, 82 | "_fillType": 0, 83 | "_fillCenter": { 84 | "__type__": "cc.Vec2", 85 | "x": 0, 86 | "y": 0 87 | }, 88 | "_fillStart": 0, 89 | "_fillRange": 0, 90 | "_isTrimmedMode": true, 91 | "_srcBlendFactor": 770, 92 | "_dstBlendFactor": 771, 93 | "_atlas": null 94 | }, 95 | { 96 | "__type__": "a6480cRKcxFh4uiOA1VKWF5", 97 | "_name": "", 98 | "_objFlags": 0, 99 | "node": { 100 | "__id__": 1 101 | }, 102 | "_enabled": true 103 | }, 104 | { 105 | "__type__": "cc.BoxCollider", 106 | "_name": "", 107 | "_objFlags": 0, 108 | "node": { 109 | "__id__": 1 110 | }, 111 | "_enabled": true, 112 | "tag": 0, 113 | "_offset": { 114 | "__type__": "cc.Vec2", 115 | "x": 0, 116 | "y": 0 117 | }, 118 | "_size": { 119 | "__type__": "cc.Size", 120 | "width": 50, 121 | "height": 38 122 | } 123 | }, 124 | { 125 | "__type__": "cc.PrefabInfo", 126 | "root": { 127 | "__id__": 1 128 | }, 129 | "asset": { 130 | "__uuid__": "3ec57a1a-1987-4706-a6d1-9955cadcebf3" 131 | }, 132 | "fileId": "11686reDTZEm4n/MAFSz5P8", 133 | "sync": false 134 | } 135 | ] -------------------------------------------------------------------------------- /assets/Texture/bomb.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "3ec57a1a-1987-4706-a6d1-9955cadcebf3", 4 | "asyncLoadAssets": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Texture/coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzou/takeit/43c271d301090a21bc5e0a6a52ee7f7dae3b4f27/assets/Texture/coin.png -------------------------------------------------------------------------------- /assets/Texture/coin.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "0f46cd0d-a377-4aa8-888d-9a597ae6dc87", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "coin": { 9 | "ver": "1.0.3", 10 | "uuid": "f4c7d253-523d-4b74-9d2a-f49f12a8bb63", 11 | "rawTextureUuid": "0f46cd0d-a377-4aa8-888d-9a597ae6dc87", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0.5, 16 | "offsetY": -0.5, 17 | "trimX": 1, 18 | "trimY": 1, 19 | "width": 63, 20 | "height": 63, 21 | "rawWidth": 64, 22 | "rawHeight": 64, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/Texture/coin.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_rawFiles": null, 7 | "data": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Node", 13 | "_name": "coin", 14 | "_objFlags": 0, 15 | "_parent": null, 16 | "_children": [], 17 | "_tag": -1, 18 | "_active": true, 19 | "_components": [ 20 | { 21 | "__id__": 2 22 | }, 23 | { 24 | "__id__": 3 25 | }, 26 | { 27 | "__id__": 4 28 | } 29 | ], 30 | "_prefab": { 31 | "__id__": 5 32 | }, 33 | "_id": "", 34 | "_opacity": 255, 35 | "_color": { 36 | "__type__": "cc.Color", 37 | "r": 255, 38 | "g": 255, 39 | "b": 255, 40 | "a": 255 41 | }, 42 | "_cascadeOpacityEnabled": true, 43 | "_anchorPoint": { 44 | "__type__": "cc.Vec2", 45 | "x": 0.5, 46 | "y": 0.5 47 | }, 48 | "_contentSize": { 49 | "__type__": "cc.Size", 50 | "width": 40, 51 | "height": 40 52 | }, 53 | "_rotationX": 0, 54 | "_rotationY": 0, 55 | "_scaleX": 1, 56 | "_scaleY": 1, 57 | "_position": { 58 | "__type__": "cc.Vec2", 59 | "x": 0, 60 | "y": 0 61 | }, 62 | "_skewX": 0, 63 | "_skewY": 0, 64 | "_localZOrder": 0, 65 | "_globalZOrder": 0, 66 | "_opacityModifyRGB": false, 67 | "groupIndex": 2 68 | }, 69 | { 70 | "__type__": "cc.Sprite", 71 | "_name": "", 72 | "_objFlags": 0, 73 | "node": { 74 | "__id__": 1 75 | }, 76 | "_enabled": true, 77 | "_spriteFrame": { 78 | "__uuid__": "f4c7d253-523d-4b74-9d2a-f49f12a8bb63" 79 | }, 80 | "_type": 0, 81 | "_sizeMode": 0, 82 | "_fillType": 0, 83 | "_fillCenter": { 84 | "__type__": "cc.Vec2", 85 | "x": 0, 86 | "y": 0 87 | }, 88 | "_fillStart": 0, 89 | "_fillRange": 0, 90 | "_isTrimmedMode": true, 91 | "_srcBlendFactor": 770, 92 | "_dstBlendFactor": 771, 93 | "_atlas": null 94 | }, 95 | { 96 | "__type__": "53465gdgVFCu5f6VuEBt/2h", 97 | "_name": "", 98 | "_objFlags": 0, 99 | "node": { 100 | "__id__": 1 101 | }, 102 | "_enabled": true, 103 | "tscore": null 104 | }, 105 | { 106 | "__type__": "cc.BoxCollider", 107 | "_name": "", 108 | "_objFlags": 0, 109 | "node": { 110 | "__id__": 1 111 | }, 112 | "_enabled": true, 113 | "tag": 0, 114 | "_offset": { 115 | "__type__": "cc.Vec2", 116 | "x": 0, 117 | "y": 0 118 | }, 119 | "_size": { 120 | "__type__": "cc.Size", 121 | "width": 40, 122 | "height": 40 123 | } 124 | }, 125 | { 126 | "__type__": "cc.PrefabInfo", 127 | "root": { 128 | "__id__": 1 129 | }, 130 | "asset": { 131 | "__uuid__": "254251f8-d760-47a4-859d-22b3c63253ed" 132 | }, 133 | "fileId": "3cd50ui8nJLbJGl+wk3mu8u", 134 | "sync": false 135 | } 136 | ] -------------------------------------------------------------------------------- /assets/Texture/coin.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "254251f8-d760-47a4-859d-22b3c63253ed", 4 | "asyncLoadAssets": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/Texture/map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzou/takeit/43c271d301090a21bc5e0a6a52ee7f7dae3b4f27/assets/Texture/map.jpg -------------------------------------------------------------------------------- /assets/Texture/map.jpg.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "cae3b926-d00b-4e17-8647-fe9a7a215fb5", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "map": { 9 | "ver": "1.0.3", 10 | "uuid": "de81ac34-2f87-427e-961c-f62f97972069", 11 | "rawTextureUuid": "cae3b926-d00b-4e17-8647-fe9a7a215fb5", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 2500, 20 | "height": 640, 21 | "rawWidth": 2500, 22 | "rawHeight": 640, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/Texture/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzou/takeit/43c271d301090a21bc5e0a6a52ee7f7dae3b4f27/assets/Texture/player.png -------------------------------------------------------------------------------- /assets/Texture/player.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "2580575d-9952-4a2a-ab03-86181d1f3f37", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "player": { 9 | "ver": "1.0.3", 10 | "uuid": "daedbd13-0720-4b6e-bdb6-8d6fa8e26dff", 11 | "rawTextureUuid": "2580575d-9952-4a2a-ab03-86181d1f3f37", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 3, 18 | "trimY": 0, 19 | "width": 94, 20 | "height": 100, 21 | "rawWidth": 100, 22 | "rawHeight": 100, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /capture/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzou/takeit/43c271d301090a21bc5e0a6a52ee7f7dae3b4f27/capture/1.png -------------------------------------------------------------------------------- /capture/out.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzou/takeit/43c271d301090a21bc5e0a6a52ee7f7dae3b4f27/capture/out.gif -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "experimentalDecorators": true 6 | }, 7 | "exclude": [ 8 | "node_modules", 9 | ".vscode", 10 | "library", 11 | "local", 12 | "settings", 13 | "temp" 14 | ] 15 | } -------------------------------------------------------------------------------- /project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos-creator-js", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /settings/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "appKey": "", 3 | "appSecret": "", 4 | "excludeScenes": [], 5 | "includeAnySDK": false, 6 | "includeSDKBox": false, 7 | "includeSdk": [ 8 | "anysdk" 9 | ], 10 | "inlineSpriteFrames": true, 11 | "inlineSpriteFrames_native": true, 12 | "mergeStartScene": false, 13 | "oauthLoginServer": "", 14 | "optimizeHotUpdate": false, 15 | "orientation": { 16 | "landscapeLeft": true, 17 | "landscapeRight": true, 18 | "portrait": false, 19 | "upsideDown": false 20 | }, 21 | "packageName": "org.cocos2d.takeIt", 22 | "privateKey": "", 23 | "renderMode": "0", 24 | "startScene": "da95aac9-2fe0-46ad-a7d5-da61f0d077e7", 25 | "title": "takeIt", 26 | "webOrientation": "auto" 27 | } -------------------------------------------------------------------------------- /settings/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "collision-matrix": [ 3 | [ 4 | false, 5 | false, 6 | false, 7 | false 8 | ], 9 | [ 10 | false, 11 | false, 12 | false, 13 | true 14 | ], 15 | [ 16 | false, 17 | false, 18 | false, 19 | true 20 | ], 21 | [ 22 | false, 23 | true, 24 | true, 25 | false 26 | ] 27 | ], 28 | "design-resolution-height": 640, 29 | "design-resolution-width": 960, 30 | "excluded-modules": [], 31 | "fit-height": true, 32 | "fit-width": false, 33 | "group-list": [ 34 | "default", 35 | "bomb", 36 | "coin", 37 | "player" 38 | ], 39 | "simulator-orientation": false, 40 | "simulator-resolution": { 41 | "height": 640, 42 | "width": 960 43 | }, 44 | "start-scene": "da95aac9-2fe0-46ad-a7d5-da61f0d077e7", 45 | "use-customize-simulator": false, 46 | "use-project-simulator-setting": false 47 | } --------------------------------------------------------------------------------