├── project.json ├── assets ├── fonts │ ├── b.ttf │ ├── b2.ttf │ ├── b.ttf.meta │ └── b2.ttf.meta ├── textures │ ├── ball.png │ ├── bg.png │ ├── info.png │ ├── top.png │ ├── brick0.png │ ├── brick1.png │ ├── brick2.png │ ├── brick3.png │ ├── button.png │ ├── paddle.png │ ├── badBall.png │ ├── bg_main.png │ ├── bg_over.png │ ├── button1.png │ ├── button_over.png │ ├── button_play.png │ ├── button_retry.png │ ├── ball.png.meta │ ├── bg.png.meta │ ├── top.png.meta │ ├── brick0.png.meta │ ├── brick1.png.meta │ ├── brick2.png.meta │ ├── brick3.png.meta │ ├── badBall.png.meta │ ├── bg_main.png.meta │ ├── bg_over.png.meta │ ├── button.png.meta │ ├── button1.png.meta │ ├── info.png.meta │ ├── paddle.png.meta │ ├── button_play.png.meta │ ├── button_over.png.meta │ └── button_retry.png.meta ├── fonts.meta ├── prefabs.meta ├── scenes.meta ├── scripts.meta ├── textures.meta ├── scripts │ ├── model.meta │ ├── view.meta │ ├── controller.meta │ ├── view │ │ ├── Ball.js.meta │ │ ├── Paddle.js.meta │ │ ├── BrickLayout.js.meta │ │ ├── GameView.js.meta │ │ ├── OverPanel.js.meta │ │ ├── GameView.js │ │ ├── Paddle.js │ │ ├── OverPanel.js │ │ ├── BrickLayout.js │ │ └── Ball.js │ ├── model │ │ ├── GameModel.js.meta │ │ └── GameModel.js │ └── controller │ │ ├── GameCtl.js.meta │ │ └── GameCtl.js ├── prefabs │ ├── Brick.prefab.meta │ └── Brick.prefab └── scenes │ ├── game.fire.meta │ └── game.fire ├── README.md ├── jsconfig.json ├── settings ├── project.json └── builder.json └── .gitignore /project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos-creator-js", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /assets/fonts/b.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/fonts/b.ttf -------------------------------------------------------------------------------- /assets/fonts/b2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/fonts/b2.ttf -------------------------------------------------------------------------------- /assets/textures/ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/ball.png -------------------------------------------------------------------------------- /assets/textures/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/bg.png -------------------------------------------------------------------------------- /assets/textures/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/info.png -------------------------------------------------------------------------------- /assets/textures/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/top.png -------------------------------------------------------------------------------- /assets/textures/brick0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/brick0.png -------------------------------------------------------------------------------- /assets/textures/brick1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/brick1.png -------------------------------------------------------------------------------- /assets/textures/brick2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/brick2.png -------------------------------------------------------------------------------- /assets/textures/brick3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/brick3.png -------------------------------------------------------------------------------- /assets/textures/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/button.png -------------------------------------------------------------------------------- /assets/textures/paddle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/paddle.png -------------------------------------------------------------------------------- /assets/textures/badBall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/badBall.png -------------------------------------------------------------------------------- /assets/textures/bg_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/bg_main.png -------------------------------------------------------------------------------- /assets/textures/bg_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/bg_over.png -------------------------------------------------------------------------------- /assets/textures/button1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/button1.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # brick-breaker-master 2 | Cocos Creator 1.5 打砖块 3 | 教程地址:http://blog.csdn.net/potato47/article/details/73197021 4 | -------------------------------------------------------------------------------- /assets/fonts/b.ttf.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "f860c958-1c71-4ae2-b501-649a28596a5a", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/fonts/b2.ttf.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "57b87105-6460-4f4d-86ac-09ffbd137949", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/textures/button_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/button_over.png -------------------------------------------------------------------------------- /assets/textures/button_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/button_play.png -------------------------------------------------------------------------------- /assets/textures/button_retry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/potato47/brick-breaker-master/HEAD/assets/textures/button_retry.png -------------------------------------------------------------------------------- /assets/fonts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "6d11133d-b702-474b-8b34-25beafd19f23", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/prefabs.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "6b9a4a4f-553f-4eeb-85a1-0da8f183631d", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/scenes.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "21b744bb-e2a0-439f-8959-d1cf1492d2d5", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/scripts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "67b57183-2cb0-4ab3-92e2-610669d275c2", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/textures.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "781eefd2-30d7-4a45-8baa-80a0261353db", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/scripts/model.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "4edadf36-9140-4808-8b00-bbfc6d643911", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/scripts/view.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "2ad79e41-5421-437f-8f76-a4ca4ebf5cdc", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/scripts/controller.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "6afeca96-9d19-4d0f-8104-c71f315af186", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/prefabs/Brick.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "edbd9d67-e2ab-4be8-80b8-5afb06361626", 4 | "asyncLoadAssets": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/scenes/game.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "2ef97242-9501-4637-ab4d-d2e235f1f114", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /assets/scripts/view/Ball.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.3", 3 | "uuid": "9b28061b-16e6-49bf-840f-18f2fc7bc8af", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/scripts/view/Paddle.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.3", 3 | "uuid": "4dc82735-a8ef-4a6d-906c-31919b1e5315", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/scripts/model/GameModel.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.3", 3 | "uuid": "ac11f87f-4971-45cd-9033-279edb99cbd8", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/scripts/view/BrickLayout.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.3", 3 | "uuid": "62398152-309b-4727-9e63-992a2a7f8585", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/scripts/view/GameView.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.3", 3 | "uuid": "e4735516-de51-4f32-85b4-acadb6a1bb06", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/scripts/view/OverPanel.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.3", 3 | "uuid": "60425cd1-210e-4b34-867a-2a6679a7f2cd", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/scripts/controller/GameCtl.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.3", 3 | "uuid": "a3373d3c-bb1c-49bd-aeef-87c1b4eaaed9", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /assets/scripts/view/GameView.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | scoreLabel:cc.Label, 6 | }, 7 | 8 | init(gameCtl){ 9 | this.gameCtl = gameCtl; 10 | this.scoreLabel.string = '0'; 11 | }, 12 | 13 | updateScore(score){ 14 | this.scoreLabel.string = score; 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /assets/scripts/model/GameModel.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | score:0, 6 | bricksNumber:0, 7 | }, 8 | 9 | init(){ 10 | this.score = 0; 11 | this.bricksNumber = 50; 12 | }, 13 | 14 | addScore(score){ 15 | this.score += score; 16 | }, 17 | 18 | minusBrick(n){ 19 | this.bricksNumber -= n; 20 | }, 21 | 22 | }); 23 | -------------------------------------------------------------------------------- /assets/scripts/view/Paddle.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | onLoad: function () { 5 | this.node.parent.on("touchmove", (event) => { 6 | //将世界坐标转化为本地坐标 7 | let touchPoint = this.node.parent.convertToNodeSpace(event.getLocation()); 8 | this.node.x = touchPoint.x; 9 | }); 10 | }, 11 | 12 | init(){ 13 | this.node.x = 360; 14 | } 15 | 16 | }); -------------------------------------------------------------------------------- /settings/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "start-scene": "current", 3 | "group-list": [ 4 | "default" 5 | ], 6 | "collision-matrix": [ 7 | [ 8 | true 9 | ] 10 | ], 11 | "excluded-modules": [], 12 | "design-resolution-width": 960, 13 | "design-resolution-height": 640, 14 | "fit-width": false, 15 | "fit-height": true, 16 | "use-project-simulator-setting": false, 17 | "simulator-orientation": false, 18 | "use-customize-simulator": false, 19 | "simulator-resolution": { 20 | "width": 960, 21 | "height": 640 22 | } 23 | } -------------------------------------------------------------------------------- /settings/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "appKey": "", 3 | "appSecret": "", 4 | "excludeScenes": [], 5 | "includeAnySDK": false, 6 | "includeSdk": [ 7 | "anysdk" 8 | ], 9 | "inlineSpriteFrames": true, 10 | "inlineSpriteFrames_native": true, 11 | "mergeStartScene": false, 12 | "oauthLoginServer": "", 13 | "orientation": { 14 | "landscapeLeft": false, 15 | "landscapeRight": false, 16 | "portrait": true, 17 | "upsideDown": false 18 | }, 19 | "packageName": "org.cocos2d.brickbreakermaster", 20 | "privateKey": "", 21 | "renderMode": "0", 22 | "startScene": "2ef97242-9501-4637-ab4d-d2e235f1f114", 23 | "title": "BrickBreaker", 24 | "webOrientation": "auto" 25 | } -------------------------------------------------------------------------------- /assets/scripts/view/OverPanel.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | resultLabel:cc.Label, 6 | scoreLabel:cc.Label, 7 | }, 8 | 9 | // use this for initialization 10 | onLoad: function () { 11 | 12 | }, 13 | 14 | init(gameCtl){ 15 | this.gameCtl = gameCtl; 16 | this.node.active = false; 17 | }, 18 | 19 | show(score,isWin){ 20 | this.node.active = true; 21 | if(isWin){ 22 | this.resultLabel.string = 'YOU WIN!'; 23 | }else{ 24 | this.resultLabel.string = 'YOU LOSE!'; 25 | } 26 | this.scoreLabel.string = score+''; 27 | }, 28 | 29 | onBtnRestart(){ 30 | this.gameCtl.startGame(); 31 | } 32 | }); 33 | -------------------------------------------------------------------------------- /assets/scripts/view/BrickLayout.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | padding: 0, 6 | spacing: 0, 7 | cols: 0, 8 | brickPrefab: cc.Prefab, 9 | bricksNumber: 0, 10 | }, 11 | 12 | init(bricksNumber) { 13 | this.node.removeAllChildren(); 14 | this.bricksNumber = bricksNumber; 15 | for (let i = 0; i < this.bricksNumber; i++) { 16 | let brickNode = cc.instantiate(this.brickPrefab); 17 | brickNode.parent = this.node; 18 | brickNode.x = this.padding + (i % this.cols) * (brickNode.width + this.spacing) + brickNode.width / 2; 19 | brickNode.y = -this.padding - Math.floor(i / this.cols) * (brickNode.height + this.spacing) - brickNode.height / 2; 20 | } 21 | } 22 | }); -------------------------------------------------------------------------------- /assets/textures/ball.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "8f051a98-6f3e-4b85-9892-34969dd0a738", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "ball": { 9 | "ver": "1.0.3", 10 | "uuid": "32b27e88-48ee-4c2a-b8e2-bcf59d2ce34b", 11 | "rawTextureUuid": "8f051a98-6f3e-4b85-9892-34969dd0a738", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 34, 20 | "height": 33, 21 | "rawWidth": 34, 22 | "rawHeight": 33, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/bg.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "3a64b362-3e8e-4714-a144-4fbbb8513e97", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "bg": { 9 | "ver": "1.0.3", 10 | "uuid": "0abec7f8-407a-4fc5-9e9c-efd2d0f0c664", 11 | "rawTextureUuid": "3a64b362-3e8e-4714-a144-4fbbb8513e97", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 600, 20 | "height": 960, 21 | "rawWidth": 600, 22 | "rawHeight": 960, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/top.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "8657022f-6a09-426a-a174-faa70a177e19", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "top": { 9 | "ver": "1.0.3", 10 | "uuid": "fa7a03bc-d641-4040-a98c-c3225715279f", 11 | "rawTextureUuid": "8657022f-6a09-426a-a174-faa70a177e19", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 600, 20 | "height": 81, 21 | "rawWidth": 600, 22 | "rawHeight": 81, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/brick0.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "6e426803-f08c-47b9-8934-9faa791f0ed7", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "brick0": { 9 | "ver": "1.0.3", 10 | "uuid": "ec774697-1167-4aee-ba7e-095b5ccb57b1", 11 | "rawTextureUuid": "6e426803-f08c-47b9-8934-9faa791f0ed7", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 56, 20 | "height": 28, 21 | "rawWidth": 56, 22 | "rawHeight": 28, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/brick1.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "50ba8be8-c078-466a-8de7-abaae375ffd5", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "brick1": { 9 | "ver": "1.0.3", 10 | "uuid": "c2d71564-14dc-41b8-b22b-d2b397cd41d0", 11 | "rawTextureUuid": "50ba8be8-c078-466a-8de7-abaae375ffd5", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 56, 20 | "height": 29, 21 | "rawWidth": 56, 22 | "rawHeight": 29, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/brick2.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "8d6a82a8-1a1e-425f-aa54-a7ff05ca840d", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "brick2": { 9 | "ver": "1.0.3", 10 | "uuid": "ebe47ea2-7106-4f06-9992-a1766f6bcf05", 11 | "rawTextureUuid": "8d6a82a8-1a1e-425f-aa54-a7ff05ca840d", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 56, 20 | "height": 28, 21 | "rawWidth": 56, 22 | "rawHeight": 28, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/brick3.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "94bc625e-af28-4834-bc40-ca51ebd2c9d3", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "brick3": { 9 | "ver": "1.0.3", 10 | "uuid": "759c8894-bfad-4642-8eac-c3fe48585224", 11 | "rawTextureUuid": "94bc625e-af28-4834-bc40-ca51ebd2c9d3", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 56, 20 | "height": 29, 21 | "rawWidth": 56, 22 | "rawHeight": 29, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/badBall.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "14d46fa4-410a-47c4-b1d8-c69abc36f2d4", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "badBall": { 9 | "ver": "1.0.3", 10 | "uuid": "a2be0a1e-9d57-43ef-8e78-ac007850a9ed", 11 | "rawTextureUuid": "14d46fa4-410a-47c4-b1d8-c69abc36f2d4", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 34, 20 | "height": 34, 21 | "rawWidth": 34, 22 | "rawHeight": 34, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/bg_main.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "15a6ae64-c9ef-4a59-91b4-9b9da7edf0f9", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "bg_main": { 9 | "ver": "1.0.3", 10 | "uuid": "f94f8733-12ab-4751-9584-a4b0692a884d", 11 | "rawTextureUuid": "15a6ae64-c9ef-4a59-91b4-9b9da7edf0f9", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 600, 20 | "height": 960, 21 | "rawWidth": 600, 22 | "rawHeight": 960, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/bg_over.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "31f527a8-eb47-4a17-b862-8240e60e9936", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "bg_over": { 9 | "ver": "1.0.3", 10 | "uuid": "cff053fb-09de-46dd-8d15-f49602bb5c26", 11 | "rawTextureUuid": "31f527a8-eb47-4a17-b862-8240e60e9936", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 600, 20 | "height": 960, 21 | "rawWidth": 600, 22 | "rawHeight": 960, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/button.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "8d02a794-0677-46ff-bf7b-312803ba5c04", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "button": { 9 | "ver": "1.0.3", 10 | "uuid": "40131b5f-6ecd-45bf-862e-6d0c3b524f82", 11 | "rawTextureUuid": "8d02a794-0677-46ff-bf7b-312803ba5c04", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": -0.5, 17 | "trimX": 0, 18 | "trimY": 1, 19 | "width": 200, 20 | "height": 63, 21 | "rawWidth": 200, 22 | "rawHeight": 64, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/button1.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "4fd40882-60b4-4ddf-aad1-1cb049a1767d", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "button1": { 9 | "ver": "1.0.3", 10 | "uuid": "23efb89c-ffbe-4c48-9773-aaac5dcddf01", 11 | "rawTextureUuid": "4fd40882-60b4-4ddf-aad1-1cb049a1767d", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 854, 20 | "height": 340, 21 | "rawWidth": 854, 22 | "rawHeight": 340, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/info.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "528ef3e4-0c28-45bb-8366-dcc4b636e5b8", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "info": { 9 | "ver": "1.0.3", 10 | "uuid": "30bc12e4-f3ec-4f92-bb8e-52a5ded98165", 11 | "rawTextureUuid": "528ef3e4-0c28-45bb-8366-dcc4b636e5b8", 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": 399, 20 | "height": 299, 21 | "rawWidth": 400, 22 | "rawHeight": 300, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/paddle.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "8cfd58ca-691d-42ca-9ace-b50dc2429fab", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "paddle": { 9 | "ver": "1.0.3", 10 | "uuid": "95332c02-5842-46a2-9dab-e40b8172c27c", 11 | "rawTextureUuid": "8cfd58ca-691d-42ca-9ace-b50dc2429fab", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 177, 20 | "height": 24, 21 | "rawWidth": 177, 22 | "rawHeight": 24, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/button_play.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "e3c1b51b-f807-4075-89b6-06423ef37434", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "button_play": { 9 | "ver": "1.0.3", 10 | "uuid": "59922add-e132-4300-805f-97e74f7500d1", 11 | "rawTextureUuid": "e3c1b51b-f807-4075-89b6-06423ef37434", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 50, 20 | "height": 50, 21 | "rawWidth": 50, 22 | "rawHeight": 50, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/button_over.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "fb60dd79-4532-4e81-9399-701f995825cb", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "button_over": { 9 | "ver": "1.0.3", 10 | "uuid": "7dce5845-c3bc-4db3-b202-5105ed3bf431", 11 | "rawTextureUuid": "fb60dd79-4532-4e81-9399-701f995825cb", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 822, 20 | "height": 366, 21 | "rawWidth": 822, 22 | "rawHeight": 366, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/textures/button_retry.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "8505f69c-e58b-438b-a10b-69fe3267df1f", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "button_retry": { 9 | "ver": "1.0.3", 10 | "uuid": "4aed39f5-4ff9-49ed-817d-ea9c3d246095", 11 | "rawTextureUuid": "8505f69c-e58b-438b-a10b-69fe3267df1f", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": -0.5, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 1, 19 | "width": 49, 20 | "height": 48, 21 | "rawWidth": 50, 22 | "rawHeight": 50, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /assets/scripts/view/Ball.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | 6 | }, 7 | 8 | init(gameCtl) { 9 | this.gameCtl = gameCtl; 10 | this.node.position = cc.v2(360,270);//初始化位置 11 | this.getComponent(cc.RigidBody).linearVelocity = cc.v2(800,800);//初始化速度 12 | }, 13 | 14 | onBeginContact(contact, self, other) { 15 | switch (other.tag) { 16 | case 1://球碰到砖块 17 | this.gameCtl.onBallContactBrick(self.node, other.node); 18 | break; 19 | case 2://球碰到地面 20 | this.gameCtl.onBallContactGround(self.node, other.node); 21 | break; 22 | case 3://球碰到托盘 23 | this.gameCtl.onBallContactPaddle(self.node, other.node); 24 | break; 25 | case 4://球碰到墙 26 | this.gameCtl.onBallContactWall(self.node, other.node); 27 | break; 28 | } 29 | }, 30 | }); -------------------------------------------------------------------------------- /.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/ -------------------------------------------------------------------------------- /assets/scripts/controller/GameCtl.js: -------------------------------------------------------------------------------- 1 | const GameModel = require('GameModel'); 2 | cc.Class({ 3 | extends: cc.Component, 4 | 5 | properties: { 6 | gameView: require('GameView'), 7 | ball: require('Ball'), 8 | paddle: require('Paddle'), 9 | brickLayout: require('BrickLayout'), 10 | overPanel: require('OverPanel'), 11 | }, 12 | 13 | // use this for initialization 14 | onLoad: function () { 15 | //安卓返回键退出 16 | cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, (event) => { 17 | if (event.keyCode === cc.KEY.back) { 18 | cc.director.end(); 19 | } 20 | }); 21 | this.physicsManager = cc.director.getPhysicsManager(); 22 | this.gameModel = new GameModel(); 23 | this.startGame(); 24 | 25 | }, 26 | 27 | //this.physicsManager.debugDrawFlags =0; 28 | // cc.PhysicsManager.DrawBits.e_aabbBit | 29 | // cc.PhysicsManager.DrawBits.e_pairBit | 30 | // cc.PhysicsManager.DrawBits.e_centerOfMassBit | 31 | // cc.PhysicsManager.DrawBits.e_jointBit | 32 | // cc.PhysicsManager.DrawBits.e_shapeBit 33 | // ; 34 | 35 | init() { 36 | this.physicsManager.enabled = true; 37 | this.gameModel.init(); 38 | 39 | this.gameView.init(this); 40 | this.ball.init(this); 41 | this.paddle.init(); 42 | this.brickLayout.init(this.gameModel.bricksNumber); 43 | this.overPanel.init(this); 44 | 45 | }, 46 | 47 | startGame() { 48 | this.init(); 49 | }, 50 | 51 | pauseGame() { 52 | this.physicsManager.enabled = false; 53 | }, 54 | 55 | resumeGame() { 56 | this.physicsManager.enabled = true; 57 | }, 58 | 59 | stopGame() { 60 | this.physicsManager.enabled = false; 61 | this.overPanel.show(this.gameModel.score, this.gameModel.bricksNumber === 0); 62 | }, 63 | 64 | onBallContactBrick(ballNode, brickNode) { 65 | brickNode.parent = null; 66 | this.gameModel.addScore(1); 67 | this.gameModel.minusBrick(1); 68 | this.gameView.updateScore(this.gameModel.score); 69 | if (this.gameModel.bricksNumber <= 0) { 70 | this.stopGame(); 71 | } 72 | }, 73 | 74 | onBallContactGround(ballNode, groundNode) { 75 | this.stopGame(); 76 | }, 77 | 78 | onBallContactPaddle(ballNode, paddleNode) { 79 | 80 | }, 81 | 82 | onBallContactWall(ballNode, brickNode) { 83 | 84 | }, 85 | 86 | onDestroy() { 87 | this.physicsManager.enabled = false; 88 | } 89 | 90 | }); -------------------------------------------------------------------------------- /assets/prefabs/Brick.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": "Brick", 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": 56, 51 | "height": 28 52 | }, 53 | "_rotationX": 0, 54 | "_rotationY": 0, 55 | "_scaleX": 1, 56 | "_scaleY": 1, 57 | "_position": { 58 | "__type__": "cc.Vec2", 59 | "x": 294, 60 | "y": -57 61 | }, 62 | "_skewX": 0, 63 | "_skewY": 0, 64 | "_localZOrder": 0, 65 | "_globalZOrder": 0, 66 | "_opacityModifyRGB": false, 67 | "groupIndex": 0 68 | }, 69 | { 70 | "__type__": "cc.Sprite", 71 | "_name": "", 72 | "_objFlags": 0, 73 | "node": { 74 | "__id__": 1 75 | }, 76 | "_enabled": true, 77 | "_spriteFrame": { 78 | "__uuid__": "ebe47ea2-7106-4f06-9992-a1766f6bcf05" 79 | }, 80 | "_type": 0, 81 | "_sizeMode": 1, 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__": "cc.RigidBody", 97 | "_name": "", 98 | "_objFlags": 0, 99 | "node": { 100 | "__id__": 1 101 | }, 102 | "_enabled": true, 103 | "_type": 0, 104 | "_allowSleep": true, 105 | "_gravityScale": 1, 106 | "_linearDamping": 0, 107 | "_angularDamping": 0, 108 | "_linearVelocity": { 109 | "__type__": "cc.Vec2", 110 | "x": 0, 111 | "y": 0 112 | }, 113 | "_angularVelocity": 0, 114 | "_fixedRotation": false, 115 | "enabledContactListener": false, 116 | "bullet": false 117 | }, 118 | { 119 | "__type__": "cc.PhysicsBoxCollider", 120 | "_name": "", 121 | "_objFlags": 0, 122 | "node": { 123 | "__id__": 1 124 | }, 125 | "_enabled": true, 126 | "tag": 1, 127 | "_offset": { 128 | "__type__": "cc.Vec2", 129 | "x": 0, 130 | "y": 0 131 | }, 132 | "_size": { 133 | "__type__": "cc.Size", 134 | "width": 56, 135 | "height": 28 136 | }, 137 | "_density": 1, 138 | "_sensor": false, 139 | "_friction": 0.2, 140 | "_restitution": 0 141 | }, 142 | { 143 | "__type__": "cc.PrefabInfo", 144 | "root": { 145 | "__id__": 1 146 | }, 147 | "asset": { 148 | "__uuid__": "edbd9d67-e2ab-4be8-80b8-5afb06361626" 149 | }, 150 | "fileId": "fdf4de/xVZEl6biJXUyhzBe", 151 | "sync": false 152 | } 153 | ] -------------------------------------------------------------------------------- /assets/scenes/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 | "__id__": 16 21 | }, 22 | { 23 | "__id__": 39 24 | } 25 | ], 26 | "_tag": -1, 27 | "_active": true, 28 | "_components": [], 29 | "_prefab": null, 30 | "_id": "2ef97242-9501-4637-ab4d-d2e235f1f114", 31 | "_opacity": 255, 32 | "_color": { 33 | "__type__": "cc.Color", 34 | "r": 255, 35 | "g": 255, 36 | "b": 255, 37 | "a": 255 38 | }, 39 | "_cascadeOpacityEnabled": true, 40 | "_anchorPoint": { 41 | "__type__": "cc.Vec2", 42 | "x": 0, 43 | "y": 0 44 | }, 45 | "_contentSize": { 46 | "__type__": "cc.Size", 47 | "width": 0, 48 | "height": 0 49 | }, 50 | "_localZOrder": 0, 51 | "_globalZOrder": 0, 52 | "_opacityModifyRGB": false, 53 | "groupIndex": 0, 54 | "autoReleaseAssets": false 55 | }, 56 | { 57 | "__type__": "cc.Node", 58 | "_name": "Canvas", 59 | "_objFlags": 0, 60 | "_parent": { 61 | "__id__": 1 62 | }, 63 | "_children": [ 64 | { 65 | "__id__": 3 66 | }, 67 | { 68 | "__id__": 6 69 | } 70 | ], 71 | "_tag": -1, 72 | "_active": true, 73 | "_components": [ 74 | { 75 | "__id__": 11 76 | }, 77 | { 78 | "__id__": 12 79 | }, 80 | { 81 | "__id__": 13 82 | } 83 | ], 84 | "_prefab": null, 85 | "_id": "9fb39NGcOpF/or/pWJp+gH8", 86 | "_opacity": 255, 87 | "_color": { 88 | "__type__": "cc.Color", 89 | "r": 255, 90 | "g": 255, 91 | "b": 255, 92 | "a": 255 93 | }, 94 | "_cascadeOpacityEnabled": true, 95 | "_anchorPoint": { 96 | "__type__": "cc.Vec2", 97 | "x": 0.5, 98 | "y": 0.5 99 | }, 100 | "_contentSize": { 101 | "__type__": "cc.Size", 102 | "width": 720, 103 | "height": 1280 104 | }, 105 | "_rotationX": 0, 106 | "_rotationY": 0, 107 | "_scaleX": 1, 108 | "_scaleY": 1, 109 | "_position": { 110 | "__type__": "cc.Vec2", 111 | "x": 360, 112 | "y": 640 113 | }, 114 | "_skewX": 0, 115 | "_skewY": 0, 116 | "_localZOrder": 0, 117 | "_globalZOrder": 0, 118 | "_opacityModifyRGB": false, 119 | "groupIndex": 0 120 | }, 121 | { 122 | "__type__": "cc.Node", 123 | "_name": "bg", 124 | "_objFlags": 0, 125 | "_parent": { 126 | "__id__": 2 127 | }, 128 | "_children": [], 129 | "_tag": -1, 130 | "_active": true, 131 | "_components": [ 132 | { 133 | "__id__": 4 134 | }, 135 | { 136 | "__id__": 5 137 | } 138 | ], 139 | "_prefab": null, 140 | "_id": "f4effeGFlBI/J/5u/7LCw0l", 141 | "_opacity": 255, 142 | "_color": { 143 | "__type__": "cc.Color", 144 | "r": 255, 145 | "g": 255, 146 | "b": 255, 147 | "a": 255 148 | }, 149 | "_cascadeOpacityEnabled": true, 150 | "_anchorPoint": { 151 | "__type__": "cc.Vec2", 152 | "x": 0.5, 153 | "y": 0.5 154 | }, 155 | "_contentSize": { 156 | "__type__": "cc.Size", 157 | "width": 720, 158 | "height": 1280 159 | }, 160 | "_rotationX": 0, 161 | "_rotationY": 0, 162 | "_scaleX": 1, 163 | "_scaleY": 1, 164 | "_position": { 165 | "__type__": "cc.Vec2", 166 | "x": 0, 167 | "y": 0 168 | }, 169 | "_skewX": 0, 170 | "_skewY": 0, 171 | "_localZOrder": 0, 172 | "_globalZOrder": 0, 173 | "_opacityModifyRGB": false, 174 | "groupIndex": 0 175 | }, 176 | { 177 | "__type__": "cc.Sprite", 178 | "_name": "", 179 | "_objFlags": 0, 180 | "node": { 181 | "__id__": 3 182 | }, 183 | "_enabled": true, 184 | "_spriteFrame": { 185 | "__uuid__": "0abec7f8-407a-4fc5-9e9c-efd2d0f0c664" 186 | }, 187 | "_type": 0, 188 | "_sizeMode": 0, 189 | "_fillType": 0, 190 | "_fillCenter": { 191 | "__type__": "cc.Vec2", 192 | "x": 0, 193 | "y": 0 194 | }, 195 | "_fillStart": 0, 196 | "_fillRange": 0, 197 | "_isTrimmedMode": true, 198 | "_srcBlendFactor": 770, 199 | "_dstBlendFactor": 771, 200 | "_atlas": null 201 | }, 202 | { 203 | "__type__": "cc.Widget", 204 | "_name": "", 205 | "_objFlags": 0, 206 | "node": { 207 | "__id__": 3 208 | }, 209 | "_enabled": true, 210 | "isAlignOnce": true, 211 | "_target": null, 212 | "_alignFlags": 45, 213 | "_left": 0, 214 | "_right": 0, 215 | "_top": 0, 216 | "_bottom": 0, 217 | "_verticalCenter": 0, 218 | "_horizontalCenter": 0, 219 | "_isAbsLeft": true, 220 | "_isAbsRight": true, 221 | "_isAbsTop": true, 222 | "_isAbsBottom": true, 223 | "_isAbsHorizontalCenter": true, 224 | "_isAbsVerticalCenter": true, 225 | "_originalWidth": 600, 226 | "_originalHeight": 960 227 | }, 228 | { 229 | "__type__": "cc.Node", 230 | "_name": "top", 231 | "_objFlags": 0, 232 | "_parent": { 233 | "__id__": 2 234 | }, 235 | "_children": [ 236 | { 237 | "__id__": 7 238 | } 239 | ], 240 | "_tag": -1, 241 | "_active": true, 242 | "_components": [ 243 | { 244 | "__id__": 9 245 | }, 246 | { 247 | "__id__": 10 248 | } 249 | ], 250 | "_prefab": null, 251 | "_id": "d58efxOKYpEqLVcqFTjJ3mo", 252 | "_opacity": 255, 253 | "_color": { 254 | "__type__": "cc.Color", 255 | "r": 255, 256 | "g": 255, 257 | "b": 255, 258 | "a": 255 259 | }, 260 | "_cascadeOpacityEnabled": true, 261 | "_anchorPoint": { 262 | "__type__": "cc.Vec2", 263 | "x": 0.5, 264 | "y": 0.5 265 | }, 266 | "_contentSize": { 267 | "__type__": "cc.Size", 268 | "width": 720, 269 | "height": 81 270 | }, 271 | "_rotationX": 0, 272 | "_rotationY": 0, 273 | "_scaleX": 1, 274 | "_scaleY": 1, 275 | "_position": { 276 | "__type__": "cc.Vec2", 277 | "x": 0, 278 | "y": 599.5 279 | }, 280 | "_skewX": 0, 281 | "_skewY": 0, 282 | "_localZOrder": 0, 283 | "_globalZOrder": 0, 284 | "_opacityModifyRGB": false, 285 | "groupIndex": 0 286 | }, 287 | { 288 | "__type__": "cc.Node", 289 | "_name": "score", 290 | "_objFlags": 0, 291 | "_parent": { 292 | "__id__": 6 293 | }, 294 | "_children": [], 295 | "_tag": -1, 296 | "_active": true, 297 | "_components": [ 298 | { 299 | "__id__": 8 300 | } 301 | ], 302 | "_prefab": null, 303 | "_id": "70540OniwBGVqsvSRdwwnwb", 304 | "_opacity": 255, 305 | "_color": { 306 | "__type__": "cc.Color", 307 | "r": 255, 308 | "g": 255, 309 | "b": 255, 310 | "a": 255 311 | }, 312 | "_cascadeOpacityEnabled": true, 313 | "_anchorPoint": { 314 | "__type__": "cc.Vec2", 315 | "x": 0.5, 316 | "y": 0.5 317 | }, 318 | "_contentSize": { 319 | "__type__": "cc.Size", 320 | "width": 23.59, 321 | "height": 40 322 | }, 323 | "_rotationX": 0, 324 | "_rotationY": 0, 325 | "_scaleX": 1, 326 | "_scaleY": 1, 327 | "_position": { 328 | "__type__": "cc.Vec2", 329 | "x": 0, 330 | "y": 0 331 | }, 332 | "_skewX": 0, 333 | "_skewY": 0, 334 | "_localZOrder": 0, 335 | "_globalZOrder": 0, 336 | "_opacityModifyRGB": false, 337 | "groupIndex": 0 338 | }, 339 | { 340 | "__type__": "cc.Label", 341 | "_name": "", 342 | "_objFlags": 0, 343 | "node": { 344 | "__id__": 7 345 | }, 346 | "_enabled": true, 347 | "_useOriginalSize": false, 348 | "_actualFontSize": 40, 349 | "_fontSize": 40, 350 | "_lineHeight": 40, 351 | "_enableWrapText": true, 352 | "_N$file": { 353 | "__uuid__": "f860c958-1c71-4ae2-b501-649a28596a5a" 354 | }, 355 | "_isSystemFontUsed": false, 356 | "_spacingX": 0, 357 | "_N$string": "0", 358 | "_N$horizontalAlign": 1, 359 | "_N$verticalAlign": 1, 360 | "_N$fontFamily": "Arial", 361 | "_N$overflow": 0 362 | }, 363 | { 364 | "__type__": "cc.Sprite", 365 | "_name": "", 366 | "_objFlags": 0, 367 | "node": { 368 | "__id__": 6 369 | }, 370 | "_enabled": true, 371 | "_spriteFrame": { 372 | "__uuid__": "fa7a03bc-d641-4040-a98c-c3225715279f" 373 | }, 374 | "_type": 0, 375 | "_sizeMode": 0, 376 | "_fillType": 0, 377 | "_fillCenter": { 378 | "__type__": "cc.Vec2", 379 | "x": 0, 380 | "y": 0 381 | }, 382 | "_fillStart": 0, 383 | "_fillRange": 0, 384 | "_isTrimmedMode": true, 385 | "_srcBlendFactor": 770, 386 | "_dstBlendFactor": 771, 387 | "_atlas": null 388 | }, 389 | { 390 | "__type__": "cc.Widget", 391 | "_name": "", 392 | "_objFlags": 0, 393 | "node": { 394 | "__id__": 6 395 | }, 396 | "_enabled": true, 397 | "isAlignOnce": true, 398 | "_target": null, 399 | "_alignFlags": 41, 400 | "_left": 0, 401 | "_right": 0, 402 | "_top": 0, 403 | "_bottom": 669.5, 404 | "_verticalCenter": 0, 405 | "_horizontalCenter": 0, 406 | "_isAbsLeft": true, 407 | "_isAbsRight": true, 408 | "_isAbsTop": true, 409 | "_isAbsBottom": true, 410 | "_isAbsHorizontalCenter": true, 411 | "_isAbsVerticalCenter": true, 412 | "_originalWidth": 600, 413 | "_originalHeight": 81 414 | }, 415 | { 416 | "__type__": "cc.Canvas", 417 | "_name": "", 418 | "_objFlags": 0, 419 | "node": { 420 | "__id__": 2 421 | }, 422 | "_enabled": true, 423 | "_designResolution": { 424 | "__type__": "cc.Size", 425 | "width": 720, 426 | "height": 1280 427 | }, 428 | "_fitWidth": true, 429 | "_fitHeight": false 430 | }, 431 | { 432 | "__type__": "a337308uxxJva7vh8G06q7Z", 433 | "_name": "", 434 | "_objFlags": 0, 435 | "node": { 436 | "__id__": 2 437 | }, 438 | "_enabled": true, 439 | "gameView": { 440 | "__id__": 13 441 | }, 442 | "ball": { 443 | "__id__": 14 444 | }, 445 | "paddle": { 446 | "__id__": 33 447 | }, 448 | "brickLayout": { 449 | "__id__": 27 450 | }, 451 | "overPanel": { 452 | "__id__": 38 453 | } 454 | }, 455 | { 456 | "__type__": "e4735UW3lFPMoW0rK22obsG", 457 | "_name": "", 458 | "_objFlags": 0, 459 | "node": { 460 | "__id__": 2 461 | }, 462 | "_enabled": true, 463 | "scoreLabel": { 464 | "__id__": 8 465 | } 466 | }, 467 | { 468 | "__type__": "9b280YbFuZJv4QPGPL8e8iv", 469 | "_name": "", 470 | "_objFlags": 0, 471 | "node": { 472 | "__id__": 15 473 | }, 474 | "_enabled": true 475 | }, 476 | { 477 | "__type__": "cc.Node", 478 | "_name": "ball", 479 | "_objFlags": 0, 480 | "_parent": { 481 | "__id__": 16 482 | }, 483 | "_children": [], 484 | "_tag": -1, 485 | "_active": true, 486 | "_components": [ 487 | { 488 | "__id__": 35 489 | }, 490 | { 491 | "__id__": 36 492 | }, 493 | { 494 | "__id__": 37 495 | }, 496 | { 497 | "__id__": 14 498 | } 499 | ], 500 | "_prefab": null, 501 | "_id": "efee9QW7X9Fn4CDKBq9Kyjm", 502 | "_opacity": 255, 503 | "_color": { 504 | "__type__": "cc.Color", 505 | "r": 255, 506 | "g": 255, 507 | "b": 255, 508 | "a": 255 509 | }, 510 | "_cascadeOpacityEnabled": true, 511 | "_anchorPoint": { 512 | "__type__": "cc.Vec2", 513 | "x": 0.5, 514 | "y": 0.5 515 | }, 516 | "_contentSize": { 517 | "__type__": "cc.Size", 518 | "width": 34, 519 | "height": 33 520 | }, 521 | "_rotationX": 0, 522 | "_rotationY": 0, 523 | "_scaleX": 1, 524 | "_scaleY": 1, 525 | "_position": { 526 | "__type__": "cc.Vec2", 527 | "x": 360, 528 | "y": 267 529 | }, 530 | "_skewX": 0, 531 | "_skewY": 0, 532 | "_localZOrder": 0, 533 | "_globalZOrder": 0, 534 | "_opacityModifyRGB": false, 535 | "groupIndex": 0 536 | }, 537 | { 538 | "__type__": "cc.Node", 539 | "_name": "PhysicsLayer", 540 | "_objFlags": 0, 541 | "_parent": { 542 | "__id__": 1 543 | }, 544 | "_children": [ 545 | { 546 | "__id__": 17 547 | }, 548 | { 549 | "__id__": 22 550 | }, 551 | { 552 | "__id__": 25 553 | }, 554 | { 555 | "__id__": 15 556 | }, 557 | { 558 | "__id__": 29 559 | } 560 | ], 561 | "_tag": -1, 562 | "_active": true, 563 | "_components": [ 564 | { 565 | "__id__": 34 566 | } 567 | ], 568 | "_prefab": null, 569 | "_id": "1d482RdO4lH1bNt0a9Ex2/5", 570 | "_opacity": 255, 571 | "_color": { 572 | "__type__": "cc.Color", 573 | "r": 255, 574 | "g": 255, 575 | "b": 255, 576 | "a": 255 577 | }, 578 | "_cascadeOpacityEnabled": true, 579 | "_anchorPoint": { 580 | "__type__": "cc.Vec2", 581 | "x": 0, 582 | "y": 0 583 | }, 584 | "_contentSize": { 585 | "__type__": "cc.Size", 586 | "width": 720, 587 | "height": 1280 588 | }, 589 | "_rotationX": 0, 590 | "_rotationY": 0, 591 | "_scaleX": 1, 592 | "_scaleY": 1, 593 | "_position": { 594 | "__type__": "cc.Vec2", 595 | "x": 0, 596 | "y": 0 597 | }, 598 | "_skewX": 0, 599 | "_skewY": 0, 600 | "_localZOrder": 0, 601 | "_globalZOrder": 0, 602 | "_opacityModifyRGB": false, 603 | "groupIndex": 0 604 | }, 605 | { 606 | "__type__": "cc.Node", 607 | "_name": "wall", 608 | "_objFlags": 0, 609 | "_parent": { 610 | "__id__": 16 611 | }, 612 | "_children": [], 613 | "_tag": -1, 614 | "_active": true, 615 | "_components": [ 616 | { 617 | "__id__": 18 618 | }, 619 | { 620 | "__id__": 19 621 | }, 622 | { 623 | "__id__": 20 624 | }, 625 | { 626 | "__id__": 21 627 | } 628 | ], 629 | "_prefab": null, 630 | "_id": "46fc74b2a9M0rFsyZjY7ZpP", 631 | "_opacity": 255, 632 | "_color": { 633 | "__type__": "cc.Color", 634 | "r": 255, 635 | "g": 255, 636 | "b": 255, 637 | "a": 255 638 | }, 639 | "_cascadeOpacityEnabled": true, 640 | "_anchorPoint": { 641 | "__type__": "cc.Vec2", 642 | "x": 0.5, 643 | "y": 0.5 644 | }, 645 | "_contentSize": { 646 | "__type__": "cc.Size", 647 | "width": 0, 648 | "height": 0 649 | }, 650 | "_rotationX": 0, 651 | "_rotationY": 0, 652 | "_scaleX": 1, 653 | "_scaleY": 1, 654 | "_position": { 655 | "__type__": "cc.Vec2", 656 | "x": 0, 657 | "y": 0 658 | }, 659 | "_skewX": 0, 660 | "_skewY": 0, 661 | "_localZOrder": 0, 662 | "_globalZOrder": 0, 663 | "_opacityModifyRGB": false, 664 | "groupIndex": 0 665 | }, 666 | { 667 | "__type__": "cc.RigidBody", 668 | "_name": "", 669 | "_objFlags": 0, 670 | "node": { 671 | "__id__": 17 672 | }, 673 | "_enabled": true, 674 | "_type": 0, 675 | "_allowSleep": true, 676 | "_gravityScale": 1, 677 | "_linearDamping": 0, 678 | "_angularDamping": 0, 679 | "_linearVelocity": { 680 | "__type__": "cc.Vec2", 681 | "x": 0, 682 | "y": 0 683 | }, 684 | "_angularVelocity": 0, 685 | "_fixedRotation": false, 686 | "enabledContactListener": false, 687 | "bullet": false 688 | }, 689 | { 690 | "__type__": "cc.PhysicsBoxCollider", 691 | "_name": "", 692 | "_objFlags": 0, 693 | "node": { 694 | "__id__": 17 695 | }, 696 | "_enabled": true, 697 | "tag": 4, 698 | "_offset": { 699 | "__type__": "cc.Vec2", 700 | "x": -29, 701 | "y": 643 702 | }, 703 | "_size": { 704 | "__type__": "cc.Size", 705 | "width": 62, 706 | "height": 1283 707 | }, 708 | "_density": 1, 709 | "_sensor": false, 710 | "_friction": 0.2, 711 | "_restitution": 0 712 | }, 713 | { 714 | "__type__": "cc.PhysicsBoxCollider", 715 | "_name": "", 716 | "_objFlags": 0, 717 | "node": { 718 | "__id__": 17 719 | }, 720 | "_enabled": true, 721 | "tag": 4, 722 | "_offset": { 723 | "__type__": "cc.Vec2", 724 | "x": 746, 725 | "y": 641 726 | }, 727 | "_size": { 728 | "__type__": "cc.Size", 729 | "width": 50, 730 | "height": 1275 731 | }, 732 | "_density": 1, 733 | "_sensor": false, 734 | "_friction": 0.2, 735 | "_restitution": 0 736 | }, 737 | { 738 | "__type__": "cc.PhysicsBoxCollider", 739 | "_name": "", 740 | "_objFlags": 0, 741 | "node": { 742 | "__id__": 17 743 | }, 744 | "_enabled": true, 745 | "tag": 4, 746 | "_offset": { 747 | "__type__": "cc.Vec2", 748 | "x": 360, 749 | "y": 1234 750 | }, 751 | "_size": { 752 | "__type__": "cc.Size", 753 | "width": 721, 754 | "height": 97 755 | }, 756 | "_density": 1, 757 | "_sensor": false, 758 | "_friction": 0.2, 759 | "_restitution": 0 760 | }, 761 | { 762 | "__type__": "cc.Node", 763 | "_name": "ground", 764 | "_objFlags": 0, 765 | "_parent": { 766 | "__id__": 16 767 | }, 768 | "_children": [], 769 | "_tag": -1, 770 | "_active": true, 771 | "_components": [ 772 | { 773 | "__id__": 23 774 | }, 775 | { 776 | "__id__": 24 777 | } 778 | ], 779 | "_prefab": null, 780 | "_id": "b0e9aBH28xG+aPh6KePHyc5", 781 | "_opacity": 255, 782 | "_color": { 783 | "__type__": "cc.Color", 784 | "r": 255, 785 | "g": 255, 786 | "b": 255, 787 | "a": 255 788 | }, 789 | "_cascadeOpacityEnabled": true, 790 | "_anchorPoint": { 791 | "__type__": "cc.Vec2", 792 | "x": 0.5, 793 | "y": 0.5 794 | }, 795 | "_contentSize": { 796 | "__type__": "cc.Size", 797 | "width": 0, 798 | "height": 0 799 | }, 800 | "_rotationX": 0, 801 | "_rotationY": 0, 802 | "_scaleX": 1, 803 | "_scaleY": 1, 804 | "_position": { 805 | "__type__": "cc.Vec2", 806 | "x": 0, 807 | "y": 0 808 | }, 809 | "_skewX": 0, 810 | "_skewY": 0, 811 | "_localZOrder": 0, 812 | "_globalZOrder": 0, 813 | "_opacityModifyRGB": false, 814 | "groupIndex": 0 815 | }, 816 | { 817 | "__type__": "cc.RigidBody", 818 | "_name": "", 819 | "_objFlags": 0, 820 | "node": { 821 | "__id__": 22 822 | }, 823 | "_enabled": true, 824 | "_type": 0, 825 | "_allowSleep": true, 826 | "_gravityScale": 1, 827 | "_linearDamping": 0, 828 | "_angularDamping": 0, 829 | "_linearVelocity": { 830 | "__type__": "cc.Vec2", 831 | "x": 0, 832 | "y": 0 833 | }, 834 | "_angularVelocity": 0, 835 | "_fixedRotation": false, 836 | "enabledContactListener": false, 837 | "bullet": false 838 | }, 839 | { 840 | "__type__": "cc.PhysicsBoxCollider", 841 | "_name": "", 842 | "_objFlags": 0, 843 | "node": { 844 | "__id__": 22 845 | }, 846 | "_enabled": true, 847 | "tag": 2, 848 | "_offset": { 849 | "__type__": "cc.Vec2", 850 | "x": 361, 851 | "y": -26 852 | }, 853 | "_size": { 854 | "__type__": "cc.Size", 855 | "width": 714, 856 | "height": 51 857 | }, 858 | "_density": 1, 859 | "_sensor": false, 860 | "_friction": 0.2, 861 | "_restitution": 0 862 | }, 863 | { 864 | "__type__": "cc.Node", 865 | "_name": "brick_layout", 866 | "_objFlags": 0, 867 | "_parent": { 868 | "__id__": 16 869 | }, 870 | "_children": [], 871 | "_tag": -1, 872 | "_active": true, 873 | "_components": [ 874 | { 875 | "__id__": 26 876 | }, 877 | { 878 | "__id__": 27 879 | }, 880 | { 881 | "__id__": 28 882 | } 883 | ], 884 | "_prefab": null, 885 | "_id": "f32d66rSRpFEaPYFX3IR1Z2", 886 | "_opacity": 255, 887 | "_color": { 888 | "__type__": "cc.Color", 889 | "r": 255, 890 | "g": 255, 891 | "b": 255, 892 | "a": 255 893 | }, 894 | "_cascadeOpacityEnabled": true, 895 | "_anchorPoint": { 896 | "__type__": "cc.Vec2", 897 | "x": 0, 898 | "y": 1 899 | }, 900 | "_contentSize": { 901 | "__type__": "cc.Size", 902 | "width": 662, 903 | "height": 208 904 | }, 905 | "_rotationX": 0, 906 | "_rotationY": 0, 907 | "_scaleX": 1, 908 | "_scaleY": 1, 909 | "_position": { 910 | "__type__": "cc.Vec2", 911 | "x": 29, 912 | "y": 1049.6 913 | }, 914 | "_skewX": 0, 915 | "_skewY": 0, 916 | "_localZOrder": 0, 917 | "_globalZOrder": 0, 918 | "_opacityModifyRGB": false, 919 | "groupIndex": 0 920 | }, 921 | { 922 | "__type__": "cc.Sprite", 923 | "_name": "", 924 | "_objFlags": 0, 925 | "node": { 926 | "__id__": 25 927 | }, 928 | "_enabled": false, 929 | "_spriteFrame": { 930 | "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" 931 | }, 932 | "_type": 1, 933 | "_sizeMode": 0, 934 | "_fillType": 0, 935 | "_fillCenter": { 936 | "__type__": "cc.Vec2", 937 | "x": 0, 938 | "y": 0 939 | }, 940 | "_fillStart": 0, 941 | "_fillRange": 0, 942 | "_isTrimmedMode": true, 943 | "_srcBlendFactor": 770, 944 | "_dstBlendFactor": 771, 945 | "_atlas": null 946 | }, 947 | { 948 | "__type__": "62398FSMJtHJ55jmSoqf4WF", 949 | "_name": "", 950 | "_objFlags": 0, 951 | "node": { 952 | "__id__": 25 953 | }, 954 | "_enabled": true, 955 | "padding": 10, 956 | "spacing": 10, 957 | "cols": 10, 958 | "brickPrefab": { 959 | "__uuid__": "edbd9d67-e2ab-4be8-80b8-5afb06361626" 960 | }, 961 | "bricksNumber": 50 962 | }, 963 | { 964 | "__type__": "cc.Widget", 965 | "_name": "", 966 | "_objFlags": 0, 967 | "node": { 968 | "__id__": 25 969 | }, 970 | "_enabled": true, 971 | "isAlignOnce": true, 972 | "_target": null, 973 | "_alignFlags": 1, 974 | "_left": 0, 975 | "_right": 0, 976 | "_top": 0.18, 977 | "_bottom": 0, 978 | "_verticalCenter": 0, 979 | "_horizontalCenter": 0, 980 | "_isAbsLeft": true, 981 | "_isAbsRight": true, 982 | "_isAbsTop": false, 983 | "_isAbsBottom": true, 984 | "_isAbsHorizontalCenter": true, 985 | "_isAbsVerticalCenter": true, 986 | "_originalWidth": 0, 987 | "_originalHeight": 0 988 | }, 989 | { 990 | "__type__": "cc.Node", 991 | "_name": "paddle", 992 | "_objFlags": 0, 993 | "_parent": { 994 | "__id__": 16 995 | }, 996 | "_children": [], 997 | "_tag": -1, 998 | "_active": true, 999 | "_components": [ 1000 | { 1001 | "__id__": 30 1002 | }, 1003 | { 1004 | "__id__": 31 1005 | }, 1006 | { 1007 | "__id__": 32 1008 | }, 1009 | { 1010 | "__id__": 33 1011 | } 1012 | ], 1013 | "_prefab": null, 1014 | "_id": "80f0fTYb2hEKqQccE4ae7zW", 1015 | "_opacity": 255, 1016 | "_color": { 1017 | "__type__": "cc.Color", 1018 | "r": 255, 1019 | "g": 255, 1020 | "b": 255, 1021 | "a": 255 1022 | }, 1023 | "_cascadeOpacityEnabled": true, 1024 | "_anchorPoint": { 1025 | "__type__": "cc.Vec2", 1026 | "x": 0.5, 1027 | "y": 0.5 1028 | }, 1029 | "_contentSize": { 1030 | "__type__": "cc.Size", 1031 | "width": 177, 1032 | "height": 24 1033 | }, 1034 | "_rotationX": 0, 1035 | "_rotationY": 0, 1036 | "_scaleX": 1, 1037 | "_scaleY": 1, 1038 | "_position": { 1039 | "__type__": "cc.Vec2", 1040 | "x": 360, 1041 | "y": 229 1042 | }, 1043 | "_skewX": 0, 1044 | "_skewY": 0, 1045 | "_localZOrder": 0, 1046 | "_globalZOrder": 0, 1047 | "_opacityModifyRGB": false, 1048 | "groupIndex": 0 1049 | }, 1050 | { 1051 | "__type__": "cc.Sprite", 1052 | "_name": "", 1053 | "_objFlags": 0, 1054 | "node": { 1055 | "__id__": 29 1056 | }, 1057 | "_enabled": true, 1058 | "_spriteFrame": { 1059 | "__uuid__": "95332c02-5842-46a2-9dab-e40b8172c27c" 1060 | }, 1061 | "_type": 0, 1062 | "_sizeMode": 1, 1063 | "_fillType": 0, 1064 | "_fillCenter": { 1065 | "__type__": "cc.Vec2", 1066 | "x": 0, 1067 | "y": 0 1068 | }, 1069 | "_fillStart": 0, 1070 | "_fillRange": 0, 1071 | "_isTrimmedMode": true, 1072 | "_srcBlendFactor": 770, 1073 | "_dstBlendFactor": 771, 1074 | "_atlas": null 1075 | }, 1076 | { 1077 | "__type__": "cc.RigidBody", 1078 | "_name": "", 1079 | "_objFlags": 0, 1080 | "node": { 1081 | "__id__": 29 1082 | }, 1083 | "_enabled": true, 1084 | "_type": 0, 1085 | "_allowSleep": true, 1086 | "_gravityScale": 1, 1087 | "_linearDamping": 0, 1088 | "_angularDamping": 0, 1089 | "_linearVelocity": { 1090 | "__type__": "cc.Vec2", 1091 | "x": 0, 1092 | "y": 0 1093 | }, 1094 | "_angularVelocity": 0, 1095 | "_fixedRotation": false, 1096 | "enabledContactListener": false, 1097 | "bullet": false 1098 | }, 1099 | { 1100 | "__type__": "cc.PhysicsBoxCollider", 1101 | "_name": "", 1102 | "_objFlags": 0, 1103 | "node": { 1104 | "__id__": 29 1105 | }, 1106 | "_enabled": true, 1107 | "tag": 3, 1108 | "_offset": { 1109 | "__type__": "cc.Vec2", 1110 | "x": 0, 1111 | "y": 0 1112 | }, 1113 | "_size": { 1114 | "__type__": "cc.Size", 1115 | "width": 177, 1116 | "height": 24 1117 | }, 1118 | "_density": 1, 1119 | "_sensor": false, 1120 | "_friction": 0.2, 1121 | "_restitution": 0 1122 | }, 1123 | { 1124 | "__type__": "4dc82c1qO9KbZBsMZGbHlMV", 1125 | "_name": "", 1126 | "_objFlags": 0, 1127 | "node": { 1128 | "__id__": 29 1129 | }, 1130 | "_enabled": true 1131 | }, 1132 | { 1133 | "__type__": "cc.Widget", 1134 | "_name": "", 1135 | "_objFlags": 0, 1136 | "node": { 1137 | "__id__": 16 1138 | }, 1139 | "_enabled": true, 1140 | "isAlignOnce": true, 1141 | "_target": null, 1142 | "_alignFlags": 45, 1143 | "_left": 0, 1144 | "_right": 0, 1145 | "_top": 0, 1146 | "_bottom": 0, 1147 | "_verticalCenter": 0, 1148 | "_horizontalCenter": 0, 1149 | "_isAbsLeft": true, 1150 | "_isAbsRight": true, 1151 | "_isAbsTop": true, 1152 | "_isAbsBottom": true, 1153 | "_isAbsHorizontalCenter": true, 1154 | "_isAbsVerticalCenter": true, 1155 | "_originalWidth": 0, 1156 | "_originalHeight": 0 1157 | }, 1158 | { 1159 | "__type__": "cc.Sprite", 1160 | "_name": "", 1161 | "_objFlags": 0, 1162 | "node": { 1163 | "__id__": 15 1164 | }, 1165 | "_enabled": true, 1166 | "_spriteFrame": { 1167 | "__uuid__": "32b27e88-48ee-4c2a-b8e2-bcf59d2ce34b" 1168 | }, 1169 | "_type": 0, 1170 | "_sizeMode": 1, 1171 | "_fillType": 0, 1172 | "_fillCenter": { 1173 | "__type__": "cc.Vec2", 1174 | "x": 0, 1175 | "y": 0 1176 | }, 1177 | "_fillStart": 0, 1178 | "_fillRange": 0, 1179 | "_isTrimmedMode": true, 1180 | "_srcBlendFactor": 770, 1181 | "_dstBlendFactor": 771, 1182 | "_atlas": null 1183 | }, 1184 | { 1185 | "__type__": "cc.RigidBody", 1186 | "_name": "", 1187 | "_objFlags": 0, 1188 | "node": { 1189 | "__id__": 15 1190 | }, 1191 | "_enabled": true, 1192 | "_type": 2, 1193 | "_allowSleep": true, 1194 | "_gravityScale": 0, 1195 | "_linearDamping": 0, 1196 | "_angularDamping": 0, 1197 | "_linearVelocity": { 1198 | "__type__": "cc.Vec2", 1199 | "x": 1000, 1200 | "y": 1000 1201 | }, 1202 | "_angularVelocity": 0, 1203 | "_fixedRotation": false, 1204 | "enabledContactListener": true, 1205 | "bullet": false 1206 | }, 1207 | { 1208 | "__type__": "cc.PhysicsCircleCollider", 1209 | "_name": "", 1210 | "_objFlags": 0, 1211 | "node": { 1212 | "__id__": 15 1213 | }, 1214 | "_enabled": true, 1215 | "tag": 0, 1216 | "_offset": { 1217 | "__type__": "cc.Vec2", 1218 | "x": 0, 1219 | "y": 0 1220 | }, 1221 | "_radius": 16.3, 1222 | "_density": 1, 1223 | "_sensor": false, 1224 | "_friction": 0, 1225 | "_restitution": 1 1226 | }, 1227 | { 1228 | "__type__": "60425zRIQ5LNIZ6KmZ5p/LN", 1229 | "_name": "", 1230 | "_objFlags": 0, 1231 | "node": { 1232 | "__id__": 39 1233 | }, 1234 | "_enabled": true, 1235 | "resultLabel": { 1236 | "__id__": 41 1237 | }, 1238 | "scoreLabel": { 1239 | "__id__": 43 1240 | } 1241 | }, 1242 | { 1243 | "__type__": "cc.Node", 1244 | "_name": "OverPanel", 1245 | "_objFlags": 0, 1246 | "_parent": { 1247 | "__id__": 1 1248 | }, 1249 | "_children": [ 1250 | { 1251 | "__id__": 40 1252 | }, 1253 | { 1254 | "__id__": 42 1255 | }, 1256 | { 1257 | "__id__": 44 1258 | } 1259 | ], 1260 | "_tag": -1, 1261 | "_active": true, 1262 | "_components": [ 1263 | { 1264 | "__id__": 48 1265 | }, 1266 | { 1267 | "__id__": 38 1268 | } 1269 | ], 1270 | "_prefab": null, 1271 | "_id": "33ef7r2ELtOUoHhY9mB09QU", 1272 | "_opacity": 255, 1273 | "_color": { 1274 | "__type__": "cc.Color", 1275 | "r": 255, 1276 | "g": 255, 1277 | "b": 255, 1278 | "a": 255 1279 | }, 1280 | "_cascadeOpacityEnabled": true, 1281 | "_anchorPoint": { 1282 | "__type__": "cc.Vec2", 1283 | "x": 0.5, 1284 | "y": 0.5 1285 | }, 1286 | "_contentSize": { 1287 | "__type__": "cc.Size", 1288 | "width": 400, 1289 | "height": 300 1290 | }, 1291 | "_rotationX": 0, 1292 | "_rotationY": 0, 1293 | "_scaleX": 1, 1294 | "_scaleY": 1, 1295 | "_position": { 1296 | "__type__": "cc.Vec2", 1297 | "x": 355, 1298 | "y": 636 1299 | }, 1300 | "_skewX": 0, 1301 | "_skewY": 0, 1302 | "_localZOrder": 0, 1303 | "_globalZOrder": 0, 1304 | "_opacityModifyRGB": false, 1305 | "groupIndex": 0 1306 | }, 1307 | { 1308 | "__type__": "cc.Node", 1309 | "_name": "result", 1310 | "_objFlags": 0, 1311 | "_parent": { 1312 | "__id__": 39 1313 | }, 1314 | "_children": [], 1315 | "_tag": -1, 1316 | "_active": true, 1317 | "_components": [ 1318 | { 1319 | "__id__": 41 1320 | } 1321 | ], 1322 | "_prefab": null, 1323 | "_id": "7f8ecmSAd5AeZ8BVEmghHsF", 1324 | "_opacity": 255, 1325 | "_color": { 1326 | "__type__": "cc.Color", 1327 | "r": 0, 1328 | "g": 0, 1329 | "b": 0, 1330 | "a": 255 1331 | }, 1332 | "_cascadeOpacityEnabled": true, 1333 | "_anchorPoint": { 1334 | "__type__": "cc.Vec2", 1335 | "x": 0.5, 1336 | "y": 0.5 1337 | }, 1338 | "_contentSize": { 1339 | "__type__": "cc.Size", 1340 | "width": 191.17, 1341 | "height": 40 1342 | }, 1343 | "_rotationX": 0, 1344 | "_rotationY": 0, 1345 | "_scaleX": 1, 1346 | "_scaleY": 1, 1347 | "_position": { 1348 | "__type__": "cc.Vec2", 1349 | "x": 3, 1350 | "y": 71 1351 | }, 1352 | "_skewX": 0, 1353 | "_skewY": 0, 1354 | "_localZOrder": 0, 1355 | "_globalZOrder": 0, 1356 | "_opacityModifyRGB": false, 1357 | "groupIndex": 0 1358 | }, 1359 | { 1360 | "__type__": "cc.Label", 1361 | "_name": "", 1362 | "_objFlags": 0, 1363 | "node": { 1364 | "__id__": 40 1365 | }, 1366 | "_enabled": true, 1367 | "_useOriginalSize": false, 1368 | "_actualFontSize": 40, 1369 | "_fontSize": 40, 1370 | "_lineHeight": 40, 1371 | "_enableWrapText": true, 1372 | "_N$file": { 1373 | "__uuid__": "f860c958-1c71-4ae2-b501-649a28596a5a" 1374 | }, 1375 | "_isSystemFontUsed": false, 1376 | "_spacingX": 0, 1377 | "_N$string": "you win!", 1378 | "_N$horizontalAlign": 1, 1379 | "_N$verticalAlign": 1, 1380 | "_N$fontFamily": "Arial", 1381 | "_N$overflow": 0 1382 | }, 1383 | { 1384 | "__type__": "cc.Node", 1385 | "_name": "score", 1386 | "_objFlags": 0, 1387 | "_parent": { 1388 | "__id__": 39 1389 | }, 1390 | "_children": [], 1391 | "_tag": -1, 1392 | "_active": true, 1393 | "_components": [ 1394 | { 1395 | "__id__": 43 1396 | } 1397 | ], 1398 | "_prefab": null, 1399 | "_id": "5531ezmRxRES4Zd03U8HvnM", 1400 | "_opacity": 255, 1401 | "_color": { 1402 | "__type__": "cc.Color", 1403 | "r": 0, 1404 | "g": 0, 1405 | "b": 0, 1406 | "a": 255 1407 | }, 1408 | "_cascadeOpacityEnabled": true, 1409 | "_anchorPoint": { 1410 | "__type__": "cc.Vec2", 1411 | "x": 0.5, 1412 | "y": 0.5 1413 | }, 1414 | "_contentSize": { 1415 | "__type__": "cc.Size", 1416 | "width": 44.12, 1417 | "height": 40 1418 | }, 1419 | "_rotationX": 0, 1420 | "_rotationY": 0, 1421 | "_scaleX": 1, 1422 | "_scaleY": 1, 1423 | "_position": { 1424 | "__type__": "cc.Vec2", 1425 | "x": 0, 1426 | "y": -7 1427 | }, 1428 | "_skewX": 0, 1429 | "_skewY": 0, 1430 | "_localZOrder": 0, 1431 | "_globalZOrder": 0, 1432 | "_opacityModifyRGB": false, 1433 | "groupIndex": 0 1434 | }, 1435 | { 1436 | "__type__": "cc.Label", 1437 | "_name": "", 1438 | "_objFlags": 0, 1439 | "node": { 1440 | "__id__": 42 1441 | }, 1442 | "_enabled": true, 1443 | "_useOriginalSize": false, 1444 | "_actualFontSize": 40, 1445 | "_fontSize": 40, 1446 | "_lineHeight": 40, 1447 | "_enableWrapText": true, 1448 | "_N$file": { 1449 | "__uuid__": "f860c958-1c71-4ae2-b501-649a28596a5a" 1450 | }, 1451 | "_isSystemFontUsed": false, 1452 | "_spacingX": 0, 1453 | "_N$string": "47", 1454 | "_N$horizontalAlign": 1, 1455 | "_N$verticalAlign": 1, 1456 | "_N$fontFamily": "Arial", 1457 | "_N$overflow": 0 1458 | }, 1459 | { 1460 | "__type__": "cc.Node", 1461 | "_name": "btn_start", 1462 | "_objFlags": 0, 1463 | "_parent": { 1464 | "__id__": 39 1465 | }, 1466 | "_children": [], 1467 | "_tag": -1, 1468 | "_active": true, 1469 | "_components": [ 1470 | { 1471 | "__id__": 45 1472 | }, 1473 | { 1474 | "__id__": 46 1475 | } 1476 | ], 1477 | "_prefab": null, 1478 | "_id": "5869cgwylFBvpFCnvcp22Vc", 1479 | "_opacity": 255, 1480 | "_color": { 1481 | "__type__": "cc.Color", 1482 | "r": 255, 1483 | "g": 255, 1484 | "b": 255, 1485 | "a": 255 1486 | }, 1487 | "_cascadeOpacityEnabled": true, 1488 | "_anchorPoint": { 1489 | "__type__": "cc.Vec2", 1490 | "x": 0.5, 1491 | "y": 0.5 1492 | }, 1493 | "_contentSize": { 1494 | "__type__": "cc.Size", 1495 | "width": 50, 1496 | "height": 50 1497 | }, 1498 | "_rotationX": 0, 1499 | "_rotationY": 0, 1500 | "_scaleX": 1, 1501 | "_scaleY": 1, 1502 | "_position": { 1503 | "__type__": "cc.Vec2", 1504 | "x": 0, 1505 | "y": -88 1506 | }, 1507 | "_skewX": 0, 1508 | "_skewY": 0, 1509 | "_localZOrder": 0, 1510 | "_globalZOrder": 0, 1511 | "_opacityModifyRGB": false, 1512 | "groupIndex": 0 1513 | }, 1514 | { 1515 | "__type__": "cc.Sprite", 1516 | "_name": "", 1517 | "_objFlags": 0, 1518 | "node": { 1519 | "__id__": 44 1520 | }, 1521 | "_enabled": true, 1522 | "_spriteFrame": { 1523 | "__uuid__": "59922add-e132-4300-805f-97e74f7500d1" 1524 | }, 1525 | "_type": 1, 1526 | "_sizeMode": 2, 1527 | "_fillType": 0, 1528 | "_fillCenter": { 1529 | "__type__": "cc.Vec2", 1530 | "x": 0, 1531 | "y": 0 1532 | }, 1533 | "_fillStart": 0, 1534 | "_fillRange": 0, 1535 | "_isTrimmedMode": true, 1536 | "_srcBlendFactor": 770, 1537 | "_dstBlendFactor": 771, 1538 | "_atlas": null 1539 | }, 1540 | { 1541 | "__type__": "cc.Button", 1542 | "_name": "", 1543 | "_objFlags": 0, 1544 | "node": { 1545 | "__id__": 44 1546 | }, 1547 | "_enabled": true, 1548 | "transition": 3, 1549 | "pressedColor": { 1550 | "__type__": "cc.Color", 1551 | "r": 255, 1552 | "g": 255, 1553 | "b": 255, 1554 | "a": 255 1555 | }, 1556 | "hoverColor": { 1557 | "__type__": "cc.Color", 1558 | "r": 255, 1559 | "g": 255, 1560 | "b": 255, 1561 | "a": 255 1562 | }, 1563 | "duration": 0.1, 1564 | "zoomScale": 1.2, 1565 | "pressedSprite": { 1566 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1567 | }, 1568 | "hoverSprite": { 1569 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1570 | }, 1571 | "clickEvents": [ 1572 | { 1573 | "__id__": 47 1574 | } 1575 | ], 1576 | "_N$interactable": true, 1577 | "_N$enableAutoGrayEffect": false, 1578 | "_N$normalColor": { 1579 | "__type__": "cc.Color", 1580 | "r": 255, 1581 | "g": 255, 1582 | "b": 255, 1583 | "a": 255 1584 | }, 1585 | "_N$disabledColor": { 1586 | "__type__": "cc.Color", 1587 | "r": 255, 1588 | "g": 255, 1589 | "b": 255, 1590 | "a": 255 1591 | }, 1592 | "_N$normalSprite": { 1593 | "__uuid__": "59922add-e132-4300-805f-97e74f7500d1" 1594 | }, 1595 | "_N$disabledSprite": { 1596 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 1597 | }, 1598 | "_N$target": { 1599 | "__id__": 44 1600 | } 1601 | }, 1602 | { 1603 | "__type__": "cc.ClickEvent", 1604 | "target": { 1605 | "__id__": 39 1606 | }, 1607 | "component": "OverPanel", 1608 | "handler": "onBtnRestart", 1609 | "customEventData": "" 1610 | }, 1611 | { 1612 | "__type__": "cc.Sprite", 1613 | "_name": "", 1614 | "_objFlags": 0, 1615 | "node": { 1616 | "__id__": 39 1617 | }, 1618 | "_enabled": true, 1619 | "_spriteFrame": { 1620 | "__uuid__": "30bc12e4-f3ec-4f92-bb8e-52a5ded98165" 1621 | }, 1622 | "_type": 0, 1623 | "_sizeMode": 2, 1624 | "_fillType": 0, 1625 | "_fillCenter": { 1626 | "__type__": "cc.Vec2", 1627 | "x": 0, 1628 | "y": 0 1629 | }, 1630 | "_fillStart": 0, 1631 | "_fillRange": 0, 1632 | "_isTrimmedMode": true, 1633 | "_srcBlendFactor": 770, 1634 | "_dstBlendFactor": 771, 1635 | "_atlas": null 1636 | } 1637 | ] --------------------------------------------------------------------------------