├── .gitattributes ├── AsyncAction ├── .gitignore ├── assets │ ├── main.fire │ ├── main.fire.meta │ ├── script.meta │ └── script │ │ ├── AsyncAction.ts │ │ ├── AsyncAction.ts.meta │ │ ├── main.ts │ │ └── main.ts.meta ├── creator.d.ts ├── jsconfig.json ├── project.json ├── settings │ ├── builder.json │ └── project.json └── tsconfig.json ├── CameraIdea ├── .gitignore ├── assets │ ├── scene.meta │ ├── scene │ │ ├── CameraIdea.fire │ │ └── CameraIdea.fire.meta │ ├── script.meta │ └── script │ │ ├── CameraIdea.js │ │ ├── CameraIdea.js.meta │ │ ├── Hero.js │ │ ├── Hero.js.meta │ │ ├── MathVec.js │ │ ├── MathVec.js.meta │ │ ├── MoveCtrllor.js │ │ └── MoveCtrllor.js.meta ├── creator.d.ts ├── jsconfig.json ├── project.json └── settings │ ├── builder.json │ └── project.json ├── CameraManager ├── .gitignore ├── assets │ ├── main.fire │ ├── main.fire.meta │ ├── script.meta │ └── script │ │ ├── Camera.ts │ │ ├── Camera.ts.meta │ │ ├── CameraManager.ts │ │ ├── CameraManager.ts.meta │ │ ├── NextLayer.ts │ │ ├── NextLayer.ts.meta │ │ ├── StartLayer.ts │ │ └── StartLayer.ts.meta ├── creator.d.ts ├── jsconfig.json ├── project.json └── settings │ ├── builder.json │ └── project.json ├── MVC ├── .gitignore ├── assets │ ├── scene.meta │ ├── scene │ │ ├── main.fire │ │ └── main.fire.meta │ ├── script.meta │ └── script │ │ ├── data.js │ │ ├── data.js.meta │ │ ├── input.js │ │ ├── input.js.meta │ │ ├── main.js │ │ └── main.js.meta ├── creator.d.ts ├── jsconfig.json ├── project.json └── settings │ └── project.json ├── README.md ├── RandPlat ├── .gitignore ├── README.md ├── assets │ ├── Animation.meta │ ├── Animation │ │ ├── rotating.anim │ │ ├── rotating.anim.meta │ │ ├── rotationFinish.anim │ │ ├── rotationFinish.anim.meta │ │ ├── rotationStart.anim │ │ └── rotationStart.anim.meta │ ├── Scene.meta │ ├── Scene │ │ ├── helloworld.fire │ │ └── helloworld.fire.meta │ ├── Script.meta │ ├── Script │ │ ├── HelloWorld.js │ │ ├── HelloWorld.js.meta │ │ ├── RandPlat.js │ │ └── RandPlat.js.meta │ ├── Texture.meta │ └── Texture │ │ ├── HelloWorld.png │ │ ├── HelloWorld.png.meta │ │ ├── singleColor.png │ │ └── singleColor.png.meta ├── creator.d.ts ├── jsconfig.json ├── project.json ├── settings │ ├── builder.json │ ├── builder.panel.json │ └── project.json ├── template-banner.png └── template.json ├── collisionBar ├── .gitignore ├── README.md ├── assets │ ├── main.fire │ ├── main.fire.meta │ ├── prefab.meta │ ├── prefab │ │ ├── enemy.prefab │ │ └── enemy.prefab.meta │ ├── script.meta │ └── script │ │ ├── Attack.js │ │ ├── Attack.js.meta │ │ ├── Enemy.js │ │ ├── Enemy.js.meta │ │ ├── Hero.js │ │ ├── Hero.js.meta │ │ ├── createEnemy.js │ │ ├── createEnemy.js.meta │ │ ├── layer.js │ │ ├── layer.js.meta │ │ ├── onAttacked.js │ │ └── onAttacked.js.meta ├── creator.d.ts ├── jsconfig.json ├── project.json └── settings │ ├── builder.json │ └── project.json └── randCreate ├── .gitignore ├── README.md ├── assets ├── Scene.meta ├── Scene │ ├── helloworld.fire │ └── helloworld.fire.meta ├── Script.meta ├── Script │ ├── HelloWorld.js │ └── HelloWorld.js.meta ├── Texture.meta ├── Texture │ ├── HelloWorld.png │ ├── HelloWorld.png.meta │ ├── singleColor.png │ └── singleColor.png.meta ├── prefab.meta └── prefab │ ├── cocos0.prefab │ ├── cocos0.prefab.meta │ ├── cocos1.prefab │ ├── cocos1.prefab.meta │ ├── cocos2.prefab │ └── cocos2.prefab.meta ├── creator.d.ts ├── jsconfig.json ├── project.json ├── settings ├── builder.json ├── builder.panel.json └── project.json ├── template-banner.png └── template.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /AsyncAction/.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/ -------------------------------------------------------------------------------- /AsyncAction/assets/main.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 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 | "_active": true, 21 | "_level": 0, 22 | "_components": [], 23 | "_prefab": null, 24 | "_opacity": 255, 25 | "_color": { 26 | "__type__": "cc.Color", 27 | "r": 255, 28 | "g": 255, 29 | "b": 255, 30 | "a": 255 31 | }, 32 | "_contentSize": { 33 | "__type__": "cc.Size", 34 | "width": 0, 35 | "height": 0 36 | }, 37 | "_anchorPoint": { 38 | "__type__": "cc.Vec2", 39 | "x": 0, 40 | "y": 0 41 | }, 42 | "_scale": { 43 | "__type__": "cc.Vec3", 44 | "x": 0.4281005859374997, 45 | "y": 0.4281005859374997, 46 | "z": 1 47 | }, 48 | "_quat": { 49 | "__type__": "cc.Quat", 50 | "x": 0, 51 | "y": 0, 52 | "z": 0, 53 | "w": 1 54 | }, 55 | "_zIndex": 0, 56 | "groupIndex": 0, 57 | "autoReleaseAssets": false, 58 | "_id": "fffda585-32f7-4fea-8814-cd3c74001137" 59 | }, 60 | { 61 | "__type__": "cc.Node", 62 | "_name": "Canvas", 63 | "_objFlags": 0, 64 | "_parent": { 65 | "__id__": 1 66 | }, 67 | "_children": [ 68 | { 69 | "__id__": 3 70 | }, 71 | { 72 | "__id__": 5 73 | } 74 | ], 75 | "_active": true, 76 | "_level": 0, 77 | "_components": [ 78 | { 79 | "__id__": 9 80 | }, 81 | { 82 | "__id__": 10 83 | } 84 | ], 85 | "_prefab": null, 86 | "_opacity": 255, 87 | "_color": { 88 | "__type__": "cc.Color", 89 | "r": 255, 90 | "g": 255, 91 | "b": 255, 92 | "a": 255 93 | }, 94 | "_contentSize": { 95 | "__type__": "cc.Size", 96 | "width": 960, 97 | "height": 640 98 | }, 99 | "_anchorPoint": { 100 | "__type__": "cc.Vec2", 101 | "x": 0.5, 102 | "y": 0.5 103 | }, 104 | "_position": { 105 | "__type__": "cc.Vec3", 106 | "x": 480, 107 | "y": 320, 108 | "z": 0 109 | }, 110 | "_scale": { 111 | "__type__": "cc.Vec3", 112 | "x": 1, 113 | "y": 1, 114 | "z": 1 115 | }, 116 | "_rotationX": 0, 117 | "_rotationY": 0, 118 | "_quat": { 119 | "__type__": "cc.Quat", 120 | "x": 0, 121 | "y": 0, 122 | "z": 0, 123 | "w": 1 124 | }, 125 | "_skewX": 0, 126 | "_skewY": 0, 127 | "_zIndex": 0, 128 | "groupIndex": 0, 129 | "_id": "22zL0Uhg5D1pk39zSPqs5S" 130 | }, 131 | { 132 | "__type__": "cc.Node", 133 | "_name": "Main Camera", 134 | "_objFlags": 0, 135 | "_parent": { 136 | "__id__": 2 137 | }, 138 | "_children": [], 139 | "_active": true, 140 | "_level": 1, 141 | "_components": [ 142 | { 143 | "__id__": 4 144 | } 145 | ], 146 | "_prefab": null, 147 | "_opacity": 255, 148 | "_color": { 149 | "__type__": "cc.Color", 150 | "r": 255, 151 | "g": 255, 152 | "b": 255, 153 | "a": 255 154 | }, 155 | "_contentSize": { 156 | "__type__": "cc.Size", 157 | "width": 0, 158 | "height": 0 159 | }, 160 | "_anchorPoint": { 161 | "__type__": "cc.Vec2", 162 | "x": 0.5, 163 | "y": 0.5 164 | }, 165 | "_position": { 166 | "__type__": "cc.Vec3", 167 | "x": 0, 168 | "y": 0, 169 | "z": 0 170 | }, 171 | "_scale": { 172 | "__type__": "cc.Vec3", 173 | "x": 1, 174 | "y": 1, 175 | "z": 1 176 | }, 177 | "_rotationX": 0, 178 | "_rotationY": 0, 179 | "_quat": { 180 | "__type__": "cc.Quat", 181 | "x": 0, 182 | "y": 0, 183 | "z": 0, 184 | "w": 1 185 | }, 186 | "_skewX": 0, 187 | "_skewY": 0, 188 | "_zIndex": 0, 189 | "groupIndex": 0, 190 | "_id": "17T/XWzH9HgrDXbYQZdKUu" 191 | }, 192 | { 193 | "__type__": "cc.Camera", 194 | "_name": "", 195 | "_objFlags": 0, 196 | "node": { 197 | "__id__": 3 198 | }, 199 | "_enabled": true, 200 | "_cullingMask": 4294967295, 201 | "_clearFlags": 7, 202 | "_backgroundColor": { 203 | "__type__": "cc.Color", 204 | "r": 0, 205 | "g": 0, 206 | "b": 0, 207 | "a": 255 208 | }, 209 | "_depth": -1, 210 | "_zoomRatio": 1, 211 | "_targetTexture": null, 212 | "_id": "e74zjrkshPyasP9dB1dZCz" 213 | }, 214 | { 215 | "__type__": "cc.Node", 216 | "_name": "background", 217 | "_objFlags": 0, 218 | "_parent": { 219 | "__id__": 2 220 | }, 221 | "_children": [ 222 | { 223 | "__id__": 6 224 | } 225 | ], 226 | "_active": true, 227 | "_level": 1, 228 | "_components": [ 229 | { 230 | "__id__": 8 231 | } 232 | ], 233 | "_prefab": null, 234 | "_opacity": 255, 235 | "_color": { 236 | "__type__": "cc.Color", 237 | "r": 95, 238 | "g": 135, 239 | "b": 185, 240 | "a": 255 241 | }, 242 | "_contentSize": { 243 | "__type__": "cc.Size", 244 | "width": 960, 245 | "height": 640 246 | }, 247 | "_anchorPoint": { 248 | "__type__": "cc.Vec2", 249 | "x": 0.5, 250 | "y": 0.5 251 | }, 252 | "_position": { 253 | "__type__": "cc.Vec3", 254 | "x": 0, 255 | "y": 0, 256 | "z": 0 257 | }, 258 | "_scale": { 259 | "__type__": "cc.Vec3", 260 | "x": 1, 261 | "y": 1, 262 | "z": 1 263 | }, 264 | "_rotationX": 0, 265 | "_rotationY": 0, 266 | "_quat": { 267 | "__type__": "cc.Quat", 268 | "x": 0, 269 | "y": 0, 270 | "z": 0, 271 | "w": 1 272 | }, 273 | "_skewX": 0, 274 | "_skewY": 0, 275 | "_zIndex": 0, 276 | "groupIndex": 0, 277 | "_id": "aaAt5wHMRAj4jttZnH3LFv" 278 | }, 279 | { 280 | "__type__": "cc.Node", 281 | "_name": "block", 282 | "_objFlags": 0, 283 | "_parent": { 284 | "__id__": 5 285 | }, 286 | "_children": [], 287 | "_active": true, 288 | "_level": 2, 289 | "_components": [ 290 | { 291 | "__id__": 7 292 | } 293 | ], 294 | "_prefab": null, 295 | "_opacity": 255, 296 | "_color": { 297 | "__type__": "cc.Color", 298 | "r": 153, 299 | "g": 158, 300 | "b": 100, 301 | "a": 255 302 | }, 303 | "_contentSize": { 304 | "__type__": "cc.Size", 305 | "width": 100, 306 | "height": 100 307 | }, 308 | "_anchorPoint": { 309 | "__type__": "cc.Vec2", 310 | "x": 0.5, 311 | "y": 0.5 312 | }, 313 | "_position": { 314 | "__type__": "cc.Vec3", 315 | "x": -257, 316 | "y": 0, 317 | "z": 0 318 | }, 319 | "_scale": { 320 | "__type__": "cc.Vec3", 321 | "x": 1, 322 | "y": 1, 323 | "z": 1 324 | }, 325 | "_rotationX": 0, 326 | "_rotationY": 0, 327 | "_quat": { 328 | "__type__": "cc.Quat", 329 | "x": 0, 330 | "y": 0, 331 | "z": 0, 332 | "w": 1 333 | }, 334 | "_skewX": 0, 335 | "_skewY": 0, 336 | "_zIndex": 0, 337 | "groupIndex": 0, 338 | "_id": "12Qadp41ZDM7TVErAv3rJZ" 339 | }, 340 | { 341 | "__type__": "cc.Sprite", 342 | "_name": "", 343 | "_objFlags": 0, 344 | "node": { 345 | "__id__": 6 346 | }, 347 | "_enabled": true, 348 | "_srcBlendFactor": 770, 349 | "_dstBlendFactor": 771, 350 | "_spriteFrame": { 351 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 352 | }, 353 | "_type": 0, 354 | "_sizeMode": 0, 355 | "_fillType": 0, 356 | "_fillCenter": { 357 | "__type__": "cc.Vec2", 358 | "x": 0, 359 | "y": 0 360 | }, 361 | "_fillStart": 0, 362 | "_fillRange": 0, 363 | "_isTrimmedMode": true, 364 | "_state": 0, 365 | "_atlas": null, 366 | "_id": "a0/mht9w1Jr4dFWxGwHJfg" 367 | }, 368 | { 369 | "__type__": "cc.Sprite", 370 | "_name": "", 371 | "_objFlags": 0, 372 | "node": { 373 | "__id__": 5 374 | }, 375 | "_enabled": true, 376 | "_srcBlendFactor": 770, 377 | "_dstBlendFactor": 771, 378 | "_spriteFrame": { 379 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 380 | }, 381 | "_type": 0, 382 | "_sizeMode": 0, 383 | "_fillType": 0, 384 | "_fillCenter": { 385 | "__type__": "cc.Vec2", 386 | "x": 0, 387 | "y": 0 388 | }, 389 | "_fillStart": 0, 390 | "_fillRange": 0, 391 | "_isTrimmedMode": true, 392 | "_state": 0, 393 | "_atlas": null, 394 | "_id": "7bhz8ujUdBDaAokATHfXud" 395 | }, 396 | { 397 | "__type__": "cc.Canvas", 398 | "_name": "", 399 | "_objFlags": 0, 400 | "node": { 401 | "__id__": 2 402 | }, 403 | "_enabled": true, 404 | "_designResolution": { 405 | "__type__": "cc.Size", 406 | "width": 960, 407 | "height": 640 408 | }, 409 | "_fitWidth": false, 410 | "_fitHeight": true, 411 | "_id": "b4eaUbcbVCR6pis2BRhg7S" 412 | }, 413 | { 414 | "__type__": "566f7HVSEhAj6M/DnIaMvM8", 415 | "_name": "", 416 | "_objFlags": 0, 417 | "node": { 418 | "__id__": 2 419 | }, 420 | "_enabled": true, 421 | "block": { 422 | "__id__": 6 423 | }, 424 | "_id": "0bC5JPP1hGU4b4C+06QXE7" 425 | } 426 | ] -------------------------------------------------------------------------------- /AsyncAction/assets/main.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "fffda585-32f7-4fea-8814-cd3c74001137", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /AsyncAction/assets/script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "7392c9a0-adea-4368-913f-4c89d5257a28", 4 | "isSubpackage": false, 5 | "subpackageName": "", 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /AsyncAction/assets/script/AsyncAction.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: AK-12 3 | * @Date: 2018-12-15 16:11:46 4 | * @Last Modified by: AK-12 5 | * @Last Modified time: 2018-12-15 16:11:46 6 | */ 7 | /** 8 | * AsyncAction 9 | * @param action 10 | */ 11 | export let AsyncAction = (action: cc.Action) => 12 | new Promise(resolve => 13 | new cc.Component().schedule( 14 | () => (action.isDone() ? resolve(action) : null), 15 | cc.director.getDeltaTime() 16 | ) 17 | ) 18 | -------------------------------------------------------------------------------- /AsyncAction/assets/script/AsyncAction.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "e4ac018d-d83a-4624-ac9d-75ac0922be1c", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /AsyncAction/assets/script/main.ts: -------------------------------------------------------------------------------- 1 | import { AsyncAction } from './AsyncAction' 2 | 3 | const { ccclass, property } = cc._decorator 4 | 5 | @ccclass 6 | export default class NewClass extends cc.Component { 7 | @property(cc.Node) 8 | block: cc.Node = null 9 | 10 | start() { 11 | let action = this.block.runAction(cc.moveBy(1.5, cc.v2(500, 0))) 12 | 13 | AsyncAction(action).then(() => (this.block.color = cc.Color.GREEN)) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AsyncAction/assets/script/main.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "566f71d5-4848-408f-a33f-0e721a32f33c", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /AsyncAction/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 | } -------------------------------------------------------------------------------- /AsyncAction/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos-creator-js", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /AsyncAction/settings/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "android-instant": { 3 | "REMOTE_SERVER_ROOT": "", 4 | "host": "", 5 | "pathPattern": "", 6 | "recordPath": "", 7 | "scheme": "https", 8 | "skipRecord": false 9 | }, 10 | "appKey": "", 11 | "appSecret": "", 12 | "encryptJs": true, 13 | "excludeScenes": [], 14 | "fb-instant-games": {}, 15 | "includeAnySDK": false, 16 | "includeSDKBox": false, 17 | "inlineSpriteFrames": true, 18 | "inlineSpriteFrames_native": true, 19 | "jailbreakPlatform": false, 20 | "md5Cache": false, 21 | "mergeStartScene": false, 22 | "oauthLoginServer": "", 23 | "optimizeHotUpdate": false, 24 | "orientation": { 25 | "landscapeLeft": true, 26 | "landscapeRight": true, 27 | "portrait": false, 28 | "upsideDown": false 29 | }, 30 | "packageName": "org.cocos2d.AsyncAction", 31 | "privateKey": "", 32 | "qqplay": { 33 | "REMOTE_SERVER_ROOT": "", 34 | "orientation": "portrait" 35 | }, 36 | "startScene": "fffda585-32f7-4fea-8814-cd3c74001137", 37 | "title": "AsyncAction", 38 | "webOrientation": "auto", 39 | "wechatgame": { 40 | "REMOTE_SERVER_ROOT": "", 41 | "appid": "wx6ac3f5090a6b99c5", 42 | "orientation": "portrait", 43 | "subContext": "" 44 | }, 45 | "xxteaKey": "ccb92818-d20c-4e", 46 | "zipCompressJs": true 47 | } -------------------------------------------------------------------------------- /AsyncAction/settings/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "cocos-analytics": { 3 | "appID": "13798", 4 | "appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2", 5 | "enable": false 6 | }, 7 | "collision-matrix": [ 8 | [ 9 | true 10 | ] 11 | ], 12 | "design-resolution-height": 640, 13 | "design-resolution-width": 960, 14 | "excluded-modules": [], 15 | "facebook": { 16 | "appID": "", 17 | "audience": { 18 | "enable": false 19 | }, 20 | "enable": false, 21 | "live": { 22 | "enable": false 23 | } 24 | }, 25 | "fit-height": true, 26 | "fit-width": false, 27 | "group-list": [ 28 | "default" 29 | ], 30 | "last-module-event-record-time": 1544862238946, 31 | "simulator-orientation": false, 32 | "simulator-resolution": { 33 | "height": 640, 34 | "width": 960 35 | }, 36 | "start-scene": "current", 37 | "use-customize-simulator": false, 38 | "use-project-simulator-setting": false 39 | } -------------------------------------------------------------------------------- /AsyncAction/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "lib": [ "dom", "es5", "es2015.promise" ], 5 | "target": "es5", 6 | "experimentalDecorators": true, 7 | "skipLibCheck": true 8 | }, 9 | "exclude": [ 10 | "node_modules", 11 | "library", 12 | "local", 13 | "temp", 14 | "build", 15 | "settings" 16 | ] 17 | } -------------------------------------------------------------------------------- /CameraIdea/.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/ -------------------------------------------------------------------------------- /CameraIdea/assets/scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "5b274fe3-7bbb-4d6b-8584-c5188ded05c2", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /CameraIdea/assets/scene/CameraIdea.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": "aab0b4ca-a684-46de-a719-928020209938", 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__": 17 63 | } 64 | ], 65 | "_tag": -1, 66 | "_active": true, 67 | "_components": [ 68 | { 69 | "__id__": 40 70 | }, 71 | { 72 | "__id__": 41 73 | } 74 | ], 75 | "_prefab": null, 76 | "_id": "e6F8cvychG3Jh7327ZivtY", 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": 800, 94 | "height": 480 95 | }, 96 | "_rotationX": 0, 97 | "_rotationY": 0, 98 | "_scaleX": 1, 99 | "_scaleY": 1, 100 | "_position": { 101 | "__type__": "cc.Vec2", 102 | "x": 400, 103 | "y": 240 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": "backgroundLayer", 115 | "_objFlags": 0, 116 | "_parent": { 117 | "__id__": 2 118 | }, 119 | "_children": [ 120 | { 121 | "__id__": 4 122 | }, 123 | { 124 | "__id__": 6 125 | }, 126 | { 127 | "__id__": 8 128 | } 129 | ], 130 | "_tag": -1, 131 | "_active": true, 132 | "_components": [], 133 | "_prefab": null, 134 | "_id": "91LRgAfaRLm7gt4DwDbM6/", 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": 0, 152 | "height": 0 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.Node", 172 | "_name": "sprite", 173 | "_objFlags": 0, 174 | "_parent": { 175 | "__id__": 3 176 | }, 177 | "_children": [], 178 | "_tag": -1, 179 | "_active": true, 180 | "_components": [ 181 | { 182 | "__id__": 5 183 | } 184 | ], 185 | "_prefab": null, 186 | "_id": "18Zc8Fip9JwLRkLxEzqucN", 187 | "_opacity": 255, 188 | "_color": { 189 | "__type__": "cc.Color", 190 | "r": 86, 191 | "g": 132, 192 | "b": 182, 193 | "a": 255 194 | }, 195 | "_cascadeOpacityEnabled": true, 196 | "_anchorPoint": { 197 | "__type__": "cc.Vec2", 198 | "x": 0.5, 199 | "y": 0.5 200 | }, 201 | "_contentSize": { 202 | "__type__": "cc.Size", 203 | "width": 2000, 204 | "height": 2000 205 | }, 206 | "_rotationX": 0, 207 | "_rotationY": 0, 208 | "_scaleX": 1, 209 | "_scaleY": 1, 210 | "_position": { 211 | "__type__": "cc.Vec2", 212 | "x": 0, 213 | "y": 0 214 | }, 215 | "_skewX": 0, 216 | "_skewY": 0, 217 | "_localZOrder": 0, 218 | "_globalZOrder": 0, 219 | "_opacityModifyRGB": false, 220 | "groupIndex": 0 221 | }, 222 | { 223 | "__type__": "cc.Sprite", 224 | "_name": "", 225 | "_objFlags": 0, 226 | "node": { 227 | "__id__": 4 228 | }, 229 | "_enabled": true, 230 | "_spriteFrame": { 231 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 232 | }, 233 | "_type": 0, 234 | "_sizeMode": 0, 235 | "_fillType": 0, 236 | "_fillCenter": { 237 | "__type__": "cc.Vec2", 238 | "x": 0, 239 | "y": 0 240 | }, 241 | "_fillStart": 0, 242 | "_fillRange": 0, 243 | "_isTrimmedMode": true, 244 | "_srcBlendFactor": 770, 245 | "_dstBlendFactor": 771, 246 | "_atlas": null 247 | }, 248 | { 249 | "__type__": "cc.Node", 250 | "_name": "New Label", 251 | "_objFlags": 0, 252 | "_parent": { 253 | "__id__": 3 254 | }, 255 | "_children": [], 256 | "_tag": -1, 257 | "_active": true, 258 | "_components": [ 259 | { 260 | "__id__": 7 261 | } 262 | ], 263 | "_prefab": null, 264 | "_id": "29fiiTfKlPMLUXHEmZb7HM", 265 | "_opacity": 255, 266 | "_color": { 267 | "__type__": "cc.Color", 268 | "r": 255, 269 | "g": 255, 270 | "b": 255, 271 | "a": 255 272 | }, 273 | "_cascadeOpacityEnabled": true, 274 | "_anchorPoint": { 275 | "__type__": "cc.Vec2", 276 | "x": 0.5, 277 | "y": 0.5 278 | }, 279 | "_contentSize": { 280 | "__type__": "cc.Size", 281 | "width": 280, 282 | "height": 40 283 | }, 284 | "_rotationX": 0, 285 | "_rotationY": 0, 286 | "_scaleX": 1, 287 | "_scaleY": 1, 288 | "_position": { 289 | "__type__": "cc.Vec2", 290 | "x": 0, 291 | "y": 113 292 | }, 293 | "_skewX": 0, 294 | "_skewY": 0, 295 | "_localZOrder": 0, 296 | "_globalZOrder": 0, 297 | "_opacityModifyRGB": false, 298 | "groupIndex": 0 299 | }, 300 | { 301 | "__type__": "cc.Label", 302 | "_name": "", 303 | "_objFlags": 0, 304 | "node": { 305 | "__id__": 6 306 | }, 307 | "_enabled": true, 308 | "_useOriginalSize": false, 309 | "_actualFontSize": 40, 310 | "_fontSize": 40, 311 | "_lineHeight": 40, 312 | "_enableWrapText": true, 313 | "_N$file": null, 314 | "_isSystemFontUsed": true, 315 | "_spacingX": 0, 316 | "_N$string": "拖动摇杆试试!", 317 | "_N$horizontalAlign": 1, 318 | "_N$verticalAlign": 1, 319 | "_N$fontFamily": "Arial", 320 | "_N$overflow": 0 321 | }, 322 | { 323 | "__type__": "cc.Node", 324 | "_name": "walls", 325 | "_objFlags": 0, 326 | "_parent": { 327 | "__id__": 3 328 | }, 329 | "_children": [ 330 | { 331 | "__id__": 9 332 | }, 333 | { 334 | "__id__": 11 335 | }, 336 | { 337 | "__id__": 13 338 | }, 339 | { 340 | "__id__": 15 341 | } 342 | ], 343 | "_tag": -1, 344 | "_active": true, 345 | "_components": [], 346 | "_prefab": null, 347 | "_id": "9fzMygAr5JW5PKYH/ffO9d", 348 | "_opacity": 255, 349 | "_color": { 350 | "__type__": "cc.Color", 351 | "r": 0, 352 | "g": 0, 353 | "b": 0, 354 | "a": 255 355 | }, 356 | "_cascadeOpacityEnabled": true, 357 | "_anchorPoint": { 358 | "__type__": "cc.Vec2", 359 | "x": 0.5, 360 | "y": 0.5 361 | }, 362 | "_contentSize": { 363 | "__type__": "cc.Size", 364 | "width": 98, 365 | "height": 40 366 | }, 367 | "_rotationX": 0, 368 | "_rotationY": 0, 369 | "_scaleX": 1, 370 | "_scaleY": 1, 371 | "_position": { 372 | "__type__": "cc.Vec2", 373 | "x": 0, 374 | "y": -3 375 | }, 376 | "_skewX": 0, 377 | "_skewY": 0, 378 | "_localZOrder": 0, 379 | "_globalZOrder": 0, 380 | "_opacityModifyRGB": false, 381 | "groupIndex": 0 382 | }, 383 | { 384 | "__type__": "cc.Node", 385 | "_name": "New Sprite(Splash)", 386 | "_objFlags": 0, 387 | "_parent": { 388 | "__id__": 8 389 | }, 390 | "_children": [], 391 | "_tag": -1, 392 | "_active": true, 393 | "_components": [ 394 | { 395 | "__id__": 10 396 | } 397 | ], 398 | "_prefab": null, 399 | "_id": "bfR0qeaVxM2KOkipPypxTc", 400 | "_opacity": 255, 401 | "_color": { 402 | "__type__": "cc.Color", 403 | "r": 255, 404 | "g": 255, 405 | "b": 255, 406 | "a": 255 407 | }, 408 | "_cascadeOpacityEnabled": true, 409 | "_anchorPoint": { 410 | "__type__": "cc.Vec2", 411 | "x": 0.5, 412 | "y": 0.5 413 | }, 414 | "_contentSize": { 415 | "__type__": "cc.Size", 416 | "width": 100, 417 | "height": 480 418 | }, 419 | "_rotationX": 0, 420 | "_rotationY": 0, 421 | "_scaleX": 1, 422 | "_scaleY": 1, 423 | "_position": { 424 | "__type__": "cc.Vec2", 425 | "x": -387, 426 | "y": 187 427 | }, 428 | "_skewX": 0, 429 | "_skewY": 0, 430 | "_localZOrder": 0, 431 | "_globalZOrder": 0, 432 | "_opacityModifyRGB": false, 433 | "groupIndex": 1 434 | }, 435 | { 436 | "__type__": "cc.Sprite", 437 | "_name": "", 438 | "_objFlags": 0, 439 | "node": { 440 | "__id__": 9 441 | }, 442 | "_enabled": true, 443 | "_spriteFrame": { 444 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 445 | }, 446 | "_type": 0, 447 | "_sizeMode": 0, 448 | "_fillType": 0, 449 | "_fillCenter": { 450 | "__type__": "cc.Vec2", 451 | "x": 0, 452 | "y": 0 453 | }, 454 | "_fillStart": 0, 455 | "_fillRange": 0, 456 | "_isTrimmedMode": true, 457 | "_srcBlendFactor": 770, 458 | "_dstBlendFactor": 771, 459 | "_atlas": null 460 | }, 461 | { 462 | "__type__": "cc.Node", 463 | "_name": "New Sprite(Splash)", 464 | "_objFlags": 0, 465 | "_parent": { 466 | "__id__": 8 467 | }, 468 | "_children": [], 469 | "_tag": -1, 470 | "_active": true, 471 | "_components": [ 472 | { 473 | "__id__": 12 474 | } 475 | ], 476 | "_prefab": null, 477 | "_id": "40paxVH1dAEafby8Q8sRNQ", 478 | "_opacity": 255, 479 | "_color": { 480 | "__type__": "cc.Color", 481 | "r": 255, 482 | "g": 255, 483 | "b": 255, 484 | "a": 255 485 | }, 486 | "_cascadeOpacityEnabled": true, 487 | "_anchorPoint": { 488 | "__type__": "cc.Vec2", 489 | "x": 0.5, 490 | "y": 0.5 491 | }, 492 | "_contentSize": { 493 | "__type__": "cc.Size", 494 | "width": 100, 495 | "height": 480 496 | }, 497 | "_rotationX": 0, 498 | "_rotationY": 0, 499 | "_scaleX": 1, 500 | "_scaleY": 1, 501 | "_position": { 502 | "__type__": "cc.Vec2", 503 | "x": 408, 504 | "y": -268 505 | }, 506 | "_skewX": 0, 507 | "_skewY": 0, 508 | "_localZOrder": 0, 509 | "_globalZOrder": 0, 510 | "_opacityModifyRGB": false, 511 | "groupIndex": 1 512 | }, 513 | { 514 | "__type__": "cc.Sprite", 515 | "_name": "", 516 | "_objFlags": 0, 517 | "node": { 518 | "__id__": 11 519 | }, 520 | "_enabled": true, 521 | "_spriteFrame": { 522 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 523 | }, 524 | "_type": 0, 525 | "_sizeMode": 0, 526 | "_fillType": 0, 527 | "_fillCenter": { 528 | "__type__": "cc.Vec2", 529 | "x": 0, 530 | "y": 0 531 | }, 532 | "_fillStart": 0, 533 | "_fillRange": 0, 534 | "_isTrimmedMode": true, 535 | "_srcBlendFactor": 770, 536 | "_dstBlendFactor": 771, 537 | "_atlas": null 538 | }, 539 | { 540 | "__type__": "cc.Node", 541 | "_name": "New Sprite(Splash)", 542 | "_objFlags": 0, 543 | "_parent": { 544 | "__id__": 8 545 | }, 546 | "_children": [], 547 | "_tag": -1, 548 | "_active": true, 549 | "_components": [ 550 | { 551 | "__id__": 14 552 | } 553 | ], 554 | "_prefab": null, 555 | "_id": "c300MBZl1BHZ24hHF7e/+A", 556 | "_opacity": 255, 557 | "_color": { 558 | "__type__": "cc.Color", 559 | "r": 255, 560 | "g": 255, 561 | "b": 255, 562 | "a": 255 563 | }, 564 | "_cascadeOpacityEnabled": true, 565 | "_anchorPoint": { 566 | "__type__": "cc.Vec2", 567 | "x": 0.5, 568 | "y": 0.5 569 | }, 570 | "_contentSize": { 571 | "__type__": "cc.Size", 572 | "width": 800, 573 | "height": 100 574 | }, 575 | "_rotationX": 0, 576 | "_rotationY": 0, 577 | "_scaleX": 1, 578 | "_scaleY": 1, 579 | "_position": { 580 | "__type__": "cc.Vec2", 581 | "x": 259, 582 | "y": 219 583 | }, 584 | "_skewX": 0, 585 | "_skewY": 0, 586 | "_localZOrder": 0, 587 | "_globalZOrder": 0, 588 | "_opacityModifyRGB": false, 589 | "groupIndex": 1 590 | }, 591 | { 592 | "__type__": "cc.Sprite", 593 | "_name": "", 594 | "_objFlags": 0, 595 | "node": { 596 | "__id__": 13 597 | }, 598 | "_enabled": true, 599 | "_spriteFrame": { 600 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 601 | }, 602 | "_type": 0, 603 | "_sizeMode": 0, 604 | "_fillType": 0, 605 | "_fillCenter": { 606 | "__type__": "cc.Vec2", 607 | "x": 0, 608 | "y": 0 609 | }, 610 | "_fillStart": 0, 611 | "_fillRange": 0, 612 | "_isTrimmedMode": true, 613 | "_srcBlendFactor": 770, 614 | "_dstBlendFactor": 771, 615 | "_atlas": null 616 | }, 617 | { 618 | "__type__": "cc.Node", 619 | "_name": "New Sprite(Splash)", 620 | "_objFlags": 0, 621 | "_parent": { 622 | "__id__": 8 623 | }, 624 | "_children": [], 625 | "_tag": -1, 626 | "_active": true, 627 | "_components": [ 628 | { 629 | "__id__": 16 630 | } 631 | ], 632 | "_prefab": null, 633 | "_id": "6dXAmNr8VKEpJ/9+vtbaji", 634 | "_opacity": 255, 635 | "_color": { 636 | "__type__": "cc.Color", 637 | "r": 255, 638 | "g": 255, 639 | "b": 255, 640 | "a": 255 641 | }, 642 | "_cascadeOpacityEnabled": true, 643 | "_anchorPoint": { 644 | "__type__": "cc.Vec2", 645 | "x": 0.5, 646 | "y": 0.5 647 | }, 648 | "_contentSize": { 649 | "__type__": "cc.Size", 650 | "width": 800, 651 | "height": 100 652 | }, 653 | "_rotationX": 0, 654 | "_rotationY": 0, 655 | "_scaleX": 1, 656 | "_scaleY": 1, 657 | "_position": { 658 | "__type__": "cc.Vec2", 659 | "x": -158, 660 | "y": -266 661 | }, 662 | "_skewX": 0, 663 | "_skewY": 0, 664 | "_localZOrder": 0, 665 | "_globalZOrder": 0, 666 | "_opacityModifyRGB": false, 667 | "groupIndex": 1 668 | }, 669 | { 670 | "__type__": "cc.Sprite", 671 | "_name": "", 672 | "_objFlags": 0, 673 | "node": { 674 | "__id__": 15 675 | }, 676 | "_enabled": true, 677 | "_spriteFrame": { 678 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 679 | }, 680 | "_type": 0, 681 | "_sizeMode": 0, 682 | "_fillType": 0, 683 | "_fillCenter": { 684 | "__type__": "cc.Vec2", 685 | "x": 0, 686 | "y": 0 687 | }, 688 | "_fillStart": 0, 689 | "_fillRange": 0, 690 | "_isTrimmedMode": true, 691 | "_srcBlendFactor": 770, 692 | "_dstBlendFactor": 771, 693 | "_atlas": null 694 | }, 695 | { 696 | "__type__": "cc.Node", 697 | "_name": "uiLayer", 698 | "_objFlags": 0, 699 | "_parent": { 700 | "__id__": 2 701 | }, 702 | "_children": [ 703 | { 704 | "__id__": 18 705 | }, 706 | { 707 | "__id__": 24 708 | }, 709 | { 710 | "__id__": 36 711 | } 712 | ], 713 | "_tag": -1, 714 | "_active": true, 715 | "_components": [], 716 | "_prefab": null, 717 | "_id": "c6Gn9hRABLIbrydht0o3Y+", 718 | "_opacity": 255, 719 | "_color": { 720 | "__type__": "cc.Color", 721 | "r": 255, 722 | "g": 255, 723 | "b": 255, 724 | "a": 255 725 | }, 726 | "_cascadeOpacityEnabled": true, 727 | "_anchorPoint": { 728 | "__type__": "cc.Vec2", 729 | "x": 0.5, 730 | "y": 0.5 731 | }, 732 | "_contentSize": { 733 | "__type__": "cc.Size", 734 | "width": 0, 735 | "height": 0 736 | }, 737 | "_rotationX": 0, 738 | "_rotationY": 0, 739 | "_scaleX": 1, 740 | "_scaleY": 1, 741 | "_position": { 742 | "__type__": "cc.Vec2", 743 | "x": 0, 744 | "y": 0 745 | }, 746 | "_skewX": 0, 747 | "_skewY": 0, 748 | "_localZOrder": 0, 749 | "_globalZOrder": 0, 750 | "_opacityModifyRGB": false, 751 | "groupIndex": 0 752 | }, 753 | { 754 | "__type__": "cc.Node", 755 | "_name": "menuUI", 756 | "_objFlags": 0, 757 | "_parent": { 758 | "__id__": 17 759 | }, 760 | "_children": [ 761 | { 762 | "__id__": 19 763 | } 764 | ], 765 | "_tag": -1, 766 | "_active": true, 767 | "_components": [], 768 | "_prefab": null, 769 | "_id": "5cBCkKW/hELp7DDQKcVyLw", 770 | "_opacity": 255, 771 | "_color": { 772 | "__type__": "cc.Color", 773 | "r": 255, 774 | "g": 255, 775 | "b": 255, 776 | "a": 255 777 | }, 778 | "_cascadeOpacityEnabled": true, 779 | "_anchorPoint": { 780 | "__type__": "cc.Vec2", 781 | "x": 0.5, 782 | "y": 0.5 783 | }, 784 | "_contentSize": { 785 | "__type__": "cc.Size", 786 | "width": 0, 787 | "height": 0 788 | }, 789 | "_rotationX": 0, 790 | "_rotationY": 0, 791 | "_scaleX": 1, 792 | "_scaleY": 1, 793 | "_position": { 794 | "__type__": "cc.Vec2", 795 | "x": 0, 796 | "y": 0 797 | }, 798 | "_skewX": 0, 799 | "_skewY": 0, 800 | "_localZOrder": 0, 801 | "_globalZOrder": 0, 802 | "_opacityModifyRGB": false, 803 | "groupIndex": 0 804 | }, 805 | { 806 | "__type__": "cc.Node", 807 | "_name": "New Button", 808 | "_objFlags": 0, 809 | "_parent": { 810 | "__id__": 18 811 | }, 812 | "_children": [ 813 | { 814 | "__id__": 20 815 | } 816 | ], 817 | "_tag": -1, 818 | "_active": true, 819 | "_components": [ 820 | { 821 | "__id__": 22 822 | }, 823 | { 824 | "__id__": 23 825 | } 826 | ], 827 | "_prefab": null, 828 | "_id": "3a5d1LcxFHVYa9g5BEX4Q9", 829 | "_opacity": 255, 830 | "_color": { 831 | "__type__": "cc.Color", 832 | "r": 255, 833 | "g": 255, 834 | "b": 255, 835 | "a": 255 836 | }, 837 | "_cascadeOpacityEnabled": true, 838 | "_anchorPoint": { 839 | "__type__": "cc.Vec2", 840 | "x": 0.5, 841 | "y": 0.5 842 | }, 843 | "_contentSize": { 844 | "__type__": "cc.Size", 845 | "width": 100, 846 | "height": 40 847 | }, 848 | "_rotationX": 0, 849 | "_rotationY": 0, 850 | "_scaleX": 1, 851 | "_scaleY": 1, 852 | "_position": { 853 | "__type__": "cc.Vec2", 854 | "x": -314, 855 | "y": 192 856 | }, 857 | "_skewX": 0, 858 | "_skewY": 0, 859 | "_localZOrder": 0, 860 | "_globalZOrder": 0, 861 | "_opacityModifyRGB": false, 862 | "groupIndex": 0 863 | }, 864 | { 865 | "__type__": "cc.Node", 866 | "_name": "Label", 867 | "_objFlags": 0, 868 | "_parent": { 869 | "__id__": 19 870 | }, 871 | "_children": [], 872 | "_tag": -1, 873 | "_active": true, 874 | "_components": [ 875 | { 876 | "__id__": 21 877 | } 878 | ], 879 | "_prefab": null, 880 | "_id": "dcMCwci6BIoZLPA8RDvWHs", 881 | "_opacity": 255, 882 | "_color": { 883 | "__type__": "cc.Color", 884 | "r": 0, 885 | "g": 0, 886 | "b": 0, 887 | "a": 255 888 | }, 889 | "_cascadeOpacityEnabled": true, 890 | "_anchorPoint": { 891 | "__type__": "cc.Vec2", 892 | "x": 0.5, 893 | "y": 0.5 894 | }, 895 | "_contentSize": { 896 | "__type__": "cc.Size", 897 | "width": 100, 898 | "height": 40 899 | }, 900 | "_rotationX": 0, 901 | "_rotationY": 0, 902 | "_scaleX": 1, 903 | "_scaleY": 1, 904 | "_position": { 905 | "__type__": "cc.Vec2", 906 | "x": 0, 907 | "y": 0 908 | }, 909 | "_skewX": 0, 910 | "_skewY": 0, 911 | "_localZOrder": 0, 912 | "_globalZOrder": 0, 913 | "_opacityModifyRGB": false, 914 | "groupIndex": 0 915 | }, 916 | { 917 | "__type__": "cc.Label", 918 | "_name": "", 919 | "_objFlags": 0, 920 | "node": { 921 | "__id__": 20 922 | }, 923 | "_enabled": true, 924 | "_useOriginalSize": false, 925 | "_actualFontSize": 40, 926 | "_fontSize": 20, 927 | "_lineHeight": 40, 928 | "_enableWrapText": false, 929 | "_N$file": null, 930 | "_isSystemFontUsed": true, 931 | "_spacingX": 0, 932 | "_N$string": "button", 933 | "_N$horizontalAlign": 1, 934 | "_N$verticalAlign": 1, 935 | "_N$fontFamily": "Arial", 936 | "_N$overflow": 1 937 | }, 938 | { 939 | "__type__": "cc.Sprite", 940 | "_name": "", 941 | "_objFlags": 0, 942 | "node": { 943 | "__id__": 19 944 | }, 945 | "_enabled": true, 946 | "_spriteFrame": { 947 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 948 | }, 949 | "_type": 1, 950 | "_sizeMode": 0, 951 | "_fillType": 0, 952 | "_fillCenter": { 953 | "__type__": "cc.Vec2", 954 | "x": 0, 955 | "y": 0 956 | }, 957 | "_fillStart": 0, 958 | "_fillRange": 0, 959 | "_isTrimmedMode": true, 960 | "_srcBlendFactor": 770, 961 | "_dstBlendFactor": 771, 962 | "_atlas": null 963 | }, 964 | { 965 | "__type__": "cc.Button", 966 | "_name": "", 967 | "_objFlags": 0, 968 | "node": { 969 | "__id__": 19 970 | }, 971 | "_enabled": true, 972 | "transition": 2, 973 | "pressedColor": { 974 | "__type__": "cc.Color", 975 | "r": 255, 976 | "g": 255, 977 | "b": 255, 978 | "a": 255 979 | }, 980 | "hoverColor": { 981 | "__type__": "cc.Color", 982 | "r": 255, 983 | "g": 255, 984 | "b": 255, 985 | "a": 255 986 | }, 987 | "duration": 0.1, 988 | "zoomScale": 1.2, 989 | "clickEvents": [], 990 | "_N$interactable": true, 991 | "_N$enableAutoGrayEffect": false, 992 | "_N$normalColor": { 993 | "__type__": "cc.Color", 994 | "r": 255, 995 | "g": 255, 996 | "b": 255, 997 | "a": 255 998 | }, 999 | "_N$disabledColor": { 1000 | "__type__": "cc.Color", 1001 | "r": 255, 1002 | "g": 255, 1003 | "b": 255, 1004 | "a": 255 1005 | }, 1006 | "_N$normalSprite": { 1007 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1008 | }, 1009 | "_N$pressedSprite": { 1010 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1011 | }, 1012 | "pressedSprite": { 1013 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1014 | }, 1015 | "_N$hoverSprite": { 1016 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1017 | }, 1018 | "hoverSprite": { 1019 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1020 | }, 1021 | "_N$disabledSprite": { 1022 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 1023 | }, 1024 | "_N$target": { 1025 | "__id__": 19 1026 | } 1027 | }, 1028 | { 1029 | "__type__": "cc.Node", 1030 | "_name": "ctrlUI", 1031 | "_objFlags": 0, 1032 | "_parent": { 1033 | "__id__": 17 1034 | }, 1035 | "_children": [ 1036 | { 1037 | "__id__": 25 1038 | }, 1039 | { 1040 | "__id__": 30 1041 | } 1042 | ], 1043 | "_tag": -1, 1044 | "_active": true, 1045 | "_components": [], 1046 | "_prefab": null, 1047 | "_id": "105+roHmBE6ae5kDeDM3TN", 1048 | "_opacity": 255, 1049 | "_color": { 1050 | "__type__": "cc.Color", 1051 | "r": 255, 1052 | "g": 255, 1053 | "b": 255, 1054 | "a": 255 1055 | }, 1056 | "_cascadeOpacityEnabled": true, 1057 | "_anchorPoint": { 1058 | "__type__": "cc.Vec2", 1059 | "x": 0.5, 1060 | "y": 0.5 1061 | }, 1062 | "_contentSize": { 1063 | "__type__": "cc.Size", 1064 | "width": 0, 1065 | "height": 0 1066 | }, 1067 | "_rotationX": 0, 1068 | "_rotationY": 0, 1069 | "_scaleX": 1, 1070 | "_scaleY": 1, 1071 | "_position": { 1072 | "__type__": "cc.Vec2", 1073 | "x": 0, 1074 | "y": 0 1075 | }, 1076 | "_skewX": 0, 1077 | "_skewY": 0, 1078 | "_localZOrder": 0, 1079 | "_globalZOrder": 0, 1080 | "_opacityModifyRGB": false, 1081 | "groupIndex": 0 1082 | }, 1083 | { 1084 | "__type__": "cc.Node", 1085 | "_name": "moveUI", 1086 | "_objFlags": 0, 1087 | "_parent": { 1088 | "__id__": 24 1089 | }, 1090 | "_children": [ 1091 | { 1092 | "__id__": 26 1093 | } 1094 | ], 1095 | "_tag": -1, 1096 | "_active": true, 1097 | "_components": [], 1098 | "_prefab": null, 1099 | "_id": "a6mThb2wJLro0rqHCOZLwD", 1100 | "_opacity": 255, 1101 | "_color": { 1102 | "__type__": "cc.Color", 1103 | "r": 255, 1104 | "g": 255, 1105 | "b": 255, 1106 | "a": 255 1107 | }, 1108 | "_cascadeOpacityEnabled": true, 1109 | "_anchorPoint": { 1110 | "__type__": "cc.Vec2", 1111 | "x": 0.5, 1112 | "y": 0.5 1113 | }, 1114 | "_contentSize": { 1115 | "__type__": "cc.Size", 1116 | "width": 0, 1117 | "height": 0 1118 | }, 1119 | "_rotationX": 0, 1120 | "_rotationY": 0, 1121 | "_scaleX": 1.42, 1122 | "_scaleY": 1.42, 1123 | "_position": { 1124 | "__type__": "cc.Vec2", 1125 | "x": 109, 1126 | "y": -120 1127 | }, 1128 | "_skewX": 0, 1129 | "_skewY": 0, 1130 | "_localZOrder": 0, 1131 | "_globalZOrder": 0, 1132 | "_opacityModifyRGB": false, 1133 | "groupIndex": 0 1134 | }, 1135 | { 1136 | "__type__": "cc.Node", 1137 | "_name": "basic", 1138 | "_objFlags": 0, 1139 | "_parent": { 1140 | "__id__": 25 1141 | }, 1142 | "_children": [ 1143 | { 1144 | "__id__": 27 1145 | } 1146 | ], 1147 | "_tag": -1, 1148 | "_active": true, 1149 | "_components": [ 1150 | { 1151 | "__id__": 29 1152 | } 1153 | ], 1154 | "_prefab": null, 1155 | "_id": "73dWVFobJAopSsfyqbG1Fl", 1156 | "_opacity": 255, 1157 | "_color": { 1158 | "__type__": "cc.Color", 1159 | "r": 219, 1160 | "g": 213, 1161 | "b": 213, 1162 | "a": 255 1163 | }, 1164 | "_cascadeOpacityEnabled": true, 1165 | "_anchorPoint": { 1166 | "__type__": "cc.Vec2", 1167 | "x": 0.5, 1168 | "y": 0.5 1169 | }, 1170 | "_contentSize": { 1171 | "__type__": "cc.Size", 1172 | "width": 100, 1173 | "height": 100 1174 | }, 1175 | "_rotationX": 0, 1176 | "_rotationY": 0, 1177 | "_scaleX": 1, 1178 | "_scaleY": 1, 1179 | "_position": { 1180 | "__type__": "cc.Vec2", 1181 | "x": -268, 1182 | "y": 0 1183 | }, 1184 | "_skewX": 0, 1185 | "_skewY": 0, 1186 | "_localZOrder": 0, 1187 | "_globalZOrder": 0, 1188 | "_opacityModifyRGB": false, 1189 | "groupIndex": 0 1190 | }, 1191 | { 1192 | "__type__": "cc.Node", 1193 | "_name": "touch", 1194 | "_objFlags": 0, 1195 | "_parent": { 1196 | "__id__": 26 1197 | }, 1198 | "_children": [], 1199 | "_tag": -1, 1200 | "_active": true, 1201 | "_components": [ 1202 | { 1203 | "__id__": 28 1204 | } 1205 | ], 1206 | "_prefab": null, 1207 | "_id": "7c8kkesahO/rBiKcPz61EZ", 1208 | "_opacity": 255, 1209 | "_color": { 1210 | "__type__": "cc.Color", 1211 | "r": 0, 1212 | "g": 0, 1213 | "b": 0, 1214 | "a": 255 1215 | }, 1216 | "_cascadeOpacityEnabled": true, 1217 | "_anchorPoint": { 1218 | "__type__": "cc.Vec2", 1219 | "x": 0.5, 1220 | "y": 0.5 1221 | }, 1222 | "_contentSize": { 1223 | "__type__": "cc.Size", 1224 | "width": 60, 1225 | "height": 60 1226 | }, 1227 | "_rotationX": 0, 1228 | "_rotationY": 0, 1229 | "_scaleX": 0.84, 1230 | "_scaleY": 0.84, 1231 | "_position": { 1232 | "__type__": "cc.Vec2", 1233 | "x": 0, 1234 | "y": 0 1235 | }, 1236 | "_skewX": 0, 1237 | "_skewY": 0, 1238 | "_localZOrder": 0, 1239 | "_globalZOrder": 0, 1240 | "_opacityModifyRGB": false, 1241 | "groupIndex": 0 1242 | }, 1243 | { 1244 | "__type__": "cc.Sprite", 1245 | "_name": "", 1246 | "_objFlags": 0, 1247 | "node": { 1248 | "__id__": 27 1249 | }, 1250 | "_enabled": true, 1251 | "_spriteFrame": { 1252 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 1253 | }, 1254 | "_type": 0, 1255 | "_sizeMode": 0, 1256 | "_fillType": 0, 1257 | "_fillCenter": { 1258 | "__type__": "cc.Vec2", 1259 | "x": 0, 1260 | "y": 0 1261 | }, 1262 | "_fillStart": 0, 1263 | "_fillRange": 0, 1264 | "_isTrimmedMode": true, 1265 | "_srcBlendFactor": 770, 1266 | "_dstBlendFactor": 771, 1267 | "_atlas": null 1268 | }, 1269 | { 1270 | "__type__": "cc.Sprite", 1271 | "_name": "", 1272 | "_objFlags": 0, 1273 | "node": { 1274 | "__id__": 26 1275 | }, 1276 | "_enabled": true, 1277 | "_spriteFrame": { 1278 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 1279 | }, 1280 | "_type": 0, 1281 | "_sizeMode": 0, 1282 | "_fillType": 0, 1283 | "_fillCenter": { 1284 | "__type__": "cc.Vec2", 1285 | "x": 0, 1286 | "y": 0 1287 | }, 1288 | "_fillStart": 0, 1289 | "_fillRange": 0, 1290 | "_isTrimmedMode": true, 1291 | "_srcBlendFactor": 770, 1292 | "_dstBlendFactor": 771, 1293 | "_atlas": null 1294 | }, 1295 | { 1296 | "__type__": "cc.Node", 1297 | "_name": "powerUI", 1298 | "_objFlags": 0, 1299 | "_parent": { 1300 | "__id__": 24 1301 | }, 1302 | "_children": [ 1303 | { 1304 | "__id__": 31 1305 | } 1306 | ], 1307 | "_tag": -1, 1308 | "_active": true, 1309 | "_components": [], 1310 | "_prefab": null, 1311 | "_id": "8dfhS5IdFK3ZBMgKSZ+qXv", 1312 | "_opacity": 255, 1313 | "_color": { 1314 | "__type__": "cc.Color", 1315 | "r": 255, 1316 | "g": 255, 1317 | "b": 255, 1318 | "a": 255 1319 | }, 1320 | "_cascadeOpacityEnabled": true, 1321 | "_anchorPoint": { 1322 | "__type__": "cc.Vec2", 1323 | "x": 0.5, 1324 | "y": 0.5 1325 | }, 1326 | "_contentSize": { 1327 | "__type__": "cc.Size", 1328 | "width": 0, 1329 | "height": 0 1330 | }, 1331 | "_rotationX": 0, 1332 | "_rotationY": 0, 1333 | "_scaleX": 1, 1334 | "_scaleY": 1, 1335 | "_position": { 1336 | "__type__": "cc.Vec2", 1337 | "x": 229, 1338 | "y": -167 1339 | }, 1340 | "_skewX": 0, 1341 | "_skewY": 0, 1342 | "_localZOrder": 0, 1343 | "_globalZOrder": 0, 1344 | "_opacityModifyRGB": false, 1345 | "groupIndex": 0 1346 | }, 1347 | { 1348 | "__type__": "cc.Node", 1349 | "_name": "New Button", 1350 | "_objFlags": 0, 1351 | "_parent": { 1352 | "__id__": 30 1353 | }, 1354 | "_children": [ 1355 | { 1356 | "__id__": 32 1357 | } 1358 | ], 1359 | "_tag": -1, 1360 | "_active": true, 1361 | "_components": [ 1362 | { 1363 | "__id__": 34 1364 | }, 1365 | { 1366 | "__id__": 35 1367 | } 1368 | ], 1369 | "_prefab": null, 1370 | "_id": "0evUns8/dEk7Z267SL9Nkd", 1371 | "_opacity": 255, 1372 | "_color": { 1373 | "__type__": "cc.Color", 1374 | "r": 255, 1375 | "g": 255, 1376 | "b": 255, 1377 | "a": 255 1378 | }, 1379 | "_cascadeOpacityEnabled": true, 1380 | "_anchorPoint": { 1381 | "__type__": "cc.Vec2", 1382 | "x": 0.5, 1383 | "y": 0.5 1384 | }, 1385 | "_contentSize": { 1386 | "__type__": "cc.Size", 1387 | "width": 100, 1388 | "height": 40 1389 | }, 1390 | "_rotationX": 0, 1391 | "_rotationY": 0, 1392 | "_scaleX": 1, 1393 | "_scaleY": 1, 1394 | "_position": { 1395 | "__type__": "cc.Vec2", 1396 | "x": 28, 1397 | "y": 0 1398 | }, 1399 | "_skewX": 0, 1400 | "_skewY": 0, 1401 | "_localZOrder": 0, 1402 | "_globalZOrder": 0, 1403 | "_opacityModifyRGB": false, 1404 | "groupIndex": 0 1405 | }, 1406 | { 1407 | "__type__": "cc.Node", 1408 | "_name": "Label", 1409 | "_objFlags": 0, 1410 | "_parent": { 1411 | "__id__": 31 1412 | }, 1413 | "_children": [], 1414 | "_tag": -1, 1415 | "_active": true, 1416 | "_components": [ 1417 | { 1418 | "__id__": 33 1419 | } 1420 | ], 1421 | "_prefab": null, 1422 | "_id": "314MMNtrFNfKkOQn0/ryBk", 1423 | "_opacity": 255, 1424 | "_color": { 1425 | "__type__": "cc.Color", 1426 | "r": 0, 1427 | "g": 0, 1428 | "b": 0, 1429 | "a": 255 1430 | }, 1431 | "_cascadeOpacityEnabled": true, 1432 | "_anchorPoint": { 1433 | "__type__": "cc.Vec2", 1434 | "x": 0.5, 1435 | "y": 0.5 1436 | }, 1437 | "_contentSize": { 1438 | "__type__": "cc.Size", 1439 | "width": 100, 1440 | "height": 40 1441 | }, 1442 | "_rotationX": 0, 1443 | "_rotationY": 0, 1444 | "_scaleX": 1, 1445 | "_scaleY": 1, 1446 | "_position": { 1447 | "__type__": "cc.Vec2", 1448 | "x": 0, 1449 | "y": 0 1450 | }, 1451 | "_skewX": 0, 1452 | "_skewY": 0, 1453 | "_localZOrder": 0, 1454 | "_globalZOrder": 0, 1455 | "_opacityModifyRGB": false, 1456 | "groupIndex": 0 1457 | }, 1458 | { 1459 | "__type__": "cc.Label", 1460 | "_name": "", 1461 | "_objFlags": 0, 1462 | "node": { 1463 | "__id__": 32 1464 | }, 1465 | "_enabled": true, 1466 | "_useOriginalSize": false, 1467 | "_actualFontSize": 40, 1468 | "_fontSize": 20, 1469 | "_lineHeight": 40, 1470 | "_enableWrapText": false, 1471 | "_N$file": null, 1472 | "_isSystemFontUsed": true, 1473 | "_spacingX": 0, 1474 | "_N$string": "button", 1475 | "_N$horizontalAlign": 1, 1476 | "_N$verticalAlign": 1, 1477 | "_N$fontFamily": "Arial", 1478 | "_N$overflow": 1 1479 | }, 1480 | { 1481 | "__type__": "cc.Sprite", 1482 | "_name": "", 1483 | "_objFlags": 0, 1484 | "node": { 1485 | "__id__": 31 1486 | }, 1487 | "_enabled": true, 1488 | "_spriteFrame": { 1489 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1490 | }, 1491 | "_type": 1, 1492 | "_sizeMode": 0, 1493 | "_fillType": 0, 1494 | "_fillCenter": { 1495 | "__type__": "cc.Vec2", 1496 | "x": 0, 1497 | "y": 0 1498 | }, 1499 | "_fillStart": 0, 1500 | "_fillRange": 0, 1501 | "_isTrimmedMode": true, 1502 | "_srcBlendFactor": 770, 1503 | "_dstBlendFactor": 771, 1504 | "_atlas": null 1505 | }, 1506 | { 1507 | "__type__": "cc.Button", 1508 | "_name": "", 1509 | "_objFlags": 0, 1510 | "node": { 1511 | "__id__": 31 1512 | }, 1513 | "_enabled": true, 1514 | "transition": 2, 1515 | "pressedColor": { 1516 | "__type__": "cc.Color", 1517 | "r": 255, 1518 | "g": 255, 1519 | "b": 255, 1520 | "a": 255 1521 | }, 1522 | "hoverColor": { 1523 | "__type__": "cc.Color", 1524 | "r": 255, 1525 | "g": 255, 1526 | "b": 255, 1527 | "a": 255 1528 | }, 1529 | "duration": 0.1, 1530 | "zoomScale": 1.2, 1531 | "clickEvents": [], 1532 | "_N$interactable": true, 1533 | "_N$enableAutoGrayEffect": false, 1534 | "_N$normalColor": { 1535 | "__type__": "cc.Color", 1536 | "r": 255, 1537 | "g": 255, 1538 | "b": 255, 1539 | "a": 255 1540 | }, 1541 | "_N$disabledColor": { 1542 | "__type__": "cc.Color", 1543 | "r": 255, 1544 | "g": 255, 1545 | "b": 255, 1546 | "a": 255 1547 | }, 1548 | "_N$normalSprite": { 1549 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1550 | }, 1551 | "_N$pressedSprite": { 1552 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1553 | }, 1554 | "pressedSprite": { 1555 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1556 | }, 1557 | "_N$hoverSprite": { 1558 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1559 | }, 1560 | "hoverSprite": { 1561 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1562 | }, 1563 | "_N$disabledSprite": { 1564 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 1565 | }, 1566 | "_N$target": { 1567 | "__id__": 31 1568 | } 1569 | }, 1570 | { 1571 | "__type__": "cc.Node", 1572 | "_name": "hero", 1573 | "_objFlags": 0, 1574 | "_parent": { 1575 | "__id__": 17 1576 | }, 1577 | "_children": [ 1578 | { 1579 | "__id__": 37 1580 | } 1581 | ], 1582 | "_tag": -1, 1583 | "_active": true, 1584 | "_components": [ 1585 | { 1586 | "__id__": 39 1587 | } 1588 | ], 1589 | "_prefab": null, 1590 | "_id": "46BwAN8upLzrQvFmWAlwDK", 1591 | "_opacity": 255, 1592 | "_color": { 1593 | "__type__": "cc.Color", 1594 | "r": 255, 1595 | "g": 255, 1596 | "b": 255, 1597 | "a": 255 1598 | }, 1599 | "_cascadeOpacityEnabled": true, 1600 | "_anchorPoint": { 1601 | "__type__": "cc.Vec2", 1602 | "x": 0.5, 1603 | "y": 0.5 1604 | }, 1605 | "_contentSize": { 1606 | "__type__": "cc.Size", 1607 | "width": 0, 1608 | "height": 0 1609 | }, 1610 | "_rotationX": 0, 1611 | "_rotationY": 0, 1612 | "_scaleX": 1, 1613 | "_scaleY": 1, 1614 | "_position": { 1615 | "__type__": "cc.Vec2", 1616 | "x": 0, 1617 | "y": 0 1618 | }, 1619 | "_skewX": 0, 1620 | "_skewY": 0, 1621 | "_localZOrder": 0, 1622 | "_globalZOrder": 0, 1623 | "_opacityModifyRGB": false, 1624 | "groupIndex": 0 1625 | }, 1626 | { 1627 | "__type__": "cc.Node", 1628 | "_name": "spriteHero", 1629 | "_objFlags": 0, 1630 | "_parent": { 1631 | "__id__": 36 1632 | }, 1633 | "_children": [], 1634 | "_tag": -1, 1635 | "_active": true, 1636 | "_components": [ 1637 | { 1638 | "__id__": 38 1639 | } 1640 | ], 1641 | "_prefab": null, 1642 | "_id": "2bDXA1EMhCI66GMcszGCEx", 1643 | "_opacity": 255, 1644 | "_color": { 1645 | "__type__": "cc.Color", 1646 | "r": 255, 1647 | "g": 0, 1648 | "b": 0, 1649 | "a": 255 1650 | }, 1651 | "_cascadeOpacityEnabled": true, 1652 | "_anchorPoint": { 1653 | "__type__": "cc.Vec2", 1654 | "x": 0.5, 1655 | "y": 0.5 1656 | }, 1657 | "_contentSize": { 1658 | "__type__": "cc.Size", 1659 | "width": 100, 1660 | "height": 100 1661 | }, 1662 | "_rotationX": 0, 1663 | "_rotationY": 0, 1664 | "_scaleX": 1, 1665 | "_scaleY": 1, 1666 | "_position": { 1667 | "__type__": "cc.Vec2", 1668 | "x": 0, 1669 | "y": 0 1670 | }, 1671 | "_skewX": 0, 1672 | "_skewY": 0, 1673 | "_localZOrder": 0, 1674 | "_globalZOrder": 0, 1675 | "_opacityModifyRGB": false, 1676 | "groupIndex": 0 1677 | }, 1678 | { 1679 | "__type__": "cc.Sprite", 1680 | "_name": "", 1681 | "_objFlags": 0, 1682 | "node": { 1683 | "__id__": 37 1684 | }, 1685 | "_enabled": true, 1686 | "_spriteFrame": { 1687 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 1688 | }, 1689 | "_type": 0, 1690 | "_sizeMode": 0, 1691 | "_fillType": 0, 1692 | "_fillCenter": { 1693 | "__type__": "cc.Vec2", 1694 | "x": 0, 1695 | "y": 0 1696 | }, 1697 | "_fillStart": 0, 1698 | "_fillRange": 0, 1699 | "_isTrimmedMode": true, 1700 | "_srcBlendFactor": 770, 1701 | "_dstBlendFactor": 771, 1702 | "_atlas": null 1703 | }, 1704 | { 1705 | "__type__": "383af4r6/1DeIuRp8S9sgk8", 1706 | "_name": "", 1707 | "_objFlags": 0, 1708 | "node": { 1709 | "__id__": 36 1710 | }, 1711 | "_enabled": true 1712 | }, 1713 | { 1714 | "__type__": "cc.Canvas", 1715 | "_name": "", 1716 | "_objFlags": 0, 1717 | "node": { 1718 | "__id__": 2 1719 | }, 1720 | "_enabled": true, 1721 | "_designResolution": { 1722 | "__type__": "cc.Size", 1723 | "width": 800, 1724 | "height": 480 1725 | }, 1726 | "_fitWidth": false, 1727 | "_fitHeight": true 1728 | }, 1729 | { 1730 | "__type__": "f59a4UDPihE5aSfO1bN7IDY", 1731 | "_name": "", 1732 | "_objFlags": 0, 1733 | "node": { 1734 | "__id__": 2 1735 | }, 1736 | "_enabled": true, 1737 | "backgroundLayer": { 1738 | "__id__": 3 1739 | }, 1740 | "basic": { 1741 | "__id__": 29 1742 | }, 1743 | "touch": { 1744 | "__id__": 28 1745 | }, 1746 | "hero": { 1747 | "__id__": 36 1748 | } 1749 | } 1750 | ] -------------------------------------------------------------------------------- /CameraIdea/assets/scene/CameraIdea.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "aab0b4ca-a684-46de-a719-928020209938", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /CameraIdea/assets/script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "8d29da16-9997-4ddd-a998-03e0f25ea626", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /CameraIdea/assets/script/CameraIdea.js: -------------------------------------------------------------------------------- 1 | var MoveCtrllor = require("MoveCtrllor") 2 | 3 | cc.Class({ 4 | extends: cc.Component, 5 | 6 | properties: { 7 | //backgroundLayer 8 | backgroundLayer:cc.Node, 9 | //uiLayer 10 | basic:cc.Sprite, 11 | touch:cc.Sprite, 12 | hero:cc.Node, 13 | }, 14 | 15 | // LIFE-CYCLE CALLBACKS: 16 | 17 | onLoad () { 18 | MoveCtrllor.init(this.basic, this.touch) 19 | cc.director.getPhysicsManager().enabled = true 20 | cc.director.getPhysicsManager().gravity = cc.v2(0, 0) 21 | }, 22 | 23 | start () { 24 | 25 | }, 26 | 27 | update (dt) { 28 | MoveCtrllor.updateCamera(this.backgroundLayer) 29 | }, 30 | }); 31 | -------------------------------------------------------------------------------- /CameraIdea/assets/script/CameraIdea.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "f59a4503-3e28-44e5-a49f-3b56cdec80d8", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CameraIdea/assets/script/Hero.js: -------------------------------------------------------------------------------- 1 | 2 | cc.Class({ 3 | extends: cc.Component, 4 | 5 | properties: { 6 | 7 | }, 8 | 9 | onBeginContact (contact,selfCollider,otherCollider){ 10 | cc.log("contact!") 11 | //获取碰撞的世界信息 12 | var worldManifold = contact.getWorldManifold() 13 | //获取碰撞点的世界坐标[0:vec2, 1:vec2, ...] 14 | var points = worldManifold.points 15 | //判断触地,考虑到物理弹性所以小于10 16 | cc.log(points) 17 | }, 18 | 19 | // onLoad () {}, 20 | 21 | start () { 22 | 23 | }, 24 | 25 | // update (dt) {}, 26 | }); 27 | -------------------------------------------------------------------------------- /CameraIdea/assets/script/Hero.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "383afe2b-ebfd-4378-8b91-a7c4bdb2093c", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CameraIdea/assets/script/MathVec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * > 2018年9月1日15:26:22 3 | * 1. 给定点和最大极径,限制点的圆形活动范围 4 | * 2. 给定点和宽高,限制点的矩形活动范围 5 | * 3. 给定点获取其极角 6 | * 4. 给定极角,极径获取点 7 | * 5. 给定点,获取极径 8 | * 6. 给定点和条件, 获取随机数 9 | * 7. 返回origin指向靶目标的单位向量 10 | * #### By AK-12 @[qq:1029985799@qq.com, gmail:saber2pr@gmail.com] 11 | */ 12 | var MathVec = { 13 | /** 14 | * 给定点和最大极径,限制点的活动范围 15 | */ 16 | limitToCircle: function (commitPos, limitRadius) { 17 | return this.getLength(commitPos)0?length:-length) 30 | }, 31 | /** 32 | * 给定点获取其极角(弧度) 33 | */ 34 | getAngle: function (Pos) { 35 | if(Pos.y > 0){ 36 | return Math.acos(Pos.x/Pos.mag()) 37 | }else{ 38 | return -Math.acos(Pos.x/Pos.mag()) 39 | } 40 | }, 41 | /** 42 | * 弧度转角度 43 | */ 44 | transformAngle(angle){ 45 | return angle * 180 / Math.PI 46 | }, 47 | /** 48 | * 角度转弧度 49 | */ 50 | transformAngleToRad(angle){ 51 | return angle / (180*Math.PI) 52 | }, 53 | /** 54 | * 给定极角,极径获取点 55 | */ 56 | getPos: function (angle, radius) { 57 | return cc.v2(radius*Math.cos(angle), radius*Math.sin(angle)) 58 | }, 59 | /** 60 | * 给定点,获取极径 61 | */ 62 | getLength: function (commitPos) { 63 | return commitPos.mag() 64 | }, 65 | /** 66 | * 获取随机x或y点(pos, method) 67 | */ 68 | getRandNum: function (pos, method) { 69 | return method==='x'?cc.v2(pos.x*cc.random0To1(), pos.y):cc.v2(pos.x, pos.y*cc.random0To1()) 70 | }, 71 | /** 72 | * 获取随机点(scalePos, minScale) 73 | */ 74 | getRandPos: function (scalePos, minScale) { 75 | return cc.v2(scalePos.x*cc.random0To1() + minScale.x, scalePos.y*cc.random0To1() + minScale.y) 76 | }, 77 | /** 78 | * 返回origin指向靶目标的单位向量(origin, target) 79 | */ 80 | getFront(origin, target){ 81 | var front = cc.v2(target.x - origin.x, target.y - origin.y) 82 | return cc.v2(front.x/front.mag(), front.y/front.mag()) 83 | }, 84 | /** 85 | * 返回两点间距离(origin, target) 86 | */ 87 | getDistance(origin, target){ 88 | return cc.v2(target.x - origin.x, target.y - origin.y).mag() 89 | }, 90 | /** 91 | * 求子节点的世界坐标(如果父节点在世界下) 92 | */ 93 | transformToParentWorld(childNode){ 94 | return cc.v2(childNode.parent.x + childNode.x, childNode.parent.y + childNode.y) 95 | }, 96 | /** 97 | * 求数组中最大值 98 | */ 99 | getMaxFromVector(vector){ 100 | return Math.max.apply(null, vector) 101 | }, 102 | /** 103 | * 求数组中最小值 104 | */ 105 | getMinFromVector(vector){ 106 | return Math.min.apply(null, vector) 107 | }, 108 | /** 109 | * 求数组中指定元素下标 110 | */ 111 | getOrderFromVector(elem, vector){ 112 | for(var order = 0; order < vector.length; order++){ 113 | if(elem === vector[order]){ 114 | return order 115 | } 116 | } 117 | }, 118 | /** 119 | * 返回负坐标 120 | */ 121 | getPosNegative(Pos){ 122 | return cc.v2(-Pos.x, -Pos.y) 123 | }, 124 | /** 125 | * 两点相加 126 | */ 127 | addTwoPos(pos1, pos2, method){ 128 | return cc.p(pos1.x + pos2.x, pos1.y + pos2.y) 129 | }, 130 | /** 131 | * 获取数组中随机元素 132 | */ 133 | getRandElem(vector){ 134 | return vector[parseInt((vector.length)*cc.random0To1())] 135 | } 136 | } 137 | 138 | module.exports = MathVec 139 | -------------------------------------------------------------------------------- /CameraIdea/assets/script/MathVec.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "440326fe-519b-4398-b0e5-8a24c185c45c", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CameraIdea/assets/script/MoveCtrllor.js: -------------------------------------------------------------------------------- 1 | //depend 2 | var MathVec = require('MathVec') 3 | /** 4 | * #### 2018年9月1日15:26:16 5 | * * 使用它创建轮盘很简单 6 | * 1. 先在场景onload中初始化 7 | * > MoveCtrllor.init(basicSpr, touchSpr, radius, heroSpeed) 8 | * 2. 然后在update里绑定角色节点 9 | * > MoveCtrllor.updateCharacter(this.hero) 10 | * 3. 传入拖动盘和拖动点,实现拖动手柄 11 | * 4. 提供返回拖动角度和拖动力度的接口 12 | * 5. 控制节点运动接口 13 | * #### By AK-12 @[qq:1029985799@qq.com, gmail:saber2pr@gmail.com] 14 | */ 15 | var MoveCtrllor = { 16 | angle:null, 17 | force:null, 18 | status:null, 19 | heroSpeed:null, 20 | radius:null, 21 | lastAngle:null, 22 | 23 | onload(touchSpr){ 24 | //保留角度 25 | this.lastAngle = this.angle 26 | this.angle=0 27 | this.force=0 28 | this.status=false 29 | touchSpr.node.setPosition(0, 0) 30 | }, 31 | /** 32 | * 传入拖动盘和拖动点,实现拖动手柄 33 | */ 34 | init: function (basicSpr, touchSpr, radius, heroSpeed) { 35 | MoveCtrllor.onload(touchSpr) 36 | this.radius = typeof(radius)==='undefined'?25:radius 37 | this.heroSpeed = typeof(heroSpeed)==='undefined'?5:heroSpeed 38 | basicSpr.node.on("touchstart", function(touch){ 39 | this.status=true 40 | }, this) 41 | basicSpr.node.on("touchmove", function(touch){ 42 | //转换到局部坐标 43 | var touchPosOnBasic = basicSpr.node.convertToNodeSpaceAR(touch.getLocation()) 44 | //限制拖动范围 45 | var touchPosOnBasicLimited = MathVec.limitToCircle(touchPosOnBasic, this.radius) 46 | touchSpr.node.setPosition(touchPosOnBasicLimited) 47 | //保存角度 48 | this.angle = MathVec.getAngle(touchPosOnBasicLimited) 49 | //保存拖动力度 50 | this.force = MathVec.getLength(touchPosOnBasicLimited)/this.radius 51 | }, this) 52 | basicSpr.node.on("touchend", function(touch){ 53 | //重置状态 54 | this.onload(touchSpr) 55 | }, this) 56 | basicSpr.node.on("touchcancel", function(touch){ 57 | this.onload(touchSpr) 58 | }, this) 59 | }, 60 | /** 61 | * 获取拖动角度(弧度) 62 | */ 63 | getMoveAngle(){ 64 | return this.angle 65 | }, 66 | /** 67 | * 获取终止角度(弧度) 68 | */ 69 | getLastAngle(){ 70 | return this.lastAngle 71 | }, 72 | /** 73 | * 获取拖动力度 74 | */ 75 | getForce(){ 76 | return this.force 77 | }, 78 | /** 79 | * 获取按键状态 80 | */ 81 | getStatus(){ 82 | return this.status 83 | }, 84 | /** 85 | * 角色动作响应 86 | */ 87 | updateCharacter(node){ 88 | this.directToDes(node, 'character') 89 | }, 90 | updateCamera(node){ 91 | this.directToDes(node, 'camera') 92 | }, 93 | directToDes(node, method){ 94 | if(this.getStatus()===true){ 95 | var angle = this.getMoveAngle() 96 | var force = this.getForce() 97 | var desPos = 98 | method==='character'?cc.p(node.x + this.heroSpeed*Math.cos(angle)*force, node.y + this.heroSpeed*Math.sin(angle)*force): 99 | method==='camera'?cc.p(node.x - this.heroSpeed*Math.cos(angle)*force, node.y - this.heroSpeed*Math.sin(angle)*force): 100 | console.log("methodError") 101 | // node.position = cc.v2(MathVec.limitToRect(desPos, 750*0.66, 240*0.66)) 102 | node.position = cc.v2(desPos) 103 | } 104 | } 105 | } 106 | 107 | module.exports = MoveCtrllor 108 | -------------------------------------------------------------------------------- /CameraIdea/assets/script/MoveCtrllor.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "c0a98ebe-9629-49b8-924a-fbebad3a235b", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CameraIdea/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 | } -------------------------------------------------------------------------------- /CameraIdea/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos-creator-js", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /CameraIdea/settings/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "appKey": "", 3 | "appSecret": "", 4 | "encryptJs": true, 5 | "excludeScenes": [], 6 | "fb-instant-games": {}, 7 | "includeAnySDK": false, 8 | "includeSDKBox": false, 9 | "inlineSpriteFrames": true, 10 | "inlineSpriteFrames_native": true, 11 | "jailbreakPlatform": false, 12 | "md5Cache": false, 13 | "mergeStartScene": false, 14 | "oauthLoginServer": "", 15 | "optimizeHotUpdate": false, 16 | "orientation": { 17 | "landscapeLeft": true, 18 | "landscapeRight": true, 19 | "portrait": false, 20 | "upsideDown": false 21 | }, 22 | "packageName": "org.cocos2d.CameraIdea", 23 | "privateKey": "", 24 | "qqplay": { 25 | "REMOTE_SERVER_ROOT": "", 26 | "orientation": "portrait" 27 | }, 28 | "renderMode": "0", 29 | "startScene": "aab0b4ca-a684-46de-a719-928020209938", 30 | "title": "CameraIdea", 31 | "webOrientation": "landscape", 32 | "wechatgame": { 33 | "REMOTE_SERVER_ROOT": "", 34 | "appid": "wx6ac3f5090a6b99c5", 35 | "isSubdomain": false, 36 | "orientation": "portrait", 37 | "subContext": "" 38 | }, 39 | "xxteaKey": "0724f550-a921-42", 40 | "zipCompressJs": true 41 | } -------------------------------------------------------------------------------- /CameraIdea/settings/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "cocos-analytics": { 3 | "appID": "13798", 4 | "appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2", 5 | "channel": "", 6 | "enable": false, 7 | "version": "" 8 | }, 9 | "collision-matrix": [ 10 | [ 11 | true 12 | ], 13 | [ 14 | false, 15 | false 16 | ] 17 | ], 18 | "design-resolution-height": 640, 19 | "design-resolution-width": 960, 20 | "excluded-modules": [], 21 | "fit-height": true, 22 | "fit-width": false, 23 | "group-list": [ 24 | "default", 25 | "background" 26 | ], 27 | "simulator-orientation": false, 28 | "simulator-resolution": { 29 | "height": 640, 30 | "width": 960 31 | }, 32 | "use-customize-simulator": false, 33 | "use-project-simulator-setting": false, 34 | "start-scene": "current" 35 | } -------------------------------------------------------------------------------- /CameraManager/.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/ -------------------------------------------------------------------------------- /CameraManager/assets/main.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 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 | "_active": true, 21 | "_level": 0, 22 | "_components": [], 23 | "_prefab": null, 24 | "_opacity": 255, 25 | "_color": { 26 | "__type__": "cc.Color", 27 | "r": 255, 28 | "g": 255, 29 | "b": 255, 30 | "a": 255 31 | }, 32 | "_contentSize": { 33 | "__type__": "cc.Size", 34 | "width": 0, 35 | "height": 0 36 | }, 37 | "_anchorPoint": { 38 | "__type__": "cc.Vec2", 39 | "x": 0, 40 | "y": 0 41 | }, 42 | "_scale": { 43 | "__type__": "cc.Vec3", 44 | "x": 0.22764671910917367, 45 | "y": 0.22764671910917367, 46 | "z": 1 47 | }, 48 | "_quat": { 49 | "__type__": "cc.Quat", 50 | "x": 0, 51 | "y": 0, 52 | "z": 0, 53 | "w": 1 54 | }, 55 | "_zIndex": 0, 56 | "groupIndex": 0, 57 | "autoReleaseAssets": false, 58 | "_id": "adcf7150-50ac-40cf-90a3-cb2e04df02fb" 59 | }, 60 | { 61 | "__type__": "cc.Node", 62 | "_name": "Canvas", 63 | "_objFlags": 0, 64 | "_parent": { 65 | "__id__": 1 66 | }, 67 | "_children": [ 68 | { 69 | "__id__": 3 70 | }, 71 | { 72 | "__id__": 6 73 | }, 74 | { 75 | "__id__": 15 76 | } 77 | ], 78 | "_active": true, 79 | "_level": 0, 80 | "_components": [ 81 | { 82 | "__id__": 24 83 | } 84 | ], 85 | "_prefab": null, 86 | "_opacity": 255, 87 | "_color": { 88 | "__type__": "cc.Color", 89 | "r": 255, 90 | "g": 255, 91 | "b": 255, 92 | "a": 255 93 | }, 94 | "_contentSize": { 95 | "__type__": "cc.Size", 96 | "width": 640, 97 | "height": 960 98 | }, 99 | "_anchorPoint": { 100 | "__type__": "cc.Vec2", 101 | "x": 0.5, 102 | "y": 0.5 103 | }, 104 | "_position": { 105 | "__type__": "cc.Vec3", 106 | "x": 320, 107 | "y": 480, 108 | "z": 0 109 | }, 110 | "_scale": { 111 | "__type__": "cc.Vec3", 112 | "x": 1, 113 | "y": 1, 114 | "z": 1 115 | }, 116 | "_rotationX": 0, 117 | "_rotationY": 0, 118 | "_quat": { 119 | "__type__": "cc.Quat", 120 | "x": 0, 121 | "y": 0, 122 | "z": 0, 123 | "w": 1 124 | }, 125 | "_skewX": 0, 126 | "_skewY": 0, 127 | "_zIndex": 0, 128 | "groupIndex": 0, 129 | "_id": "b0kHbav51Mgo2f9muTaCfV" 130 | }, 131 | { 132 | "__type__": "cc.Node", 133 | "_name": "Main Camera", 134 | "_objFlags": 0, 135 | "_parent": { 136 | "__id__": 2 137 | }, 138 | "_children": [], 139 | "_active": true, 140 | "_level": 1, 141 | "_components": [ 142 | { 143 | "__id__": 4 144 | }, 145 | { 146 | "__id__": 5 147 | } 148 | ], 149 | "_prefab": null, 150 | "_opacity": 255, 151 | "_color": { 152 | "__type__": "cc.Color", 153 | "r": 255, 154 | "g": 255, 155 | "b": 255, 156 | "a": 255 157 | }, 158 | "_contentSize": { 159 | "__type__": "cc.Size", 160 | "width": 0, 161 | "height": 0 162 | }, 163 | "_anchorPoint": { 164 | "__type__": "cc.Vec2", 165 | "x": 0.5, 166 | "y": 0.5 167 | }, 168 | "_position": { 169 | "__type__": "cc.Vec3", 170 | "x": 0, 171 | "y": 0, 172 | "z": 0 173 | }, 174 | "_scale": { 175 | "__type__": "cc.Vec3", 176 | "x": 1, 177 | "y": 1, 178 | "z": 1 179 | }, 180 | "_rotationX": 0, 181 | "_rotationY": 0, 182 | "_quat": { 183 | "__type__": "cc.Quat", 184 | "x": 0, 185 | "y": 0, 186 | "z": 0, 187 | "w": 1 188 | }, 189 | "_skewX": 0, 190 | "_skewY": 0, 191 | "_zIndex": 0, 192 | "groupIndex": 0, 193 | "_id": "25G3fot8NJ8JRhNzlQ4kqk" 194 | }, 195 | { 196 | "__type__": "cc.Camera", 197 | "_name": "", 198 | "_objFlags": 0, 199 | "node": { 200 | "__id__": 3 201 | }, 202 | "_enabled": true, 203 | "_cullingMask": 4294967295, 204 | "_clearFlags": 7, 205 | "_backgroundColor": { 206 | "__type__": "cc.Color", 207 | "r": 0, 208 | "g": 0, 209 | "b": 0, 210 | "a": 255 211 | }, 212 | "_depth": -1, 213 | "_zoomRatio": 1, 214 | "_targetTexture": null, 215 | "_id": "69yNJgnhFNwbcZyEBY++SJ" 216 | }, 217 | { 218 | "__type__": "2d4d4rlDvJO+5qdOFiA9uhq", 219 | "_name": "", 220 | "_objFlags": 0, 221 | "node": { 222 | "__id__": 3 223 | }, 224 | "_enabled": true, 225 | "LayerList": [ 226 | { 227 | "__id__": 6 228 | }, 229 | { 230 | "__id__": 15 231 | } 232 | ], 233 | "_id": "32dvlY78FAMJ/mjLHEW/EH" 234 | }, 235 | { 236 | "__type__": "cc.Node", 237 | "_name": "StartLayer", 238 | "_objFlags": 0, 239 | "_parent": { 240 | "__id__": 2 241 | }, 242 | "_children": [ 243 | { 244 | "__id__": 7 245 | }, 246 | { 247 | "__id__": 9 248 | } 249 | ], 250 | "_active": true, 251 | "_level": 1, 252 | "_components": [ 253 | { 254 | "__id__": 14 255 | } 256 | ], 257 | "_prefab": null, 258 | "_opacity": 255, 259 | "_color": { 260 | "__type__": "cc.Color", 261 | "r": 255, 262 | "g": 255, 263 | "b": 255, 264 | "a": 255 265 | }, 266 | "_contentSize": { 267 | "__type__": "cc.Size", 268 | "width": 0, 269 | "height": 0 270 | }, 271 | "_anchorPoint": { 272 | "__type__": "cc.Vec2", 273 | "x": 0.5, 274 | "y": 0.5 275 | }, 276 | "_position": { 277 | "__type__": "cc.Vec3", 278 | "x": 0, 279 | "y": 0, 280 | "z": 0 281 | }, 282 | "_scale": { 283 | "__type__": "cc.Vec3", 284 | "x": 1, 285 | "y": 1, 286 | "z": 1 287 | }, 288 | "_rotationX": 0, 289 | "_rotationY": 0, 290 | "_quat": { 291 | "__type__": "cc.Quat", 292 | "x": 0, 293 | "y": 0, 294 | "z": 0, 295 | "w": 1 296 | }, 297 | "_skewX": 0, 298 | "_skewY": 0, 299 | "_zIndex": 0, 300 | "groupIndex": 0, 301 | "_id": "f7fDmS6QhJrJX1jS3XuoOL" 302 | }, 303 | { 304 | "__type__": "cc.Node", 305 | "_name": "background", 306 | "_objFlags": 0, 307 | "_parent": { 308 | "__id__": 6 309 | }, 310 | "_children": [], 311 | "_active": true, 312 | "_level": 2, 313 | "_components": [ 314 | { 315 | "__id__": 8 316 | } 317 | ], 318 | "_prefab": null, 319 | "_opacity": 255, 320 | "_color": { 321 | "__type__": "cc.Color", 322 | "r": 115, 323 | "g": 139, 324 | "b": 135, 325 | "a": 255 326 | }, 327 | "_contentSize": { 328 | "__type__": "cc.Size", 329 | "width": 640, 330 | "height": 960 331 | }, 332 | "_anchorPoint": { 333 | "__type__": "cc.Vec2", 334 | "x": 0.5, 335 | "y": 0.5 336 | }, 337 | "_position": { 338 | "__type__": "cc.Vec3", 339 | "x": 0, 340 | "y": 0, 341 | "z": 0 342 | }, 343 | "_scale": { 344 | "__type__": "cc.Vec3", 345 | "x": 1, 346 | "y": 1, 347 | "z": 1 348 | }, 349 | "_rotationX": 0, 350 | "_rotationY": 0, 351 | "_quat": { 352 | "__type__": "cc.Quat", 353 | "x": 0, 354 | "y": 0, 355 | "z": 0, 356 | "w": 1 357 | }, 358 | "_skewX": 0, 359 | "_skewY": 0, 360 | "_zIndex": 0, 361 | "groupIndex": 0, 362 | "_id": "feXsIQCodIWaVz0gbbvka3" 363 | }, 364 | { 365 | "__type__": "cc.Sprite", 366 | "_name": "", 367 | "_objFlags": 0, 368 | "node": { 369 | "__id__": 7 370 | }, 371 | "_enabled": true, 372 | "_srcBlendFactor": 770, 373 | "_dstBlendFactor": 771, 374 | "_spriteFrame": { 375 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 376 | }, 377 | "_type": 0, 378 | "_sizeMode": 0, 379 | "_fillType": 0, 380 | "_fillCenter": { 381 | "__type__": "cc.Vec2", 382 | "x": 0, 383 | "y": 0 384 | }, 385 | "_fillStart": 0, 386 | "_fillRange": 0, 387 | "_isTrimmedMode": true, 388 | "_state": 0, 389 | "_atlas": null, 390 | "_id": "5allWxYSVL1rsZlUML8szi" 391 | }, 392 | { 393 | "__type__": "cc.Node", 394 | "_name": "nextBtn", 395 | "_objFlags": 0, 396 | "_parent": { 397 | "__id__": 6 398 | }, 399 | "_children": [ 400 | { 401 | "__id__": 10 402 | } 403 | ], 404 | "_active": true, 405 | "_level": 2, 406 | "_components": [ 407 | { 408 | "__id__": 12 409 | }, 410 | { 411 | "__id__": 13 412 | } 413 | ], 414 | "_prefab": null, 415 | "_opacity": 255, 416 | "_color": { 417 | "__type__": "cc.Color", 418 | "r": 255, 419 | "g": 255, 420 | "b": 255, 421 | "a": 255 422 | }, 423 | "_contentSize": { 424 | "__type__": "cc.Size", 425 | "width": 100, 426 | "height": 40 427 | }, 428 | "_anchorPoint": { 429 | "__type__": "cc.Vec2", 430 | "x": 0.5, 431 | "y": 0.5 432 | }, 433 | "_position": { 434 | "__type__": "cc.Vec3", 435 | "x": 0, 436 | "y": 0, 437 | "z": 0 438 | }, 439 | "_scale": { 440 | "__type__": "cc.Vec3", 441 | "x": 1, 442 | "y": 1, 443 | "z": 1 444 | }, 445 | "_rotationX": 0, 446 | "_rotationY": 0, 447 | "_quat": { 448 | "__type__": "cc.Quat", 449 | "x": 0, 450 | "y": 0, 451 | "z": 0, 452 | "w": 1 453 | }, 454 | "_skewX": 0, 455 | "_skewY": 0, 456 | "_zIndex": 0, 457 | "groupIndex": 0, 458 | "_id": "97fhXZ/fpN97UA1j6moim8" 459 | }, 460 | { 461 | "__type__": "cc.Node", 462 | "_name": "Label", 463 | "_objFlags": 0, 464 | "_parent": { 465 | "__id__": 9 466 | }, 467 | "_children": [], 468 | "_active": true, 469 | "_level": 0, 470 | "_components": [ 471 | { 472 | "__id__": 11 473 | } 474 | ], 475 | "_prefab": null, 476 | "_opacity": 255, 477 | "_color": { 478 | "__type__": "cc.Color", 479 | "r": 0, 480 | "g": 0, 481 | "b": 0, 482 | "a": 255 483 | }, 484 | "_contentSize": { 485 | "__type__": "cc.Size", 486 | "width": 100, 487 | "height": 40 488 | }, 489 | "_anchorPoint": { 490 | "__type__": "cc.Vec2", 491 | "x": 0.5, 492 | "y": 0.5 493 | }, 494 | "_position": { 495 | "__type__": "cc.Vec3", 496 | "x": 0, 497 | "y": 0, 498 | "z": 0 499 | }, 500 | "_scale": { 501 | "__type__": "cc.Vec3", 502 | "x": 1, 503 | "y": 1, 504 | "z": 1 505 | }, 506 | "_rotationX": 0, 507 | "_rotationY": 0, 508 | "_quat": { 509 | "__type__": "cc.Quat", 510 | "x": 0, 511 | "y": 0, 512 | "z": 0, 513 | "w": 1 514 | }, 515 | "_skewX": 0, 516 | "_skewY": 0, 517 | "_zIndex": 0, 518 | "groupIndex": 0, 519 | "_id": "eb+u0cAqhHJJVHVf7vyTjB" 520 | }, 521 | { 522 | "__type__": "cc.Label", 523 | "_name": "", 524 | "_objFlags": 0, 525 | "node": { 526 | "__id__": 10 527 | }, 528 | "_enabled": true, 529 | "_srcBlendFactor": 1, 530 | "_dstBlendFactor": 771, 531 | "_useOriginalSize": false, 532 | "_string": "next", 533 | "_N$string": "next", 534 | "_fontSize": 20, 535 | "_lineHeight": 40, 536 | "_enableWrapText": false, 537 | "_N$file": null, 538 | "_isSystemFontUsed": true, 539 | "_spacingX": 0, 540 | "_N$horizontalAlign": 1, 541 | "_N$verticalAlign": 1, 542 | "_N$fontFamily": "Arial", 543 | "_N$overflow": 1, 544 | "_id": "6c4c/UY/hCHIaPFQP+TBoy" 545 | }, 546 | { 547 | "__type__": "cc.Sprite", 548 | "_name": "", 549 | "_objFlags": 0, 550 | "node": { 551 | "__id__": 9 552 | }, 553 | "_enabled": true, 554 | "_srcBlendFactor": 770, 555 | "_dstBlendFactor": 771, 556 | "_spriteFrame": { 557 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 558 | }, 559 | "_type": 1, 560 | "_sizeMode": 0, 561 | "_fillType": 0, 562 | "_fillCenter": { 563 | "__type__": "cc.Vec2", 564 | "x": 0, 565 | "y": 0 566 | }, 567 | "_fillStart": 0, 568 | "_fillRange": 0, 569 | "_isTrimmedMode": true, 570 | "_state": 0, 571 | "_atlas": null, 572 | "_id": "85S1tHuslE4qEuXhLrQmPa" 573 | }, 574 | { 575 | "__type__": "cc.Button", 576 | "_name": "", 577 | "_objFlags": 0, 578 | "node": { 579 | "__id__": 9 580 | }, 581 | "_enabled": true, 582 | "transition": 2, 583 | "pressedColor": { 584 | "__type__": "cc.Color", 585 | "r": 255, 586 | "g": 255, 587 | "b": 255, 588 | "a": 255 589 | }, 590 | "hoverColor": { 591 | "__type__": "cc.Color", 592 | "r": 255, 593 | "g": 255, 594 | "b": 255, 595 | "a": 255 596 | }, 597 | "duration": 0.1, 598 | "zoomScale": 1.2, 599 | "clickEvents": [], 600 | "_N$interactable": true, 601 | "_N$enableAutoGrayEffect": false, 602 | "_N$normalColor": { 603 | "__type__": "cc.Color", 604 | "r": 255, 605 | "g": 255, 606 | "b": 255, 607 | "a": 255 608 | }, 609 | "_N$disabledColor": { 610 | "__type__": "cc.Color", 611 | "r": 255, 612 | "g": 255, 613 | "b": 255, 614 | "a": 255 615 | }, 616 | "_N$normalSprite": { 617 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 618 | }, 619 | "_N$pressedSprite": { 620 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 621 | }, 622 | "pressedSprite": { 623 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 624 | }, 625 | "_N$hoverSprite": { 626 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 627 | }, 628 | "hoverSprite": { 629 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 630 | }, 631 | "_N$disabledSprite": { 632 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 633 | }, 634 | "_N$target": { 635 | "__id__": 9 636 | }, 637 | "_id": "16Q3ilYiFJBYfNO+z9ky3t" 638 | }, 639 | { 640 | "__type__": "789feVFeWFNBaN0hNqQg1Fw", 641 | "_name": "", 642 | "_objFlags": 0, 643 | "node": { 644 | "__id__": 6 645 | }, 646 | "_enabled": true, 647 | "startbtn": { 648 | "__id__": 13 649 | }, 650 | "_id": "3bhgzNlbdOEI5RgKws+f4p" 651 | }, 652 | { 653 | "__type__": "cc.Node", 654 | "_name": "NextLayer", 655 | "_objFlags": 0, 656 | "_parent": { 657 | "__id__": 2 658 | }, 659 | "_children": [ 660 | { 661 | "__id__": 16 662 | }, 663 | { 664 | "__id__": 18 665 | } 666 | ], 667 | "_active": true, 668 | "_level": 1, 669 | "_components": [ 670 | { 671 | "__id__": 23 672 | } 673 | ], 674 | "_prefab": null, 675 | "_opacity": 255, 676 | "_color": { 677 | "__type__": "cc.Color", 678 | "r": 255, 679 | "g": 255, 680 | "b": 255, 681 | "a": 255 682 | }, 683 | "_contentSize": { 684 | "__type__": "cc.Size", 685 | "width": 0, 686 | "height": 0 687 | }, 688 | "_anchorPoint": { 689 | "__type__": "cc.Vec2", 690 | "x": 0.5, 691 | "y": 0.5 692 | }, 693 | "_position": { 694 | "__type__": "cc.Vec3", 695 | "x": 640, 696 | "y": 0, 697 | "z": 0 698 | }, 699 | "_scale": { 700 | "__type__": "cc.Vec3", 701 | "x": 1, 702 | "y": 1, 703 | "z": 1 704 | }, 705 | "_rotationX": 0, 706 | "_rotationY": 0, 707 | "_quat": { 708 | "__type__": "cc.Quat", 709 | "x": 0, 710 | "y": 0, 711 | "z": 0, 712 | "w": 1 713 | }, 714 | "_skewX": 0, 715 | "_skewY": 0, 716 | "_zIndex": 0, 717 | "groupIndex": 0, 718 | "_id": "feBjZopvFNCqDXOSd/PxsF" 719 | }, 720 | { 721 | "__type__": "cc.Node", 722 | "_name": "background", 723 | "_objFlags": 0, 724 | "_parent": { 725 | "__id__": 15 726 | }, 727 | "_children": [], 728 | "_active": true, 729 | "_level": 2, 730 | "_components": [ 731 | { 732 | "__id__": 17 733 | } 734 | ], 735 | "_prefab": null, 736 | "_opacity": 255, 737 | "_color": { 738 | "__type__": "cc.Color", 739 | "r": 49, 740 | "g": 54, 741 | "b": 168, 742 | "a": 255 743 | }, 744 | "_contentSize": { 745 | "__type__": "cc.Size", 746 | "width": 640, 747 | "height": 960 748 | }, 749 | "_anchorPoint": { 750 | "__type__": "cc.Vec2", 751 | "x": 0.5, 752 | "y": 0.5 753 | }, 754 | "_position": { 755 | "__type__": "cc.Vec3", 756 | "x": 0, 757 | "y": 0, 758 | "z": 0 759 | }, 760 | "_scale": { 761 | "__type__": "cc.Vec3", 762 | "x": 1, 763 | "y": 1, 764 | "z": 1 765 | }, 766 | "_rotationX": 0, 767 | "_rotationY": 0, 768 | "_quat": { 769 | "__type__": "cc.Quat", 770 | "x": 0, 771 | "y": 0, 772 | "z": 0, 773 | "w": 1 774 | }, 775 | "_skewX": 0, 776 | "_skewY": 0, 777 | "_zIndex": 0, 778 | "groupIndex": 0, 779 | "_id": "03MXbQDOpDRIXXDIkBxM2D" 780 | }, 781 | { 782 | "__type__": "cc.Sprite", 783 | "_name": "", 784 | "_objFlags": 0, 785 | "node": { 786 | "__id__": 16 787 | }, 788 | "_enabled": true, 789 | "_srcBlendFactor": 770, 790 | "_dstBlendFactor": 771, 791 | "_spriteFrame": { 792 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 793 | }, 794 | "_type": 0, 795 | "_sizeMode": 0, 796 | "_fillType": 0, 797 | "_fillCenter": { 798 | "__type__": "cc.Vec2", 799 | "x": 0, 800 | "y": 0 801 | }, 802 | "_fillStart": 0, 803 | "_fillRange": 0, 804 | "_isTrimmedMode": true, 805 | "_state": 0, 806 | "_atlas": null, 807 | "_id": "37obS8im9ChogBxX+cY7Kg" 808 | }, 809 | { 810 | "__type__": "cc.Node", 811 | "_name": "backBtn", 812 | "_objFlags": 0, 813 | "_parent": { 814 | "__id__": 15 815 | }, 816 | "_children": [ 817 | { 818 | "__id__": 19 819 | } 820 | ], 821 | "_active": true, 822 | "_level": 2, 823 | "_components": [ 824 | { 825 | "__id__": 21 826 | }, 827 | { 828 | "__id__": 22 829 | } 830 | ], 831 | "_prefab": null, 832 | "_opacity": 255, 833 | "_color": { 834 | "__type__": "cc.Color", 835 | "r": 255, 836 | "g": 255, 837 | "b": 255, 838 | "a": 255 839 | }, 840 | "_contentSize": { 841 | "__type__": "cc.Size", 842 | "width": 100, 843 | "height": 40 844 | }, 845 | "_anchorPoint": { 846 | "__type__": "cc.Vec2", 847 | "x": 0.5, 848 | "y": 0.5 849 | }, 850 | "_position": { 851 | "__type__": "cc.Vec3", 852 | "x": 0, 853 | "y": 0, 854 | "z": 0 855 | }, 856 | "_scale": { 857 | "__type__": "cc.Vec3", 858 | "x": 1, 859 | "y": 1, 860 | "z": 1 861 | }, 862 | "_rotationX": 0, 863 | "_rotationY": 0, 864 | "_quat": { 865 | "__type__": "cc.Quat", 866 | "x": 0, 867 | "y": 0, 868 | "z": 0, 869 | "w": 1 870 | }, 871 | "_skewX": 0, 872 | "_skewY": 0, 873 | "_zIndex": 0, 874 | "groupIndex": 0, 875 | "_id": "a4OZxWHJBHz6/hwHxXZwn9" 876 | }, 877 | { 878 | "__type__": "cc.Node", 879 | "_name": "Label", 880 | "_objFlags": 0, 881 | "_parent": { 882 | "__id__": 18 883 | }, 884 | "_children": [], 885 | "_active": true, 886 | "_level": 0, 887 | "_components": [ 888 | { 889 | "__id__": 20 890 | } 891 | ], 892 | "_prefab": null, 893 | "_opacity": 255, 894 | "_color": { 895 | "__type__": "cc.Color", 896 | "r": 0, 897 | "g": 0, 898 | "b": 0, 899 | "a": 255 900 | }, 901 | "_contentSize": { 902 | "__type__": "cc.Size", 903 | "width": 100, 904 | "height": 40 905 | }, 906 | "_anchorPoint": { 907 | "__type__": "cc.Vec2", 908 | "x": 0.5, 909 | "y": 0.5 910 | }, 911 | "_position": { 912 | "__type__": "cc.Vec3", 913 | "x": 0, 914 | "y": 0, 915 | "z": 0 916 | }, 917 | "_scale": { 918 | "__type__": "cc.Vec3", 919 | "x": 1, 920 | "y": 1, 921 | "z": 1 922 | }, 923 | "_rotationX": 0, 924 | "_rotationY": 0, 925 | "_quat": { 926 | "__type__": "cc.Quat", 927 | "x": 0, 928 | "y": 0, 929 | "z": 0, 930 | "w": 1 931 | }, 932 | "_skewX": 0, 933 | "_skewY": 0, 934 | "_zIndex": 0, 935 | "groupIndex": 0, 936 | "_id": "e5W6h879pJXrRaWLRzGcP9" 937 | }, 938 | { 939 | "__type__": "cc.Label", 940 | "_name": "", 941 | "_objFlags": 0, 942 | "node": { 943 | "__id__": 19 944 | }, 945 | "_enabled": true, 946 | "_srcBlendFactor": 1, 947 | "_dstBlendFactor": 771, 948 | "_useOriginalSize": false, 949 | "_string": "back", 950 | "_N$string": "back", 951 | "_fontSize": 20, 952 | "_lineHeight": 40, 953 | "_enableWrapText": false, 954 | "_N$file": null, 955 | "_isSystemFontUsed": true, 956 | "_spacingX": 0, 957 | "_N$horizontalAlign": 1, 958 | "_N$verticalAlign": 1, 959 | "_N$fontFamily": "Arial", 960 | "_N$overflow": 1, 961 | "_id": "b8qL5DheJMJ4QrJKin72yC" 962 | }, 963 | { 964 | "__type__": "cc.Sprite", 965 | "_name": "", 966 | "_objFlags": 0, 967 | "node": { 968 | "__id__": 18 969 | }, 970 | "_enabled": true, 971 | "_srcBlendFactor": 770, 972 | "_dstBlendFactor": 771, 973 | "_spriteFrame": { 974 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 975 | }, 976 | "_type": 1, 977 | "_sizeMode": 0, 978 | "_fillType": 0, 979 | "_fillCenter": { 980 | "__type__": "cc.Vec2", 981 | "x": 0, 982 | "y": 0 983 | }, 984 | "_fillStart": 0, 985 | "_fillRange": 0, 986 | "_isTrimmedMode": true, 987 | "_state": 0, 988 | "_atlas": null, 989 | "_id": "049i+NhkhL1JD5zedRyblM" 990 | }, 991 | { 992 | "__type__": "cc.Button", 993 | "_name": "", 994 | "_objFlags": 0, 995 | "node": { 996 | "__id__": 18 997 | }, 998 | "_enabled": true, 999 | "transition": 2, 1000 | "pressedColor": { 1001 | "__type__": "cc.Color", 1002 | "r": 255, 1003 | "g": 255, 1004 | "b": 255, 1005 | "a": 255 1006 | }, 1007 | "hoverColor": { 1008 | "__type__": "cc.Color", 1009 | "r": 255, 1010 | "g": 255, 1011 | "b": 255, 1012 | "a": 255 1013 | }, 1014 | "duration": 0.1, 1015 | "zoomScale": 1.2, 1016 | "clickEvents": [], 1017 | "_N$interactable": true, 1018 | "_N$enableAutoGrayEffect": false, 1019 | "_N$normalColor": { 1020 | "__type__": "cc.Color", 1021 | "r": 255, 1022 | "g": 255, 1023 | "b": 255, 1024 | "a": 255 1025 | }, 1026 | "_N$disabledColor": { 1027 | "__type__": "cc.Color", 1028 | "r": 255, 1029 | "g": 255, 1030 | "b": 255, 1031 | "a": 255 1032 | }, 1033 | "_N$normalSprite": { 1034 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1035 | }, 1036 | "_N$pressedSprite": { 1037 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1038 | }, 1039 | "pressedSprite": { 1040 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1041 | }, 1042 | "_N$hoverSprite": { 1043 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1044 | }, 1045 | "hoverSprite": { 1046 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1047 | }, 1048 | "_N$disabledSprite": { 1049 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 1050 | }, 1051 | "_N$target": { 1052 | "__id__": 18 1053 | }, 1054 | "_id": "5bBmtZoV9DOYgVwK20w9YT" 1055 | }, 1056 | { 1057 | "__type__": "82200Vx6RJETrZN5lzttNMQ", 1058 | "_name": "", 1059 | "_objFlags": 0, 1060 | "node": { 1061 | "__id__": 15 1062 | }, 1063 | "_enabled": true, 1064 | "backBtn": { 1065 | "__id__": 22 1066 | }, 1067 | "_id": "88oR4EIqpEpZt6bJYAGsg1" 1068 | }, 1069 | { 1070 | "__type__": "cc.Canvas", 1071 | "_name": "", 1072 | "_objFlags": 0, 1073 | "node": { 1074 | "__id__": 2 1075 | }, 1076 | "_enabled": true, 1077 | "_designResolution": { 1078 | "__type__": "cc.Size", 1079 | "width": 640, 1080 | "height": 960 1081 | }, 1082 | "_fitWidth": false, 1083 | "_fitHeight": true, 1084 | "_id": "04VOZIIVtNF6012vZAJOPa" 1085 | } 1086 | ] -------------------------------------------------------------------------------- /CameraManager/assets/main.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "adcf7150-50ac-40cf-90a3-cb2e04df02fb", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /CameraManager/assets/script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "bec78f29-16ee-4422-9499-7ebff05b433c", 4 | "isSubpackage": false, 5 | "subpackageName": "", 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /CameraManager/assets/script/Camera.ts: -------------------------------------------------------------------------------- 1 | import CameraManager from './CameraManager' 2 | 3 | const { ccclass, property } = cc._decorator 4 | 5 | @ccclass 6 | export default class NewClass extends cc.Component { 7 | @property({ 8 | type: cc.Node, 9 | displayName: 'layer列表' 10 | }) 11 | LayerList: cc.Node[] = [] 12 | 13 | onLoad() { 14 | CameraManager.getInstance().init(this.node, this.LayerList) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /CameraManager/assets/script/Camera.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "2d4d4ae5-0ef2-4efb-9a9d-385880f6e86a", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CameraManager/assets/script/CameraManager.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: AK-12 3 | * @Date: 2018-11-14 22:30:09 4 | * @Last Modified by: AK-12 5 | * @Last Modified time: 2018-11-15 11:42:02 6 | */ 7 | /** 8 | *摄像机控制 9 | * 10 | * 单例类 11 | * @export 12 | * @class CameraManager 13 | */ 14 | export default class CameraManager { 15 | private constructor() {} 16 | private static instance: CameraManager 17 | static getInstance(): CameraManager { 18 | this.instance = !!this.instance ? this.instance : new CameraManager() 19 | return this.instance 20 | } 21 | /** 22 | * 节点列表 23 | */ 24 | private LayerList: cc.Node[] 25 | /** 26 | * 摄像机节点 27 | */ 28 | private Camera: cc.Node 29 | /** 30 | * 初始化摄像机 31 | * @param camera 32 | * @param layerlist 33 | */ 34 | public init(camera: cc.Node, layerlist: cc.Node[]) { 35 | this.LayerList = layerlist 36 | this.Camera = camera 37 | return this 38 | } 39 | /** 40 | *摄像机注视 41 | * @param layerName 42 | */ 43 | public look(layerName: string) { 44 | let resultArr = this.LayerList.filter(node => node.name === layerName) 45 | try { 46 | this.moveto(resultArr[0].position) 47 | } catch (error) { 48 | this.log(error, layerName) 49 | } 50 | return this 51 | } 52 | /** 53 | *移动摄像机 54 | * 55 | * @private 56 | * @param {cc.Vec2} pos 57 | * @memberof CameraManager 58 | */ 59 | private moveto(pos: cc.Vec2) { 60 | this.Camera.runAction(cc.moveTo(0.5, pos).easing(cc.easeSineInOut())) 61 | } 62 | /** 63 | *异常处理 64 | * 65 | * @private 66 | * @param {*} error 67 | * @param {*} layerName 68 | * @memberof CameraManager 69 | */ 70 | private log(error, layerName) { 71 | console.error('the layer looked : ' + layerName + ' is undefined\n', error) 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /CameraManager/assets/script/CameraManager.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "4b79476c-a40c-45b0-a313-db16de68db46", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CameraManager/assets/script/NextLayer.ts: -------------------------------------------------------------------------------- 1 | import CameraManager from './CameraManager' 2 | 3 | const { ccclass, property } = cc._decorator 4 | 5 | @ccclass 6 | export default class NewClass extends cc.Component { 7 | @property(cc.Button) 8 | backBtn: cc.Button = null 9 | 10 | start() { 11 | this.backBtn.node.on('click', () => { 12 | CameraManager.getInstance().look('StartLayer') 13 | }) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /CameraManager/assets/script/NextLayer.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "82200571-e912-444e-b64d-e65cedb4d310", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CameraManager/assets/script/StartLayer.ts: -------------------------------------------------------------------------------- 1 | import CameraManager from './CameraManager' 2 | 3 | const { ccclass, property } = cc._decorator 4 | 5 | @ccclass 6 | export default class NewClass extends cc.Component { 7 | @property(cc.Button) 8 | startbtn: cc.Button = null 9 | 10 | start() { 11 | this.startbtn.node.on('click', () => { 12 | CameraManager.getInstance().look('NextLayer') 13 | }) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /CameraManager/assets/script/StartLayer.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "789fe545-7961-4d05-a374-84da90835170", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /CameraManager/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 | } -------------------------------------------------------------------------------- /CameraManager/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos-creator-js", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /CameraManager/settings/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "android-instant": { 3 | "REMOTE_SERVER_ROOT": "", 4 | "host": "", 5 | "pathPattern": "", 6 | "recordPath": "", 7 | "scheme": "https", 8 | "skipRecord": false 9 | }, 10 | "appKey": "", 11 | "appSecret": "", 12 | "encryptJs": true, 13 | "excludeScenes": [], 14 | "fb-instant-games": {}, 15 | "includeAnySDK": false, 16 | "includeSDKBox": false, 17 | "inlineSpriteFrames": true, 18 | "inlineSpriteFrames_native": true, 19 | "jailbreakPlatform": false, 20 | "md5Cache": false, 21 | "mergeStartScene": false, 22 | "oauthLoginServer": "", 23 | "optimizeHotUpdate": false, 24 | "orientation": { 25 | "landscapeLeft": true, 26 | "landscapeRight": true, 27 | "portrait": false, 28 | "upsideDown": false 29 | }, 30 | "packageName": "org.cocos2d.CameraManager", 31 | "privateKey": "", 32 | "qqplay": { 33 | "REMOTE_SERVER_ROOT": "", 34 | "orientation": "portrait" 35 | }, 36 | "startScene": "adcf7150-50ac-40cf-90a3-cb2e04df02fb", 37 | "title": "CameraManager", 38 | "webOrientation": "auto", 39 | "wechatgame": { 40 | "REMOTE_SERVER_ROOT": "", 41 | "appid": "wx6ac3f5090a6b99c5", 42 | "isSubdomain": false, 43 | "orientation": "portrait", 44 | "subContext": "" 45 | }, 46 | "xxteaKey": "4d991992-cfb3-4a", 47 | "zipCompressJs": true 48 | } -------------------------------------------------------------------------------- /CameraManager/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 | "cocos-analytics": { 24 | "enable": false, 25 | "appID": "13798", 26 | "appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2" 27 | } 28 | } -------------------------------------------------------------------------------- /MVC/.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/ -------------------------------------------------------------------------------- /MVC/assets/scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "c958551e-e349-4ee7-9afc-7d8aabdce781", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /MVC/assets/scene/main.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "79d18fa2-b0c3-4ba1-82c8-2474d8423920", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /MVC/assets/script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "0929d0b5-96e6-4217-892e-626777b7c498", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /MVC/assets/script/data.js: -------------------------------------------------------------------------------- 1 | var _string = null 2 | var data = { 3 | setString(value){ 4 | _string = value 5 | 6 | }, 7 | addString(value){ 8 | _string = _string===null?value:_string+value 9 | }, 10 | getString(){ 11 | return _string 12 | }, 13 | parseString(){ 14 | return _string.split(",") 15 | }, 16 | getFormat(format){ 17 | return parseInt(this.parseString()[0]).toString(format) 18 | }, 19 | } 20 | module.exports = data 21 | -------------------------------------------------------------------------------- /MVC/assets/script/data.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "16c6570f-2732-4272-a7b6-2f08d111cff2", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /MVC/assets/script/input.js: -------------------------------------------------------------------------------- 1 | var data = require("data") 2 | 3 | cc.Class({ 4 | extends: cc.Component, 5 | 6 | properties: { 7 | //inputextArea 8 | //0,2,5,6,7,8,9,10,11,14,15 9 | textArea:cc.EditBox, 10 | }, 11 | 12 | onLoad () { 13 | data.setString("") 14 | }, 15 | 16 | start () { 17 | this.textArea.node.on("text-changed", function(){ 18 | data.setString(this.textArea.string) 19 | this.node.dispatchEvent( 20 | new cc.Event.EventCustom( 21 | "showResult", true)) 22 | }, this) 23 | }, 24 | }) 25 | -------------------------------------------------------------------------------- /MVC/assets/script/input.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "cb8aaba8-3ef6-4d55-b8b3-4aef3564ab55", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /MVC/assets/script/main.js: -------------------------------------------------------------------------------- 1 | var data = require("data") 2 | 3 | cc.Class({ 4 | extends: cc.Component, 5 | 6 | properties: { 7 | element:cc.Node, 8 | //View 9 | outLabel:cc.Label, 10 | out_2:cc.Label, 11 | out_8:cc.Label, 12 | out_10:cc.Label, 13 | out_16:cc.Label, 14 | }, 15 | 16 | start () { 17 | this.node.on("showResult", function(event){ 18 | this.outLabel.string = data.getString() 19 | this.out_2.string = data.getFormat("2") 20 | this.out_8.string = data.getFormat("8") 21 | this.out_10.string = data.getFormat("10") 22 | this.out_16.string = data.getFormat("16") 23 | this.highLightTabel(data.parseString()) 24 | event.stopPropagation() 25 | }, this) 26 | }, 27 | 28 | highLightTabel(json){ 29 | this.reFresh(this.element.children) 30 | for(var order of json){ 31 | this.highLightEle(order) 32 | } 33 | }, 34 | 35 | highLightEle(order){ 36 | if(this.element.getChildByName("m"+order)===null){ 37 | /** **/ 38 | }else{ 39 | this.element.getChildByName("m"+order).color = 40 | cc.Color.GREEN 41 | } 42 | }, 43 | 44 | reFresh(array){ 45 | for(var ele of array){ 46 | ele.color = cc.Color.BLACK 47 | } 48 | }, 49 | }) 50 | -------------------------------------------------------------------------------- /MVC/assets/script/main.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "1c60202f-62f8-48db-9626-eaa280847401", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /MVC/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 | } -------------------------------------------------------------------------------- /MVC/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos-creator-js", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /MVC/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 | "cocos-analytics": { 24 | "enable": false, 25 | "appID": "13798", 26 | "appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2" 27 | } 28 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CocosCreatorExam 2 | some simple demos 3 | 4 | 1.[摄像机实验](https://saber2pr.github.io/MyWeb/build/CameraIdea/build/web-mobile) 5 | * ![loadingImage](https://github.com/Saber2pr/MyWeb/blob/master/resource/CameraIdea.png) 6 | 2. [随机抽奖转盘实验](https://saber2pr.github.io/MyWeb/build/RandPlat/build/web-mobile) [>>>] [CSDN](https://blog.csdn.net/u011607490/article/details/82701325) 7 | 8 | 3. [触摸摇杆插件](https://github.com/Saber2pr/ccc-bullet) 9 | 10 | 4. [摄像机实现场景切换2.0](https://saber2pr.github.io/MyWeb/build/CameraManager/build/web-mobile) 11 | 12 | 5. [碰撞减血](https://saber2pr.github.io/MyWeb/build/collisionBar/build/web-mobile) 13 | 14 | 6. [随机生成节点](https://saber2pr.github.io/MyWeb/build/randCreate/build/web-mobile) 15 | 16 | 7. [边界检测](https://saber2pr.github.io/MyWeb/build/EdgeJudge/) 17 | 18 | 8. [动作异步回调](https://saber2pr.github.io/MyWeb/build/AsyncAction/build/web-mobile) 19 | 20 | -------------------------------------------------------------------------------- /RandPlat/.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/ -------------------------------------------------------------------------------- /RandPlat/README.md: -------------------------------------------------------------------------------- 1 | # RandPlat 2 | 3 | [viewRandPlat](https://saber2pr.github.io/CocosCreatorExam/RandPlat/build/web-mobile) 4 | -------------------------------------------------------------------------------- /RandPlat/assets/Animation.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "e8a1efc5-5a71-49ba-b8a0-37220ad0d30a", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /RandPlat/assets/Animation/rotating.anim: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.AnimationClip", 3 | "_name": "rotating", 4 | "_objFlags": 0, 5 | "_rawFiles": null, 6 | "_duration": 2, 7 | "sample": 60, 8 | "speed": 2.5, 9 | "wrapMode": "2", 10 | "curveData": { 11 | "props": { 12 | "rotation": [ 13 | { 14 | "frame": 0, 15 | "value": 45 16 | }, 17 | { 18 | "frame": 2, 19 | "value": 405 20 | } 21 | ] 22 | } 23 | }, 24 | "events": [] 25 | } -------------------------------------------------------------------------------- /RandPlat/assets/Animation/rotating.anim.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "0fbc63f9-2937-4abd-89fa-66aecd7eb5d4", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /RandPlat/assets/Animation/rotationFinish.anim: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.AnimationClip", 3 | "_name": "rotationFinish", 4 | "_objFlags": 0, 5 | "_rawFiles": null, 6 | "_duration": 1.5, 7 | "sample": 60, 8 | "speed": 1, 9 | "wrapMode": 1, 10 | "curveData": { 11 | "props": { 12 | "rotation": [ 13 | { 14 | "frame": 0, 15 | "value": 45, 16 | "curve": "sineOut" 17 | }, 18 | { 19 | "frame": 1.5, 20 | "value": 405 21 | } 22 | ] 23 | } 24 | }, 25 | "events": [] 26 | } -------------------------------------------------------------------------------- /RandPlat/assets/Animation/rotationFinish.anim.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "e81a758d-1c80-4d41-8f36-e3b9dae7e1e3", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /RandPlat/assets/Animation/rotationStart.anim: -------------------------------------------------------------------------------- 1 | { 2 | "__type__": "cc.AnimationClip", 3 | "_name": "rotationStart", 4 | "_objFlags": 0, 5 | "_rawFiles": null, 6 | "_duration": 1.5, 7 | "sample": 60, 8 | "speed": 1, 9 | "wrapMode": 1, 10 | "curveData": { 11 | "props": { 12 | "rotation": [ 13 | { 14 | "frame": 0, 15 | "value": 45, 16 | "curve": "sineIn" 17 | }, 18 | { 19 | "frame": 1.5, 20 | "value": 405 21 | } 22 | ] 23 | } 24 | }, 25 | "events": [] 26 | } -------------------------------------------------------------------------------- /RandPlat/assets/Animation/rotationStart.anim.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "14c6af78-d6e4-484b-a11b-ce60f07082ca", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /RandPlat/assets/Scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /RandPlat/assets/Scene/helloworld.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /RandPlat/assets/Script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /RandPlat/assets/Script/HelloWorld.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | 6 | }, 7 | 8 | // use this for initialization 9 | onLoad: function () { 10 | 11 | }, 12 | 13 | // called every frame 14 | update: function (dt) { 15 | 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /RandPlat/assets/Script/HelloWorld.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "280c3aec-6492-4a9d-9f51-a9b00b570b4a", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /RandPlat/assets/Script/RandPlat.js: -------------------------------------------------------------------------------- 1 | /** 2 | * By_AK-12(PrprSaber) 3 | * 2018年9月14日14:14:14 4 | * @copyright 5 | */ 6 | cc.Class({ 7 | extends: cc.Component, 8 | 9 | properties: { 10 | gifts: { 11 | default: [], 12 | type: [cc.Sprite] 13 | }, 14 | plat:cc.Node, 15 | inforLabel:cc.Label, 16 | resultLayout:cc.Node, 17 | }, 18 | 19 | originRota:null, 20 | animPlay:null, 21 | giftOrder:null, 22 | resultLabel:null, 23 | lastAngle:null, 24 | 25 | onLoad () { 26 | this.originRota = this.plat.rotation 27 | this.animPlay = this.plat.getComponent(cc.Animation) 28 | this.resultLabel = this.resultLayout.getChildByName('result').getComponent(cc.Label) 29 | this.lastAngle = this.originRota 30 | }, 31 | 32 | start () { 33 | this.plat.on("touchstart", function(){ 34 | cc.log('click') 35 | this.startPlay() 36 | }, this) 37 | }, 38 | 39 | update (dt) { 40 | this.giftOrder = this.inforRotation(this.plat.rotation-this.originRota) 41 | this.highLightGift(this.giftOrder) 42 | this.getResult() 43 | }, 44 | 45 | //随机角度 46 | randAngle(){ 47 | return parseInt(360 * cc.random0To1()) 48 | }, 49 | 50 | //开始抽奖 51 | startPlay(){ 52 | cc.log('startPlay') 53 | var stateStart = this.animPlay.play('rotationStart') 54 | this.getAngleClip(stateStart)[0] = this.lastAngle 55 | this.inforLabel.string = '等待\n结果' 56 | this.scheduleOnce(function(){ 57 | this.processPlay() 58 | }, stateStart.duration) 59 | }, 60 | 61 | //正在抽奖 62 | processPlay(){ 63 | cc.log('stateProcess') 64 | var stateProcess = this.animPlay.play('rotating') 65 | this.scheduleOnce(function(){ 66 | this.finishPlay() 67 | }, stateProcess.duration) 68 | }, 69 | 70 | //得到rotationClip的旋转值数组 71 | getAngleClip(state){ 72 | return state.curves[0].values 73 | }, 74 | 75 | //停止抽奖 76 | finishPlay(){ 77 | cc.log('finishPlay') 78 | var stateFinish = this.animPlay.play('rotationFinish') 79 | this.getAngleClip(stateFinish)[1] = this.originRota + this.randAngle() 80 | this.scheduleOnce(function(){ 81 | this.inforLabel.string = '再次\n抽奖' 82 | this.lastAngle = this.getAngleClip(stateFinish)[1] 83 | }, stateFinish.duration) 84 | }, 85 | 86 | //得到圈数 87 | getRounds(rotation){ 88 | return parseInt(rotation / 360) 89 | }, 90 | 91 | //得到序号 92 | inforRotation(rotation){ 93 | var _rotation = rotation - 360 * this.getRounds(rotation) 94 | return parseInt(_rotation / (360 / this.gifts.length) ) 95 | }, 96 | 97 | //刷新 98 | refreshColor(){ 99 | for(var _order = 0; _order < this.gifts.length; _order++){ 100 | this.gifts[_order].node.color = cc.Color.WHITE 101 | } 102 | }, 103 | 104 | //高亮奖品 105 | highLightGift(order){ 106 | this.refreshColor() 107 | this.gifts[order].node.color = cc.Color.GREEN 108 | }, 109 | 110 | //停止结果 111 | getResult(){ 112 | this.resultLabel.string = this.giftOrder + 1 113 | }, 114 | 115 | }); 116 | -------------------------------------------------------------------------------- /RandPlat/assets/Script/RandPlat.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "b25f233f-4107-43e4-a894-c05e6d12732d", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /RandPlat/assets/Texture.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "7b81d4e8-ec84-4716-968d-500ac1d78a54", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /RandPlat/assets/Texture/HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saber2pr/CocosCreatorExam/8eaafebe17a9432443937709d46262c0531ef1ab/RandPlat/assets/Texture/HelloWorld.png -------------------------------------------------------------------------------- /RandPlat/assets/Texture/HelloWorld.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "HelloWorld": { 9 | "ver": "1.0.3", 10 | "uuid": "31bc895a-c003-4566-a9f3-2e54ae1c17dc", 11 | "rawTextureUuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 195, 20 | "height": 270, 21 | "rawWidth": 195, 22 | "rawHeight": 270, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /RandPlat/assets/Texture/singleColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saber2pr/CocosCreatorExam/8eaafebe17a9432443937709d46262c0531ef1ab/RandPlat/assets/Texture/singleColor.png -------------------------------------------------------------------------------- /RandPlat/assets/Texture/singleColor.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "subMetas": { 8 | "singleColor": { 9 | "ver": "1.0.3", 10 | "uuid": "410fb916-8721-4663-bab8-34397391ace7", 11 | "rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", 12 | "trimType": "auto", 13 | "trimThreshold": 1, 14 | "rotated": false, 15 | "offsetX": 0, 16 | "offsetY": 0, 17 | "trimX": 0, 18 | "trimY": 0, 19 | "width": 2, 20 | "height": 2, 21 | "rawWidth": 2, 22 | "rawHeight": 2, 23 | "borderTop": 0, 24 | "borderBottom": 0, 25 | "borderLeft": 0, 26 | "borderRight": 0, 27 | "subMetas": {} 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /RandPlat/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 | } -------------------------------------------------------------------------------- /RandPlat/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos2d-html5", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /RandPlat/settings/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "appKey": "", 3 | "appSecret": "", 4 | "encryptJs": true, 5 | "excludeScenes": [], 6 | "fb-instant-games": {}, 7 | "includeAnySDK": false, 8 | "includeSDKBox": false, 9 | "inlineSpriteFrames": true, 10 | "inlineSpriteFrames_native": true, 11 | "jailbreakPlatform": false, 12 | "md5Cache": false, 13 | "mergeStartScene": false, 14 | "oauthLoginServer": "", 15 | "optimizeHotUpdate": false, 16 | "orientation": { 17 | "landscapeLeft": true, 18 | "landscapeRight": true, 19 | "portrait": false, 20 | "upsideDown": false 21 | }, 22 | "packageName": "org.cocos2d.helloworld", 23 | "privateKey": "", 24 | "qqplay": { 25 | "REMOTE_SERVER_ROOT": "", 26 | "orientation": "portrait" 27 | }, 28 | "renderMode": "0", 29 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", 30 | "title": "RandPlat", 31 | "webOrientation": "auto", 32 | "wechatgame": { 33 | "REMOTE_SERVER_ROOT": "", 34 | "appid": "wx6ac3f5090a6b99c5", 35 | "isSubdomain": false, 36 | "orientation": "portrait", 37 | "subContext": "" 38 | }, 39 | "xxteaKey": "fae8dcba-f368-4f", 40 | "zipCompressJs": true 41 | } -------------------------------------------------------------------------------- /RandPlat/settings/builder.panel.json: -------------------------------------------------------------------------------- 1 | { 2 | "excludeScenes": [], 3 | "packageName": "org.cocos2d.helloworld", 4 | "platform": "web-mobile", 5 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", 6 | "title": "HelloWorld" 7 | } -------------------------------------------------------------------------------- /RandPlat/settings/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "collision-matrix": [ 3 | [ 4 | true 5 | ] 6 | ], 7 | "excluded-modules": [], 8 | "group-list": [ 9 | "default" 10 | ], 11 | "start-scene": "current", 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 | "cocos-analytics": { 24 | "enable": false, 25 | "appID": "13798", 26 | "appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2" 27 | } 28 | } -------------------------------------------------------------------------------- /RandPlat/template-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saber2pr/CocosCreatorExam/8eaafebe17a9432443937709d46262c0531ef1ab/RandPlat/template-banner.png -------------------------------------------------------------------------------- /RandPlat/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TEMPLATES.helloworld.name", 3 | "desc": "TEMPLATES.helloworld.desc", 4 | "banner": "template-banner.png" 5 | } -------------------------------------------------------------------------------- /collisionBar/.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/ -------------------------------------------------------------------------------- /collisionBar/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saber2pr/CocosCreatorExam/8eaafebe17a9432443937709d46262c0531ef1ab/collisionBar/README.md -------------------------------------------------------------------------------- /collisionBar/assets/main.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 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 | "_active": true, 21 | "_level": 0, 22 | "_components": [], 23 | "_prefab": null, 24 | "_opacity": 255, 25 | "_color": { 26 | "__type__": "cc.Color", 27 | "r": 255, 28 | "g": 255, 29 | "b": 255, 30 | "a": 255 31 | }, 32 | "_contentSize": { 33 | "__type__": "cc.Size", 34 | "width": 0, 35 | "height": 0 36 | }, 37 | "_anchorPoint": { 38 | "__type__": "cc.Vec2", 39 | "x": 0, 40 | "y": 0 41 | }, 42 | "_scale": { 43 | "__type__": "cc.Vec3", 44 | "x": 0.4281005859375, 45 | "y": 0.4281005859375, 46 | "z": 1 47 | }, 48 | "_quat": { 49 | "__type__": "cc.Quat", 50 | "x": 0, 51 | "y": 0, 52 | "z": 0, 53 | "w": 1 54 | }, 55 | "_zIndex": 0, 56 | "groupIndex": 0, 57 | "autoReleaseAssets": false, 58 | "_id": "c007b7b0-cad5-4b08-b45e-a012eda5b4da" 59 | }, 60 | { 61 | "__type__": "cc.Node", 62 | "_name": "Canvas", 63 | "_objFlags": 0, 64 | "_parent": { 65 | "__id__": 1 66 | }, 67 | "_children": [ 68 | { 69 | "__id__": 3 70 | }, 71 | { 72 | "__id__": 5 73 | } 74 | ], 75 | "_active": true, 76 | "_level": 1, 77 | "_components": [ 78 | { 79 | "__id__": 34 80 | } 81 | ], 82 | "_prefab": null, 83 | "_opacity": 255, 84 | "_color": { 85 | "__type__": "cc.Color", 86 | "r": 255, 87 | "g": 255, 88 | "b": 255, 89 | "a": 255 90 | }, 91 | "_contentSize": { 92 | "__type__": "cc.Size", 93 | "width": 960, 94 | "height": 640 95 | }, 96 | "_anchorPoint": { 97 | "__type__": "cc.Vec2", 98 | "x": 0.5, 99 | "y": 0.5 100 | }, 101 | "_position": { 102 | "__type__": "cc.Vec3", 103 | "x": 480, 104 | "y": 320, 105 | "z": 0 106 | }, 107 | "_scale": { 108 | "__type__": "cc.Vec3", 109 | "x": 1, 110 | "y": 1, 111 | "z": 1 112 | }, 113 | "_rotationX": 0, 114 | "_rotationY": 0, 115 | "_quat": { 116 | "__type__": "cc.Quat", 117 | "x": 0, 118 | "y": 0, 119 | "z": 0, 120 | "w": 1 121 | }, 122 | "_skewX": 0, 123 | "_skewY": 0, 124 | "_zIndex": 0, 125 | "groupIndex": 0, 126 | "_id": "b3wivO19dBcYCC4PQJANfg" 127 | }, 128 | { 129 | "__type__": "cc.Node", 130 | "_name": "Main Camera", 131 | "_objFlags": 0, 132 | "_parent": { 133 | "__id__": 2 134 | }, 135 | "_children": [], 136 | "_active": true, 137 | "_level": 1, 138 | "_components": [ 139 | { 140 | "__id__": 4 141 | } 142 | ], 143 | "_prefab": null, 144 | "_opacity": 255, 145 | "_color": { 146 | "__type__": "cc.Color", 147 | "r": 255, 148 | "g": 255, 149 | "b": 255, 150 | "a": 255 151 | }, 152 | "_contentSize": { 153 | "__type__": "cc.Size", 154 | "width": 0, 155 | "height": 0 156 | }, 157 | "_anchorPoint": { 158 | "__type__": "cc.Vec2", 159 | "x": 0.5, 160 | "y": 0.5 161 | }, 162 | "_position": { 163 | "__type__": "cc.Vec3", 164 | "x": 0, 165 | "y": 0, 166 | "z": 0 167 | }, 168 | "_scale": { 169 | "__type__": "cc.Vec3", 170 | "x": 1, 171 | "y": 1, 172 | "z": 1 173 | }, 174 | "_rotationX": 0, 175 | "_rotationY": 0, 176 | "_quat": { 177 | "__type__": "cc.Quat", 178 | "x": 0, 179 | "y": 0, 180 | "z": 0, 181 | "w": 1 182 | }, 183 | "_skewX": 0, 184 | "_skewY": 0, 185 | "_zIndex": 0, 186 | "groupIndex": 0, 187 | "_id": "b7aqIspd5EVJEyWxYNzBaW" 188 | }, 189 | { 190 | "__type__": "cc.Camera", 191 | "_name": "", 192 | "_objFlags": 0, 193 | "node": { 194 | "__id__": 3 195 | }, 196 | "_enabled": true, 197 | "_cullingMask": 4294967295, 198 | "_clearFlags": 7, 199 | "_backgroundColor": { 200 | "__type__": "cc.Color", 201 | "r": 0, 202 | "g": 0, 203 | "b": 0, 204 | "a": 255 205 | }, 206 | "_depth": -1, 207 | "_zoomRatio": 1, 208 | "_targetTexture": null, 209 | "_id": "0ekSillUZNdpBljcm0ZYdI" 210 | }, 211 | { 212 | "__type__": "cc.Node", 213 | "_name": "layer", 214 | "_objFlags": 0, 215 | "_parent": { 216 | "__id__": 2 217 | }, 218 | "_children": [ 219 | { 220 | "__id__": 6 221 | }, 222 | { 223 | "__id__": 27 224 | } 225 | ], 226 | "_active": true, 227 | "_level": 2, 228 | "_components": [ 229 | { 230 | "__id__": 33 231 | } 232 | ], 233 | "_prefab": null, 234 | "_opacity": 255, 235 | "_color": { 236 | "__type__": "cc.Color", 237 | "r": 255, 238 | "g": 255, 239 | "b": 255, 240 | "a": 255 241 | }, 242 | "_contentSize": { 243 | "__type__": "cc.Size", 244 | "width": 0, 245 | "height": 0 246 | }, 247 | "_anchorPoint": { 248 | "__type__": "cc.Vec2", 249 | "x": 0.5, 250 | "y": 0.5 251 | }, 252 | "_position": { 253 | "__type__": "cc.Vec3", 254 | "x": 0, 255 | "y": 0, 256 | "z": 0 257 | }, 258 | "_scale": { 259 | "__type__": "cc.Vec3", 260 | "x": 1, 261 | "y": 1, 262 | "z": 1 263 | }, 264 | "_rotationX": 0, 265 | "_rotationY": 0, 266 | "_quat": { 267 | "__type__": "cc.Quat", 268 | "x": 0, 269 | "y": 0, 270 | "z": 0, 271 | "w": 1 272 | }, 273 | "_skewX": 0, 274 | "_skewY": 0, 275 | "_zIndex": 0, 276 | "groupIndex": 0, 277 | "_id": "45N/3+WaZJQ632pInKkC2p" 278 | }, 279 | { 280 | "__type__": "cc.Node", 281 | "_name": "background", 282 | "_objFlags": 0, 283 | "_parent": { 284 | "__id__": 5 285 | }, 286 | "_children": [ 287 | { 288 | "__id__": 7 289 | }, 290 | { 291 | "__id__": 11 292 | }, 293 | { 294 | "__id__": 23 295 | } 296 | ], 297 | "_active": true, 298 | "_level": 3, 299 | "_components": [ 300 | { 301 | "__id__": 25 302 | }, 303 | { 304 | "__id__": 26 305 | } 306 | ], 307 | "_prefab": null, 308 | "_opacity": 255, 309 | "_color": { 310 | "__type__": "cc.Color", 311 | "r": 71, 312 | "g": 81, 313 | "b": 107, 314 | "a": 255 315 | }, 316 | "_contentSize": { 317 | "__type__": "cc.Size", 318 | "width": 960, 319 | "height": 640 320 | }, 321 | "_anchorPoint": { 322 | "__type__": "cc.Vec2", 323 | "x": 0.5, 324 | "y": 0.5 325 | }, 326 | "_position": { 327 | "__type__": "cc.Vec3", 328 | "x": 0, 329 | "y": 0, 330 | "z": 0 331 | }, 332 | "_scale": { 333 | "__type__": "cc.Vec3", 334 | "x": 1, 335 | "y": 1, 336 | "z": 1 337 | }, 338 | "_rotationX": 0, 339 | "_rotationY": 0, 340 | "_quat": { 341 | "__type__": "cc.Quat", 342 | "x": 0, 343 | "y": 0, 344 | "z": 0, 345 | "w": 1 346 | }, 347 | "_skewX": 0, 348 | "_skewY": 0, 349 | "_zIndex": 0, 350 | "groupIndex": 0, 351 | "_id": "e4m5gotj5ME5nsXjKkKCvU" 352 | }, 353 | { 354 | "__type__": "cc.Node", 355 | "_name": "buttom", 356 | "_objFlags": 0, 357 | "_parent": { 358 | "__id__": 6 359 | }, 360 | "_children": [], 361 | "_active": true, 362 | "_level": 2, 363 | "_components": [ 364 | { 365 | "__id__": 8 366 | }, 367 | { 368 | "__id__": 9 369 | }, 370 | { 371 | "__id__": 10 372 | } 373 | ], 374 | "_prefab": null, 375 | "_opacity": 255, 376 | "_color": { 377 | "__type__": "cc.Color", 378 | "r": 14, 379 | "g": 0, 380 | "b": 116, 381 | "a": 255 382 | }, 383 | "_contentSize": { 384 | "__type__": "cc.Size", 385 | "width": 960, 386 | "height": 50 387 | }, 388 | "_anchorPoint": { 389 | "__type__": "cc.Vec2", 390 | "x": 0.5, 391 | "y": 0.5 392 | }, 393 | "_position": { 394 | "__type__": "cc.Vec3", 395 | "x": 0, 396 | "y": -227, 397 | "z": 0 398 | }, 399 | "_scale": { 400 | "__type__": "cc.Vec3", 401 | "x": 1, 402 | "y": 1, 403 | "z": 1 404 | }, 405 | "_rotationX": 0, 406 | "_rotationY": 0, 407 | "_quat": { 408 | "__type__": "cc.Quat", 409 | "x": 0, 410 | "y": 0, 411 | "z": 0, 412 | "w": 1 413 | }, 414 | "_skewX": 0, 415 | "_skewY": 0, 416 | "_zIndex": 0, 417 | "groupIndex": 0, 418 | "_id": "06NC8bP5tOlYF4LGX8ZgFj" 419 | }, 420 | { 421 | "__type__": "cc.Sprite", 422 | "_name": "", 423 | "_objFlags": 0, 424 | "node": { 425 | "__id__": 7 426 | }, 427 | "_enabled": true, 428 | "_srcBlendFactor": 770, 429 | "_dstBlendFactor": 771, 430 | "_spriteFrame": { 431 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 432 | }, 433 | "_type": 0, 434 | "_sizeMode": 0, 435 | "_fillType": 0, 436 | "_fillCenter": { 437 | "__type__": "cc.Vec2", 438 | "x": 0, 439 | "y": 0 440 | }, 441 | "_fillStart": 0, 442 | "_fillRange": 0, 443 | "_isTrimmedMode": true, 444 | "_state": 0, 445 | "_atlas": null, 446 | "_id": "ecUWPVuM5HxIugwFRA3Axv" 447 | }, 448 | { 449 | "__type__": "cc.RigidBody", 450 | "_name": "", 451 | "_objFlags": 0, 452 | "node": { 453 | "__id__": 7 454 | }, 455 | "_enabled": true, 456 | "_type": 0, 457 | "_allowSleep": true, 458 | "_gravityScale": 1, 459 | "_linearDamping": 0, 460 | "_angularDamping": 0, 461 | "_linearVelocity": { 462 | "__type__": "cc.Vec2", 463 | "x": 0, 464 | "y": 0 465 | }, 466 | "_angularVelocity": 0, 467 | "_fixedRotation": false, 468 | "enabledContactListener": false, 469 | "bullet": false, 470 | "_id": "4eGlqJI5pO9oGllFIcfNFx" 471 | }, 472 | { 473 | "__type__": "cc.PhysicsBoxCollider", 474 | "_name": "", 475 | "_objFlags": 0, 476 | "node": { 477 | "__id__": 7 478 | }, 479 | "_enabled": true, 480 | "tag": 0, 481 | "_density": 1, 482 | "_sensor": false, 483 | "_friction": 0.2, 484 | "_restitution": 0, 485 | "body": null, 486 | "_offset": { 487 | "__type__": "cc.Vec2", 488 | "x": 0, 489 | "y": 0 490 | }, 491 | "_size": { 492 | "__type__": "cc.Size", 493 | "width": 960, 494 | "height": 50 495 | }, 496 | "_id": "c2+txMz9ZI26JssJ8vqE2L" 497 | }, 498 | { 499 | "__type__": "cc.Node", 500 | "_name": "hero", 501 | "_objFlags": 0, 502 | "_parent": { 503 | "__id__": 6 504 | }, 505 | "_children": [ 506 | { 507 | "__id__": 12 508 | }, 509 | { 510 | "__id__": 17 511 | } 512 | ], 513 | "_active": true, 514 | "_level": 2, 515 | "_components": [ 516 | { 517 | "__id__": 19 518 | }, 519 | { 520 | "__id__": 20 521 | }, 522 | { 523 | "__id__": 21 524 | }, 525 | { 526 | "__id__": 22 527 | } 528 | ], 529 | "_prefab": null, 530 | "_opacity": 255, 531 | "_color": { 532 | "__type__": "cc.Color", 533 | "r": 61, 534 | "g": 255, 535 | "b": 0, 536 | "a": 255 537 | }, 538 | "_contentSize": { 539 | "__type__": "cc.Size", 540 | "width": 100, 541 | "height": 100 542 | }, 543 | "_anchorPoint": { 544 | "__type__": "cc.Vec2", 545 | "x": 0.5, 546 | "y": 0.5 547 | }, 548 | "_position": { 549 | "__type__": "cc.Vec3", 550 | "x": 0, 551 | "y": 0, 552 | "z": 0 553 | }, 554 | "_scale": { 555 | "__type__": "cc.Vec3", 556 | "x": 1, 557 | "y": 1, 558 | "z": 1 559 | }, 560 | "_rotationX": 0, 561 | "_rotationY": 0, 562 | "_quat": { 563 | "__type__": "cc.Quat", 564 | "x": 0, 565 | "y": 0, 566 | "z": 0, 567 | "w": 1 568 | }, 569 | "_skewX": 0, 570 | "_skewY": 0, 571 | "_zIndex": 0, 572 | "groupIndex": 0, 573 | "_id": "9dfGdMBXdFO4ow6bTT5+/J" 574 | }, 575 | { 576 | "__type__": "cc.Node", 577 | "_name": "blood", 578 | "_objFlags": 0, 579 | "_parent": { 580 | "__id__": 11 581 | }, 582 | "_children": [ 583 | { 584 | "__id__": 13 585 | } 586 | ], 587 | "_active": true, 588 | "_level": 3, 589 | "_components": [ 590 | { 591 | "__id__": 15 592 | }, 593 | { 594 | "__id__": 16 595 | } 596 | ], 597 | "_prefab": null, 598 | "_opacity": 255, 599 | "_color": { 600 | "__type__": "cc.Color", 601 | "r": 134, 602 | "g": 0, 603 | "b": 0, 604 | "a": 255 605 | }, 606 | "_contentSize": { 607 | "__type__": "cc.Size", 608 | "width": 300, 609 | "height": 15 610 | }, 611 | "_anchorPoint": { 612 | "__type__": "cc.Vec2", 613 | "x": 0.5, 614 | "y": 0.5 615 | }, 616 | "_position": { 617 | "__type__": "cc.Vec3", 618 | "x": 264, 619 | "y": 0, 620 | "z": 0 621 | }, 622 | "_scale": { 623 | "__type__": "cc.Vec3", 624 | "x": 1, 625 | "y": 1, 626 | "z": 1 627 | }, 628 | "_rotationX": 0, 629 | "_rotationY": 0, 630 | "_quat": { 631 | "__type__": "cc.Quat", 632 | "x": 0, 633 | "y": 0, 634 | "z": 0, 635 | "w": 1 636 | }, 637 | "_skewX": 0, 638 | "_skewY": 0, 639 | "_zIndex": 0, 640 | "groupIndex": 0, 641 | "_id": "f4BCnvPvBNYpusCewtW13x" 642 | }, 643 | { 644 | "__type__": "cc.Node", 645 | "_name": "bar", 646 | "_objFlags": 0, 647 | "_parent": { 648 | "__id__": 12 649 | }, 650 | "_children": [], 651 | "_active": true, 652 | "_level": 0, 653 | "_components": [ 654 | { 655 | "__id__": 14 656 | } 657 | ], 658 | "_prefab": null, 659 | "_opacity": 255, 660 | "_color": { 661 | "__type__": "cc.Color", 662 | "r": 255, 663 | "g": 0, 664 | "b": 0, 665 | "a": 255 666 | }, 667 | "_contentSize": { 668 | "__type__": "cc.Size", 669 | "width": 150, 670 | "height": 15 671 | }, 672 | "_anchorPoint": { 673 | "__type__": "cc.Vec2", 674 | "x": 0, 675 | "y": 0.5 676 | }, 677 | "_position": { 678 | "__type__": "cc.Vec3", 679 | "x": -150, 680 | "y": 0, 681 | "z": 0 682 | }, 683 | "_scale": { 684 | "__type__": "cc.Vec3", 685 | "x": 1, 686 | "y": 1, 687 | "z": 1 688 | }, 689 | "_rotationX": 0, 690 | "_rotationY": 0, 691 | "_quat": { 692 | "__type__": "cc.Quat", 693 | "x": 0, 694 | "y": 0, 695 | "z": 0, 696 | "w": 1 697 | }, 698 | "_skewX": 0, 699 | "_skewY": 0, 700 | "_zIndex": 0, 701 | "groupIndex": 0, 702 | "_id": "2fHZaqE49Cwq/XVtMpLv4d" 703 | }, 704 | { 705 | "__type__": "cc.Sprite", 706 | "_name": "", 707 | "_objFlags": 0, 708 | "node": { 709 | "__id__": 13 710 | }, 711 | "_enabled": true, 712 | "_srcBlendFactor": 770, 713 | "_dstBlendFactor": 771, 714 | "_spriteFrame": { 715 | "__uuid__": "67e68bc9-dad5-4ad9-a2d8-7e03d458e32f" 716 | }, 717 | "_type": 1, 718 | "_sizeMode": 0, 719 | "_fillType": 0, 720 | "_fillCenter": { 721 | "__type__": "cc.Vec2", 722 | "x": 0, 723 | "y": 0 724 | }, 725 | "_fillStart": 0, 726 | "_fillRange": 0, 727 | "_isTrimmedMode": true, 728 | "_state": 0, 729 | "_atlas": null, 730 | "_id": "52yaW6oMZD9oDIK/oRf8p7" 731 | }, 732 | { 733 | "__type__": "cc.Sprite", 734 | "_name": "", 735 | "_objFlags": 0, 736 | "node": { 737 | "__id__": 12 738 | }, 739 | "_enabled": true, 740 | "_srcBlendFactor": 770, 741 | "_dstBlendFactor": 771, 742 | "_spriteFrame": { 743 | "__uuid__": "88e79fd5-96b4-4a77-a1f4-312467171014" 744 | }, 745 | "_type": 1, 746 | "_sizeMode": 0, 747 | "_fillType": 0, 748 | "_fillCenter": { 749 | "__type__": "cc.Vec2", 750 | "x": 0, 751 | "y": 0 752 | }, 753 | "_fillStart": 0, 754 | "_fillRange": 0, 755 | "_isTrimmedMode": true, 756 | "_state": 0, 757 | "_atlas": null, 758 | "_id": "10pQjtaa9A1oRUfRVH35k8" 759 | }, 760 | { 761 | "__type__": "cc.ProgressBar", 762 | "_name": "", 763 | "_objFlags": 0, 764 | "node": { 765 | "__id__": 12 766 | }, 767 | "_enabled": true, 768 | "_N$totalLength": 300, 769 | "_N$barSprite": { 770 | "__id__": 14 771 | }, 772 | "_N$mode": 0, 773 | "_N$progress": 0.5, 774 | "_N$reverse": false, 775 | "_id": "909SYw0khPFLeuSpjI1Ax2" 776 | }, 777 | { 778 | "__type__": "cc.Node", 779 | "_name": "props", 780 | "_objFlags": 0, 781 | "_parent": { 782 | "__id__": 11 783 | }, 784 | "_children": [], 785 | "_active": true, 786 | "_level": 3, 787 | "_components": [ 788 | { 789 | "__id__": 18 790 | } 791 | ], 792 | "_prefab": null, 793 | "_opacity": 255, 794 | "_color": { 795 | "__type__": "cc.Color", 796 | "r": 255, 797 | "g": 255, 798 | "b": 255, 799 | "a": 255 800 | }, 801 | "_contentSize": { 802 | "__type__": "cc.Size", 803 | "width": 22.25, 804 | "height": 40 805 | }, 806 | "_anchorPoint": { 807 | "__type__": "cc.Vec2", 808 | "x": 0.5, 809 | "y": 0.5 810 | }, 811 | "_position": { 812 | "__type__": "cc.Vec3", 813 | "x": 273, 814 | "y": 49, 815 | "z": 0 816 | }, 817 | "_scale": { 818 | "__type__": "cc.Vec3", 819 | "x": 1, 820 | "y": 1, 821 | "z": 1 822 | }, 823 | "_rotationX": 0, 824 | "_rotationY": 0, 825 | "_quat": { 826 | "__type__": "cc.Quat", 827 | "x": 0, 828 | "y": 0, 829 | "z": 0, 830 | "w": 1 831 | }, 832 | "_skewX": 0, 833 | "_skewY": 0, 834 | "_zIndex": 0, 835 | "groupIndex": 0, 836 | "_id": "31fatNy+5NEryIiK6382aX" 837 | }, 838 | { 839 | "__type__": "cc.Label", 840 | "_name": "", 841 | "_objFlags": 0, 842 | "node": { 843 | "__id__": 17 844 | }, 845 | "_enabled": true, 846 | "_srcBlendFactor": 1, 847 | "_dstBlendFactor": 771, 848 | "_useOriginalSize": false, 849 | "_string": "0", 850 | "_N$string": "0", 851 | "_fontSize": 40, 852 | "_lineHeight": 40, 853 | "_enableWrapText": true, 854 | "_N$file": null, 855 | "_isSystemFontUsed": true, 856 | "_spacingX": 0, 857 | "_N$horizontalAlign": 1, 858 | "_N$verticalAlign": 1, 859 | "_N$fontFamily": "Arial", 860 | "_N$overflow": 0, 861 | "_id": "a03Cjgp4RKj6ko5K/0vFn1" 862 | }, 863 | { 864 | "__type__": "cc.Sprite", 865 | "_name": "", 866 | "_objFlags": 0, 867 | "node": { 868 | "__id__": 11 869 | }, 870 | "_enabled": true, 871 | "_srcBlendFactor": 770, 872 | "_dstBlendFactor": 771, 873 | "_spriteFrame": { 874 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 875 | }, 876 | "_type": 0, 877 | "_sizeMode": 0, 878 | "_fillType": 0, 879 | "_fillCenter": { 880 | "__type__": "cc.Vec2", 881 | "x": 0, 882 | "y": 0 883 | }, 884 | "_fillStart": 0, 885 | "_fillRange": 0, 886 | "_isTrimmedMode": true, 887 | "_state": 0, 888 | "_atlas": null, 889 | "_id": "24DqekXNFAF55EKb8pOp9p" 890 | }, 891 | { 892 | "__type__": "cc.RigidBody", 893 | "_name": "", 894 | "_objFlags": 0, 895 | "node": { 896 | "__id__": 11 897 | }, 898 | "_enabled": true, 899 | "_type": 2, 900 | "_allowSleep": true, 901 | "_gravityScale": 1, 902 | "_linearDamping": 0, 903 | "_angularDamping": 0, 904 | "_linearVelocity": { 905 | "__type__": "cc.Vec2", 906 | "x": 0, 907 | "y": 0 908 | }, 909 | "_angularVelocity": 0, 910 | "_fixedRotation": false, 911 | "enabledContactListener": true, 912 | "bullet": false, 913 | "_id": "66g4qCsQNCWKi5n0gUJoG4" 914 | }, 915 | { 916 | "__type__": "cc.PhysicsBoxCollider", 917 | "_name": "", 918 | "_objFlags": 0, 919 | "node": { 920 | "__id__": 11 921 | }, 922 | "_enabled": true, 923 | "tag": 0, 924 | "_density": 1, 925 | "_sensor": false, 926 | "_friction": 0.2, 927 | "_restitution": 0, 928 | "body": null, 929 | "_offset": { 930 | "__type__": "cc.Vec2", 931 | "x": 0, 932 | "y": 0 933 | }, 934 | "_size": { 935 | "__type__": "cc.Size", 936 | "width": 100, 937 | "height": 100 938 | }, 939 | "_id": "7e89JbvihPB4e6f5dXi0dv" 940 | }, 941 | { 942 | "__type__": "e7129NUCPBLUpYUtJXp9h03", 943 | "_name": "", 944 | "_objFlags": 0, 945 | "node": { 946 | "__id__": 11 947 | }, 948 | "_enabled": true, 949 | "HeroProp": { 950 | "__id__": 18 951 | }, 952 | "_id": "54+HFl5XpLFoY+zIUgrYre" 953 | }, 954 | { 955 | "__type__": "cc.Node", 956 | "_name": "enemyEntry", 957 | "_objFlags": 0, 958 | "_parent": { 959 | "__id__": 6 960 | }, 961 | "_children": [], 962 | "_active": true, 963 | "_level": 4, 964 | "_components": [ 965 | { 966 | "__id__": 24 967 | } 968 | ], 969 | "_prefab": null, 970 | "_opacity": 255, 971 | "_color": { 972 | "__type__": "cc.Color", 973 | "r": 255, 974 | "g": 255, 975 | "b": 255, 976 | "a": 255 977 | }, 978 | "_contentSize": { 979 | "__type__": "cc.Size", 980 | "width": 120, 981 | "height": 40 982 | }, 983 | "_anchorPoint": { 984 | "__type__": "cc.Vec2", 985 | "x": 0.5, 986 | "y": 0.5 987 | }, 988 | "_position": { 989 | "__type__": "cc.Vec3", 990 | "x": 0, 991 | "y": 262, 992 | "z": 0 993 | }, 994 | "_scale": { 995 | "__type__": "cc.Vec3", 996 | "x": 1, 997 | "y": 1, 998 | "z": 1 999 | }, 1000 | "_rotationX": 0, 1001 | "_rotationY": 0, 1002 | "_quat": { 1003 | "__type__": "cc.Quat", 1004 | "x": 0, 1005 | "y": 0, 1006 | "z": 0, 1007 | "w": 1 1008 | }, 1009 | "_skewX": 0, 1010 | "_skewY": 0, 1011 | "_zIndex": 0, 1012 | "groupIndex": 0, 1013 | "_id": "a0kP43p55DcLAfK5TOWJBQ" 1014 | }, 1015 | { 1016 | "__type__": "cc.Label", 1017 | "_name": "", 1018 | "_objFlags": 0, 1019 | "node": { 1020 | "__id__": 23 1021 | }, 1022 | "_enabled": true, 1023 | "_srcBlendFactor": 1, 1024 | "_dstBlendFactor": 771, 1025 | "_useOriginalSize": true, 1026 | "_string": "刷怪点", 1027 | "_N$string": "刷怪点", 1028 | "_fontSize": 40, 1029 | "_lineHeight": 40, 1030 | "_enableWrapText": true, 1031 | "_N$file": null, 1032 | "_isSystemFontUsed": true, 1033 | "_spacingX": 0, 1034 | "_N$horizontalAlign": 0, 1035 | "_N$verticalAlign": 0, 1036 | "_N$fontFamily": "Arial", 1037 | "_N$overflow": 0, 1038 | "_id": "e3q91IOoNOZIX01PE5HsuD" 1039 | }, 1040 | { 1041 | "__type__": "cc.Sprite", 1042 | "_name": "", 1043 | "_objFlags": 0, 1044 | "node": { 1045 | "__id__": 6 1046 | }, 1047 | "_enabled": true, 1048 | "_srcBlendFactor": 770, 1049 | "_dstBlendFactor": 771, 1050 | "_spriteFrame": { 1051 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 1052 | }, 1053 | "_type": 0, 1054 | "_sizeMode": 0, 1055 | "_fillType": 0, 1056 | "_fillCenter": { 1057 | "__type__": "cc.Vec2", 1058 | "x": 0, 1059 | "y": 0 1060 | }, 1061 | "_fillStart": 0, 1062 | "_fillRange": 0, 1063 | "_isTrimmedMode": true, 1064 | "_state": 0, 1065 | "_atlas": null, 1066 | "_id": "fau7NwuDRFT5p2myfwWgel" 1067 | }, 1068 | { 1069 | "__type__": "4164d1lixdP7o6m5rFuiGqx", 1070 | "_name": "", 1071 | "_objFlags": 0, 1072 | "node": { 1073 | "__id__": 6 1074 | }, 1075 | "_enabled": true, 1076 | "EnemyPrefab": { 1077 | "__uuid__": "fe3a6c5a-8814-4820-8848-a21e87593cb1" 1078 | }, 1079 | "EnemyEntry": { 1080 | "__id__": 23 1081 | }, 1082 | "EnemyNum": 10, 1083 | "_id": "2cyRiUgTRLZqoSRWlthlu0" 1084 | }, 1085 | { 1086 | "__type__": "cc.Node", 1087 | "_name": "ui", 1088 | "_objFlags": 0, 1089 | "_parent": { 1090 | "__id__": 5 1091 | }, 1092 | "_children": [ 1093 | { 1094 | "__id__": 28 1095 | } 1096 | ], 1097 | "_active": true, 1098 | "_level": 3, 1099 | "_components": [], 1100 | "_prefab": null, 1101 | "_opacity": 255, 1102 | "_color": { 1103 | "__type__": "cc.Color", 1104 | "r": 255, 1105 | "g": 255, 1106 | "b": 255, 1107 | "a": 255 1108 | }, 1109 | "_contentSize": { 1110 | "__type__": "cc.Size", 1111 | "width": 0, 1112 | "height": 0 1113 | }, 1114 | "_anchorPoint": { 1115 | "__type__": "cc.Vec2", 1116 | "x": 0.5, 1117 | "y": 0.5 1118 | }, 1119 | "_position": { 1120 | "__type__": "cc.Vec3", 1121 | "x": 0, 1122 | "y": 0, 1123 | "z": 0 1124 | }, 1125 | "_scale": { 1126 | "__type__": "cc.Vec3", 1127 | "x": 1, 1128 | "y": 1, 1129 | "z": 1 1130 | }, 1131 | "_rotationX": 0, 1132 | "_rotationY": 0, 1133 | "_quat": { 1134 | "__type__": "cc.Quat", 1135 | "x": 0, 1136 | "y": 0, 1137 | "z": 0, 1138 | "w": 1 1139 | }, 1140 | "_skewX": 0, 1141 | "_skewY": 0, 1142 | "_zIndex": 0, 1143 | "groupIndex": 0, 1144 | "_id": "f1x4mgY1JE9bQWFvxBrt7X" 1145 | }, 1146 | { 1147 | "__type__": "cc.Node", 1148 | "_name": "restartBtn", 1149 | "_objFlags": 0, 1150 | "_parent": { 1151 | "__id__": 27 1152 | }, 1153 | "_children": [ 1154 | { 1155 | "__id__": 29 1156 | } 1157 | ], 1158 | "_active": true, 1159 | "_level": 4, 1160 | "_components": [ 1161 | { 1162 | "__id__": 31 1163 | }, 1164 | { 1165 | "__id__": 32 1166 | } 1167 | ], 1168 | "_prefab": null, 1169 | "_opacity": 255, 1170 | "_color": { 1171 | "__type__": "cc.Color", 1172 | "r": 255, 1173 | "g": 255, 1174 | "b": 255, 1175 | "a": 255 1176 | }, 1177 | "_contentSize": { 1178 | "__type__": "cc.Size", 1179 | "width": 100, 1180 | "height": 40 1181 | }, 1182 | "_anchorPoint": { 1183 | "__type__": "cc.Vec2", 1184 | "x": 0.5, 1185 | "y": 0.5 1186 | }, 1187 | "_position": { 1188 | "__type__": "cc.Vec3", 1189 | "x": -369, 1190 | "y": 262, 1191 | "z": 0 1192 | }, 1193 | "_scale": { 1194 | "__type__": "cc.Vec3", 1195 | "x": 1, 1196 | "y": 1, 1197 | "z": 1 1198 | }, 1199 | "_rotationX": 0, 1200 | "_rotationY": 0, 1201 | "_quat": { 1202 | "__type__": "cc.Quat", 1203 | "x": 0, 1204 | "y": 0, 1205 | "z": 0, 1206 | "w": 1 1207 | }, 1208 | "_skewX": 0, 1209 | "_skewY": 0, 1210 | "_zIndex": 0, 1211 | "groupIndex": 0, 1212 | "_id": "86RiAHfkBJKJtMs9fHq+3z" 1213 | }, 1214 | { 1215 | "__type__": "cc.Node", 1216 | "_name": "Label", 1217 | "_objFlags": 0, 1218 | "_parent": { 1219 | "__id__": 28 1220 | }, 1221 | "_children": [], 1222 | "_active": true, 1223 | "_level": 0, 1224 | "_components": [ 1225 | { 1226 | "__id__": 30 1227 | } 1228 | ], 1229 | "_prefab": null, 1230 | "_opacity": 255, 1231 | "_color": { 1232 | "__type__": "cc.Color", 1233 | "r": 0, 1234 | "g": 0, 1235 | "b": 0, 1236 | "a": 255 1237 | }, 1238 | "_contentSize": { 1239 | "__type__": "cc.Size", 1240 | "width": 100, 1241 | "height": 40 1242 | }, 1243 | "_anchorPoint": { 1244 | "__type__": "cc.Vec2", 1245 | "x": 0.5, 1246 | "y": 0.5 1247 | }, 1248 | "_position": { 1249 | "__type__": "cc.Vec3", 1250 | "x": 0, 1251 | "y": 0, 1252 | "z": 0 1253 | }, 1254 | "_scale": { 1255 | "__type__": "cc.Vec3", 1256 | "x": 1, 1257 | "y": 1, 1258 | "z": 1 1259 | }, 1260 | "_rotationX": 0, 1261 | "_rotationY": 0, 1262 | "_quat": { 1263 | "__type__": "cc.Quat", 1264 | "x": 0, 1265 | "y": 0, 1266 | "z": 0, 1267 | "w": 1 1268 | }, 1269 | "_skewX": 0, 1270 | "_skewY": 0, 1271 | "_zIndex": 0, 1272 | "groupIndex": 0, 1273 | "_id": "5dQSkigZVO/b1o+qQ9wSgd" 1274 | }, 1275 | { 1276 | "__type__": "cc.Label", 1277 | "_name": "", 1278 | "_objFlags": 0, 1279 | "node": { 1280 | "__id__": 29 1281 | }, 1282 | "_enabled": true, 1283 | "_srcBlendFactor": 1, 1284 | "_dstBlendFactor": 771, 1285 | "_useOriginalSize": false, 1286 | "_string": "重新开始", 1287 | "_N$string": "重新开始", 1288 | "_fontSize": 20, 1289 | "_lineHeight": 40, 1290 | "_enableWrapText": false, 1291 | "_N$file": null, 1292 | "_isSystemFontUsed": true, 1293 | "_spacingX": 0, 1294 | "_N$horizontalAlign": 1, 1295 | "_N$verticalAlign": 1, 1296 | "_N$fontFamily": "Arial", 1297 | "_N$overflow": 1, 1298 | "_id": "d73HrIXfdB2IxQLK6htPsA" 1299 | }, 1300 | { 1301 | "__type__": "cc.Sprite", 1302 | "_name": "", 1303 | "_objFlags": 0, 1304 | "node": { 1305 | "__id__": 28 1306 | }, 1307 | "_enabled": true, 1308 | "_srcBlendFactor": 770, 1309 | "_dstBlendFactor": 771, 1310 | "_spriteFrame": { 1311 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1312 | }, 1313 | "_type": 1, 1314 | "_sizeMode": 0, 1315 | "_fillType": 0, 1316 | "_fillCenter": { 1317 | "__type__": "cc.Vec2", 1318 | "x": 0, 1319 | "y": 0 1320 | }, 1321 | "_fillStart": 0, 1322 | "_fillRange": 0, 1323 | "_isTrimmedMode": true, 1324 | "_state": 0, 1325 | "_atlas": null, 1326 | "_id": "faALTMq4hGk6gIX0MMco+w" 1327 | }, 1328 | { 1329 | "__type__": "cc.Button", 1330 | "_name": "", 1331 | "_objFlags": 0, 1332 | "node": { 1333 | "__id__": 28 1334 | }, 1335 | "_enabled": true, 1336 | "transition": 2, 1337 | "pressedColor": { 1338 | "__type__": "cc.Color", 1339 | "r": 255, 1340 | "g": 255, 1341 | "b": 255, 1342 | "a": 255 1343 | }, 1344 | "hoverColor": { 1345 | "__type__": "cc.Color", 1346 | "r": 255, 1347 | "g": 255, 1348 | "b": 255, 1349 | "a": 255 1350 | }, 1351 | "duration": 0.1, 1352 | "zoomScale": 1.2, 1353 | "clickEvents": [], 1354 | "_N$interactable": true, 1355 | "_N$enableAutoGrayEffect": false, 1356 | "_N$normalColor": { 1357 | "__type__": "cc.Color", 1358 | "r": 255, 1359 | "g": 255, 1360 | "b": 255, 1361 | "a": 255 1362 | }, 1363 | "_N$disabledColor": { 1364 | "__type__": "cc.Color", 1365 | "r": 255, 1366 | "g": 255, 1367 | "b": 255, 1368 | "a": 255 1369 | }, 1370 | "_N$normalSprite": { 1371 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1372 | }, 1373 | "_N$pressedSprite": { 1374 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1375 | }, 1376 | "pressedSprite": { 1377 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1378 | }, 1379 | "_N$hoverSprite": { 1380 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1381 | }, 1382 | "hoverSprite": { 1383 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1384 | }, 1385 | "_N$disabledSprite": { 1386 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 1387 | }, 1388 | "_N$target": { 1389 | "__id__": 28 1390 | }, 1391 | "_id": "45fcHW0gxJoI/cSwnZ1U4O" 1392 | }, 1393 | { 1394 | "__type__": "ef66aFBARhC5ZqAdnrDn4Wh", 1395 | "_name": "", 1396 | "_objFlags": 0, 1397 | "node": { 1398 | "__id__": 5 1399 | }, 1400 | "_enabled": true, 1401 | "HeroBlood": { 1402 | "__id__": 16 1403 | }, 1404 | "HeroProp": { 1405 | "__id__": 18 1406 | }, 1407 | "restartBtn": { 1408 | "__id__": 32 1409 | }, 1410 | "_id": "efUs1le0FCMbGROQIoYwRB" 1411 | }, 1412 | { 1413 | "__type__": "cc.Canvas", 1414 | "_name": "", 1415 | "_objFlags": 0, 1416 | "node": { 1417 | "__id__": 2 1418 | }, 1419 | "_enabled": true, 1420 | "_designResolution": { 1421 | "__type__": "cc.Size", 1422 | "width": 960, 1423 | "height": 640 1424 | }, 1425 | "_fitWidth": false, 1426 | "_fitHeight": true, 1427 | "_id": "e4xsIzG1pDhoOm/8bETaaA" 1428 | } 1429 | ] -------------------------------------------------------------------------------- /collisionBar/assets/main.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "c007b7b0-cad5-4b08-b45e-a012eda5b4da", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /collisionBar/assets/prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "62438fe7-8c6a-48d4-8dc2-d11b37d34df2", 4 | "isSubpackage": false, 5 | "subpackageName": "", 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /collisionBar/assets/prefab/enemy.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "asyncLoadAssets": false 12 | }, 13 | { 14 | "__type__": "cc.Node", 15 | "_name": "enemy", 16 | "_objFlags": 0, 17 | "_parent": null, 18 | "_children": [], 19 | "_active": true, 20 | "_level": 1, 21 | "_components": [ 22 | { 23 | "__id__": 2 24 | }, 25 | { 26 | "__id__": 3 27 | }, 28 | { 29 | "__id__": 4 30 | }, 31 | { 32 | "__id__": 5 33 | } 34 | ], 35 | "_prefab": { 36 | "__id__": 6 37 | }, 38 | "_opacity": 255, 39 | "_color": { 40 | "__type__": "cc.Color", 41 | "r": 255, 42 | "g": 224, 43 | "b": 0, 44 | "a": 255 45 | }, 46 | "_contentSize": { 47 | "__type__": "cc.Size", 48 | "width": 50, 49 | "height": 50 50 | }, 51 | "_anchorPoint": { 52 | "__type__": "cc.Vec2", 53 | "x": 0.5, 54 | "y": 0.5 55 | }, 56 | "_position": { 57 | "__type__": "cc.Vec3", 58 | "x": 0, 59 | "y": 0, 60 | "z": 0 61 | }, 62 | "_scale": { 63 | "__type__": "cc.Vec3", 64 | "x": 1, 65 | "y": 1, 66 | "z": 1 67 | }, 68 | "_rotationX": 0, 69 | "_rotationY": 0, 70 | "_quat": { 71 | "__type__": "cc.Quat", 72 | "x": 0, 73 | "y": 0, 74 | "z": 0, 75 | "w": 1 76 | }, 77 | "_skewX": 0, 78 | "_skewY": 0, 79 | "_zIndex": 0, 80 | "groupIndex": 0, 81 | "_id": "" 82 | }, 83 | { 84 | "__type__": "cc.Sprite", 85 | "_name": "", 86 | "_objFlags": 0, 87 | "node": { 88 | "__id__": 1 89 | }, 90 | "_enabled": true, 91 | "_srcBlendFactor": 770, 92 | "_dstBlendFactor": 771, 93 | "_spriteFrame": { 94 | "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" 95 | }, 96 | "_type": 0, 97 | "_sizeMode": 0, 98 | "_fillType": 0, 99 | "_fillCenter": { 100 | "__type__": "cc.Vec2", 101 | "x": 0, 102 | "y": 0 103 | }, 104 | "_fillStart": 0, 105 | "_fillRange": 0, 106 | "_isTrimmedMode": true, 107 | "_state": 0, 108 | "_atlas": null, 109 | "_id": "" 110 | }, 111 | { 112 | "__type__": "cc.RigidBody", 113 | "_name": "", 114 | "_objFlags": 0, 115 | "node": { 116 | "__id__": 1 117 | }, 118 | "_enabled": true, 119 | "_type": 2, 120 | "_allowSleep": true, 121 | "_gravityScale": 1, 122 | "_linearDamping": 0, 123 | "_angularDamping": 0, 124 | "_linearVelocity": { 125 | "__type__": "cc.Vec2", 126 | "x": 0, 127 | "y": 0 128 | }, 129 | "_angularVelocity": 0, 130 | "_fixedRotation": false, 131 | "enabledContactListener": true, 132 | "bullet": false, 133 | "_id": "" 134 | }, 135 | { 136 | "__type__": "cc.PhysicsBoxCollider", 137 | "_name": "", 138 | "_objFlags": 0, 139 | "node": { 140 | "__id__": 1 141 | }, 142 | "_enabled": true, 143 | "tag": 0, 144 | "_density": 1, 145 | "_sensor": false, 146 | "_friction": 0.2, 147 | "_restitution": 0, 148 | "body": null, 149 | "_offset": { 150 | "__type__": "cc.Vec2", 151 | "x": 0, 152 | "y": 0 153 | }, 154 | "_size": { 155 | "__type__": "cc.Size", 156 | "width": 50, 157 | "height": 50 158 | }, 159 | "_id": "" 160 | }, 161 | { 162 | "__type__": "743b9gvgJxOSoT2mBDKDmOi", 163 | "_name": "", 164 | "_objFlags": 0, 165 | "node": { 166 | "__id__": 1 167 | }, 168 | "_enabled": true, 169 | "_id": "" 170 | }, 171 | { 172 | "__type__": "cc.PrefabInfo", 173 | "root": { 174 | "__id__": 1 175 | }, 176 | "asset": { 177 | "__uuid__": "fe3a6c5a-8814-4820-8848-a21e87593cb1" 178 | }, 179 | "fileId": "85y9pq/WJN5LUG3PrDjNC4", 180 | "sync": false 181 | } 182 | ] -------------------------------------------------------------------------------- /collisionBar/assets/prefab/enemy.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "fe3a6c5a-8814-4820-8848-a21e87593cb1", 4 | "optimizationPolicy": "AUTO", 5 | "asyncLoadAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /collisionBar/assets/script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "fbc53121-3709-4c93-ac81-b1e9ed89a93a", 4 | "isSubpackage": false, 5 | "subpackageName": "", 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /collisionBar/assets/script/Attack.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | onPostSolve(contact, selfCollider, otherCollider) { 5 | selfCollider.node.destroy() 6 | } 7 | 8 | }); -------------------------------------------------------------------------------- /collisionBar/assets/script/Attack.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "743b982f-809c-4e4a-84f6-9810ca0e63a2", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /collisionBar/assets/script/Enemy.js: -------------------------------------------------------------------------------- 1 | // enemy props 2 | const ATK = 10 3 | 4 | // export the props 5 | module.exports = { 6 | ATK: ATK 7 | } -------------------------------------------------------------------------------- /collisionBar/assets/script/Enemy.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "c4c11f14-6ce5-450c-b769-c6e3f8394a6d", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /collisionBar/assets/script/Hero.js: -------------------------------------------------------------------------------- 1 | // hero props 2 | const LIFE = 100 3 | const BloodDelta = 1 / LIFE 4 | 5 | const OriginBlood = 100 * BloodDelta 6 | let currentBlood = undefined 7 | 8 | // export the props 9 | module.exports = { 10 | LIFT: LIFE, 11 | OriginBlood: OriginBlood, 12 | BloodDelta: BloodDelta, 13 | currentBlood: currentBlood 14 | } -------------------------------------------------------------------------------- /collisionBar/assets/script/Hero.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "3c4105a9-4a57-4d2e-bf92-4f4eea587ba2", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /collisionBar/assets/script/createEnemy.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | EnemyPrefab: { 6 | type: cc.Prefab, 7 | default: null, 8 | displayName: '怪物预制资源' 9 | }, 10 | EnemyEntry: { 11 | type: cc.Node, 12 | default: null, 13 | displayName: '入口' 14 | }, 15 | EnemyNum: { 16 | type: cc.Integer, 17 | default: 4, 18 | displayName: '数量' 19 | } 20 | }, 21 | 22 | start() { 23 | this.schedule(() => { 24 | cc.instantiate(this.EnemyPrefab).setParent(this.EnemyEntry) 25 | }, 1, this.EnemyNum - 1) 26 | } 27 | 28 | }); -------------------------------------------------------------------------------- /collisionBar/assets/script/createEnemy.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "4164dd65-8b17-4fee-8ea6-e6b16e886ab1", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /collisionBar/assets/script/layer.js: -------------------------------------------------------------------------------- 1 | const HeroProps = require('./Hero') 2 | 3 | cc.Class({ 4 | extends: cc.Component, 5 | 6 | properties: { 7 | HeroBlood: { 8 | type: cc.ProgressBar, 9 | default: null, 10 | displayName: '角色血条' 11 | }, 12 | HeroProp: { 13 | type: cc.Label, 14 | default: null, 15 | displayName: '角色信息' 16 | }, 17 | restartBtn: { 18 | type: cc.Button, 19 | default: null, 20 | displayName: '重新开始按钮' 21 | } 22 | }, 23 | 24 | onLoad() { 25 | cc.director.getPhysicsManager().enabled = true 26 | }, 27 | start() { 28 | // init blood 29 | HeroProps.currentBlood = HeroProps.OriginBlood 30 | // init bar 31 | this.HeroBlood.progress = HeroProps.currentBlood 32 | // init label 33 | this.HeroProp.string = parseInt(HeroProps.currentBlood * HeroProps.LIFT) 34 | // init ui 35 | this.restartBtn.node.on('click', () => { 36 | cc.director.loadScene('main') 37 | }) 38 | } 39 | }); -------------------------------------------------------------------------------- /collisionBar/assets/script/layer.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "ef66a141-0118-42e5-9a80-767ac39f85a1", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /collisionBar/assets/script/onAttacked.js: -------------------------------------------------------------------------------- 1 | const HeroProps = require('./Hero') 2 | const EnemyProps = require('./Enemy') 3 | 4 | cc.Class({ 5 | extends: cc.Component, 6 | 7 | properties: { 8 | HeroProp: { 9 | type: cc.Label, 10 | default: null, 11 | displayName: '角色信息' 12 | } 13 | }, 14 | 15 | onBeginContact(contact, selfCollider, otherCollider) { 16 | HeroProps.currentBlood -= HeroProps.BloodDelta * EnemyProps.ATK 17 | }, 18 | 19 | onPostSolve(contact, selfCollider, otherCollider) { 20 | if (HeroProps.currentBlood > 0) { 21 | selfCollider.node.getChildByName('blood').getComponent(cc.ProgressBar).progress = HeroProps.currentBlood 22 | this.HeroProp.string = parseInt(HeroProps.currentBlood * HeroProps.LIFT) 23 | } else { 24 | cc.log('!!!', HeroProps.currentBlood) 25 | selfCollider.node.destroy() 26 | } 27 | } 28 | 29 | }); -------------------------------------------------------------------------------- /collisionBar/assets/script/onAttacked.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "e7129354-08f0-4b52-9614-b495e9f61d37", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /collisionBar/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 | } -------------------------------------------------------------------------------- /collisionBar/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos-creator-js", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /collisionBar/settings/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "android-instant": { 3 | "REMOTE_SERVER_ROOT": "", 4 | "host": "", 5 | "pathPattern": "", 6 | "recordPath": "", 7 | "scheme": "https", 8 | "skipRecord": false 9 | }, 10 | "appKey": "", 11 | "appSecret": "", 12 | "encryptJs": true, 13 | "excludeScenes": [], 14 | "fb-instant-games": {}, 15 | "includeAnySDK": false, 16 | "includeSDKBox": false, 17 | "inlineSpriteFrames": true, 18 | "inlineSpriteFrames_native": true, 19 | "jailbreakPlatform": false, 20 | "md5Cache": false, 21 | "mergeStartScene": false, 22 | "oauthLoginServer": "", 23 | "optimizeHotUpdate": false, 24 | "orientation": { 25 | "landscapeLeft": true, 26 | "landscapeRight": true, 27 | "portrait": false, 28 | "upsideDown": false 29 | }, 30 | "packageName": "org.cocos2d.collisionBar", 31 | "privateKey": "", 32 | "qqplay": { 33 | "REMOTE_SERVER_ROOT": "", 34 | "orientation": "portrait" 35 | }, 36 | "startScene": "c007b7b0-cad5-4b08-b45e-a012eda5b4da", 37 | "title": "collisionBar", 38 | "webOrientation": "auto", 39 | "wechatgame": { 40 | "REMOTE_SERVER_ROOT": "", 41 | "appid": "wx6ac3f5090a6b99c5", 42 | "isSubdomain": false, 43 | "orientation": "portrait", 44 | "subContext": "" 45 | }, 46 | "xxteaKey": "c295741d-b6e2-4d", 47 | "zipCompressJs": true 48 | } -------------------------------------------------------------------------------- /collisionBar/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 | "cocos-analytics": { 24 | "enable": false, 25 | "appID": "13798", 26 | "appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2" 27 | } 28 | } -------------------------------------------------------------------------------- /randCreate/.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/ -------------------------------------------------------------------------------- /randCreate/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saber2pr/CocosCreatorExam/8eaafebe17a9432443937709d46262c0531ef1ab/randCreate/README.md -------------------------------------------------------------------------------- /randCreate/assets/Scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /randCreate/assets/Scene/helloworld.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 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 | "_active": true, 21 | "_level": 0, 22 | "_components": [], 23 | "_prefab": null, 24 | "_opacity": 255, 25 | "_color": { 26 | "__type__": "cc.Color", 27 | "r": 255, 28 | "g": 255, 29 | "b": 255, 30 | "a": 255 31 | }, 32 | "_contentSize": { 33 | "__type__": "cc.Size", 34 | "width": 0, 35 | "height": 0 36 | }, 37 | "_anchorPoint": { 38 | "__type__": "cc.Vec2", 39 | "x": 0, 40 | "y": 0 41 | }, 42 | "_scale": { 43 | "__type__": "cc.Vec3", 44 | "x": 0.4281005859375, 45 | "y": 0.4281005859375, 46 | "z": 1 47 | }, 48 | "_quat": { 49 | "__type__": "cc.Quat", 50 | "x": 0, 51 | "y": 0, 52 | "z": 0, 53 | "w": 1 54 | }, 55 | "_zIndex": 0, 56 | "groupIndex": 0, 57 | "autoReleaseAssets": false, 58 | "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49" 59 | }, 60 | { 61 | "__type__": "cc.Node", 62 | "_name": "Canvas", 63 | "_objFlags": 0, 64 | "_parent": { 65 | "__id__": 1 66 | }, 67 | "_children": [ 68 | { 69 | "__id__": 3 70 | }, 71 | { 72 | "__id__": 5 73 | }, 74 | { 75 | "__id__": 8 76 | } 77 | ], 78 | "_active": true, 79 | "_level": 0, 80 | "_components": [ 81 | { 82 | "__id__": 10 83 | }, 84 | { 85 | "__id__": 11 86 | } 87 | ], 88 | "_prefab": null, 89 | "_opacity": 255, 90 | "_color": { 91 | "__type__": "cc.Color", 92 | "r": 252, 93 | "g": 252, 94 | "b": 252, 95 | "a": 255 96 | }, 97 | "_contentSize": { 98 | "__type__": "cc.Size", 99 | "width": 960, 100 | "height": 640 101 | }, 102 | "_anchorPoint": { 103 | "__type__": "cc.Vec2", 104 | "x": 0.5, 105 | "y": 0.5 106 | }, 107 | "_position": { 108 | "__type__": "cc.Vec3", 109 | "x": 480, 110 | "y": 320, 111 | "z": 0 112 | }, 113 | "_scale": { 114 | "__type__": "cc.Vec3", 115 | "x": 1, 116 | "y": 1, 117 | "z": 1 118 | }, 119 | "_rotationX": 0, 120 | "_rotationY": 0, 121 | "_quat": { 122 | "__type__": "cc.Quat", 123 | "x": 0, 124 | "y": 0, 125 | "z": 0, 126 | "w": 1 127 | }, 128 | "_skewX": 0, 129 | "_skewY": 0, 130 | "_zIndex": 0, 131 | "groupIndex": 0, 132 | "_id": "a286bbGknJLZpRpxROV6M94" 133 | }, 134 | { 135 | "__type__": "cc.Node", 136 | "_name": "Main Camera", 137 | "_objFlags": 0, 138 | "_parent": { 139 | "__id__": 2 140 | }, 141 | "_children": [], 142 | "_active": true, 143 | "_level": 1, 144 | "_components": [ 145 | { 146 | "__id__": 4 147 | } 148 | ], 149 | "_prefab": null, 150 | "_opacity": 255, 151 | "_color": { 152 | "__type__": "cc.Color", 153 | "r": 255, 154 | "g": 255, 155 | "b": 255, 156 | "a": 255 157 | }, 158 | "_contentSize": { 159 | "__type__": "cc.Size", 160 | "width": 0, 161 | "height": 0 162 | }, 163 | "_anchorPoint": { 164 | "__type__": "cc.Vec2", 165 | "x": 0.5, 166 | "y": 0.5 167 | }, 168 | "_position": { 169 | "__type__": "cc.Vec3", 170 | "x": 0, 171 | "y": 0, 172 | "z": 0 173 | }, 174 | "_scale": { 175 | "__type__": "cc.Vec3", 176 | "x": 1, 177 | "y": 1, 178 | "z": 1 179 | }, 180 | "_rotationX": 0, 181 | "_rotationY": 0, 182 | "_quat": { 183 | "__type__": "cc.Quat", 184 | "x": 0, 185 | "y": 0, 186 | "z": 0, 187 | "w": 1 188 | }, 189 | "_skewX": 0, 190 | "_skewY": 0, 191 | "_zIndex": 0, 192 | "groupIndex": 0, 193 | "_id": "29XQVoPlBHNKbkWACjoPMS" 194 | }, 195 | { 196 | "__type__": "cc.Camera", 197 | "_name": "", 198 | "_objFlags": 0, 199 | "node": { 200 | "__id__": 3 201 | }, 202 | "_enabled": true, 203 | "_cullingMask": 4294967295, 204 | "_clearFlags": 7, 205 | "_backgroundColor": { 206 | "__type__": "cc.Color", 207 | "r": 0, 208 | "g": 0, 209 | "b": 0, 210 | "a": 255 211 | }, 212 | "_depth": -1, 213 | "_zoomRatio": 1, 214 | "_targetTexture": null, 215 | "_id": "3a4prRyudEGJUNSpAJPzdY" 216 | }, 217 | { 218 | "__type__": "cc.Node", 219 | "_name": "background", 220 | "_objFlags": 0, 221 | "_parent": { 222 | "__id__": 2 223 | }, 224 | "_children": [], 225 | "_active": true, 226 | "_level": 0, 227 | "_components": [ 228 | { 229 | "__id__": 6 230 | }, 231 | { 232 | "__id__": 7 233 | } 234 | ], 235 | "_prefab": null, 236 | "_opacity": 255, 237 | "_color": { 238 | "__type__": "cc.Color", 239 | "r": 27, 240 | "g": 38, 241 | "b": 46, 242 | "a": 255 243 | }, 244 | "_contentSize": { 245 | "__type__": "cc.Size", 246 | "width": 960, 247 | "height": 640 248 | }, 249 | "_anchorPoint": { 250 | "__type__": "cc.Vec2", 251 | "x": 0.5, 252 | "y": 0.5 253 | }, 254 | "_position": { 255 | "__type__": "cc.Vec3", 256 | "x": 0, 257 | "y": 0, 258 | "z": 0 259 | }, 260 | "_scale": { 261 | "__type__": "cc.Vec3", 262 | "x": 1, 263 | "y": 1, 264 | "z": 1 265 | }, 266 | "_rotationX": 0, 267 | "_rotationY": 0, 268 | "_quat": { 269 | "__type__": "cc.Quat", 270 | "x": 0, 271 | "y": 0, 272 | "z": 0, 273 | "w": 1 274 | }, 275 | "_skewX": 0, 276 | "_skewY": 0, 277 | "_zIndex": 0, 278 | "groupIndex": 0, 279 | "_id": "e2e0crkOLxGrpMxpbC4iQg1" 280 | }, 281 | { 282 | "__type__": "cc.Widget", 283 | "_name": "", 284 | "_objFlags": 0, 285 | "node": { 286 | "__id__": 5 287 | }, 288 | "_enabled": true, 289 | "alignMode": 1, 290 | "_target": null, 291 | "_alignFlags": 45, 292 | "_left": 0, 293 | "_right": 0, 294 | "_top": 0, 295 | "_bottom": 0, 296 | "_verticalCenter": 0, 297 | "_horizontalCenter": 0, 298 | "_isAbsLeft": true, 299 | "_isAbsRight": true, 300 | "_isAbsTop": true, 301 | "_isAbsBottom": true, 302 | "_isAbsHorizontalCenter": true, 303 | "_isAbsVerticalCenter": true, 304 | "_originalWidth": 200, 305 | "_originalHeight": 150, 306 | "_id": "f7EkN4CEVBQLEmK9cf8d9G" 307 | }, 308 | { 309 | "__type__": "cc.Sprite", 310 | "_name": "", 311 | "_objFlags": 0, 312 | "node": { 313 | "__id__": 5 314 | }, 315 | "_enabled": true, 316 | "_srcBlendFactor": 770, 317 | "_dstBlendFactor": 771, 318 | "_spriteFrame": { 319 | "__uuid__": "410fb916-8721-4663-bab8-34397391ace7" 320 | }, 321 | "_type": 1, 322 | "_sizeMode": 1, 323 | "_fillType": 0, 324 | "_fillCenter": { 325 | "__type__": "cc.Vec2", 326 | "x": 0, 327 | "y": 0 328 | }, 329 | "_fillStart": 0, 330 | "_fillRange": 0, 331 | "_isTrimmedMode": true, 332 | "_state": 0, 333 | "_atlas": null, 334 | "_id": "d0xDrP/ztDqZTZOFOeIfk+" 335 | }, 336 | { 337 | "__type__": "cc.Node", 338 | "_name": "label", 339 | "_objFlags": 0, 340 | "_parent": { 341 | "__id__": 2 342 | }, 343 | "_children": [], 344 | "_active": true, 345 | "_level": 0, 346 | "_components": [ 347 | { 348 | "__id__": 9 349 | } 350 | ], 351 | "_prefab": null, 352 | "_opacity": 255, 353 | "_color": { 354 | "__type__": "cc.Color", 355 | "r": 255, 356 | "g": 255, 357 | "b": 255, 358 | "a": 255 359 | }, 360 | "_contentSize": { 361 | "__type__": "cc.Size", 362 | "width": 146.81, 363 | "height": 60 364 | }, 365 | "_anchorPoint": { 366 | "__type__": "cc.Vec2", 367 | "x": 0.5, 368 | "y": 0.5 369 | }, 370 | "_position": { 371 | "__type__": "cc.Vec3", 372 | "x": 0, 373 | "y": -180, 374 | "z": 0 375 | }, 376 | "_scale": { 377 | "__type__": "cc.Vec3", 378 | "x": 1, 379 | "y": 1, 380 | "z": 1 381 | }, 382 | "_rotationX": 0, 383 | "_rotationY": 0, 384 | "_quat": { 385 | "__type__": "cc.Quat", 386 | "x": 0, 387 | "y": 0, 388 | "z": 0, 389 | "w": 1 390 | }, 391 | "_skewX": 0, 392 | "_skewY": 0, 393 | "_zIndex": 0, 394 | "groupIndex": 0, 395 | "_id": "31f1bH7V69Ajr1iXhluMpTB" 396 | }, 397 | { 398 | "__type__": "cc.Label", 399 | "_name": "", 400 | "_objFlags": 0, 401 | "node": { 402 | "__id__": 8 403 | }, 404 | "_enabled": true, 405 | "_srcBlendFactor": 1, 406 | "_dstBlendFactor": 771, 407 | "_useOriginalSize": false, 408 | "_string": "Label", 409 | "_N$string": "Label", 410 | "_fontSize": 60, 411 | "_lineHeight": 60, 412 | "_enableWrapText": true, 413 | "_N$file": null, 414 | "_isSystemFontUsed": true, 415 | "_spacingX": 0, 416 | "_N$horizontalAlign": 1, 417 | "_N$verticalAlign": 1, 418 | "_N$fontFamily": "Arial", 419 | "_N$overflow": 0, 420 | "_id": "88bPkUrRRJ1Yiu+3mn59qY" 421 | }, 422 | { 423 | "__type__": "cc.Canvas", 424 | "_name": "", 425 | "_objFlags": 0, 426 | "node": { 427 | "__id__": 2 428 | }, 429 | "_enabled": true, 430 | "_designResolution": { 431 | "__type__": "cc.Size", 432 | "width": 960, 433 | "height": 640 434 | }, 435 | "_fitWidth": false, 436 | "_fitHeight": true, 437 | "_id": "ec0M6N20hGArsNb59q+atw" 438 | }, 439 | { 440 | "__type__": "280c3rsZJJKnZ9RqbALVwtK", 441 | "_name": "", 442 | "_objFlags": 0, 443 | "node": { 444 | "__id__": 2 445 | }, 446 | "_enabled": true, 447 | "cocosList": [ 448 | { 449 | "__uuid__": "463df748-0686-466a-8341-923225b5d7f1" 450 | }, 451 | { 452 | "__uuid__": "912109f9-e972-4403-984a-35a9a8515489" 453 | }, 454 | { 455 | "__uuid__": "ff277a10-77c5-4740-8c8f-0389bfa22120" 456 | } 457 | ], 458 | "background": { 459 | "__id__": 5 460 | }, 461 | "_id": "12LTf6DStHy4aEERLjTnz/" 462 | } 463 | ] -------------------------------------------------------------------------------- /randCreate/assets/Scene/helloworld.fire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49", 4 | "asyncLoadAssets": false, 5 | "autoReleaseAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /randCreate/assets/Script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /randCreate/assets/Script/HelloWorld.js: -------------------------------------------------------------------------------- 1 | cc.Class({ 2 | extends: cc.Component, 3 | 4 | properties: { 5 | cocosList: { 6 | type: [cc.Prefab], 7 | default: [] 8 | }, 9 | background: { 10 | type: cc.Node, 11 | default: null 12 | } 13 | 14 | }, 15 | 16 | // use this for initialization 17 | onLoad: function () {}, 18 | 19 | start() { 20 | this.launch() 21 | }, 22 | 23 | launch() { 24 | this.schedule(() => { 25 | this.createCocos(this.randPos()) 26 | }, 1) 27 | }, 28 | 29 | randValue: (min, max) => min + (max - min) * Math.random(), 30 | 31 | randPos: () => cc.v2(this.randValue(-960 / 2, 960 / 2), this.randValue(-640 / 2, 640 / 2)), 32 | 33 | createCocos(pos) { 34 | let newCocos = cc.instantiate(this.getRandPrefab()) 35 | newCocos.setParent(this.background) 36 | newCocos.setPosition(pos) 37 | }, 38 | 39 | getRandPrefab() { 40 | let index = parseInt(this.randValue(0, this.cocosList.length)) 41 | if (index < this.cocosList.length) { 42 | cc.log(index) 43 | return this.cocosList[index] 44 | } else { 45 | throw new Error('no such prefab:' + index) 46 | } 47 | } 48 | 49 | }); -------------------------------------------------------------------------------- /randCreate/assets/Script/HelloWorld.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "280c3aec-6492-4a9d-9f51-a9b00b570b4a", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /randCreate/assets/Texture.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "7b81d4e8-ec84-4716-968d-500ac1d78a54", 4 | "isGroup": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /randCreate/assets/Texture/HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saber2pr/CocosCreatorExam/8eaafebe17a9432443937709d46262c0531ef1ab/randCreate/assets/Texture/HelloWorld.png -------------------------------------------------------------------------------- /randCreate/assets/Texture/HelloWorld.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "2.2.0", 3 | "uuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "premultiplyAlpha": false, 8 | "subMetas": { 9 | "HelloWorld": { 10 | "ver": "1.0.3", 11 | "uuid": "31bc895a-c003-4566-a9f3-2e54ae1c17dc", 12 | "rawTextureUuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", 13 | "trimType": "auto", 14 | "trimThreshold": 1, 15 | "rotated": false, 16 | "offsetX": 0, 17 | "offsetY": 0, 18 | "trimX": 0, 19 | "trimY": 0, 20 | "width": 195, 21 | "height": 270, 22 | "rawWidth": 195, 23 | "rawHeight": 270, 24 | "borderTop": 0, 25 | "borderBottom": 0, 26 | "borderLeft": 0, 27 | "borderRight": 0, 28 | "subMetas": {} 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /randCreate/assets/Texture/singleColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saber2pr/CocosCreatorExam/8eaafebe17a9432443937709d46262c0531ef1ab/randCreate/assets/Texture/singleColor.png -------------------------------------------------------------------------------- /randCreate/assets/Texture/singleColor.png.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "2.2.0", 3 | "uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", 4 | "type": "sprite", 5 | "wrapMode": "clamp", 6 | "filterMode": "bilinear", 7 | "premultiplyAlpha": false, 8 | "subMetas": { 9 | "singleColor": { 10 | "ver": "1.0.3", 11 | "uuid": "410fb916-8721-4663-bab8-34397391ace7", 12 | "rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", 13 | "trimType": "auto", 14 | "trimThreshold": 1, 15 | "rotated": false, 16 | "offsetX": 0, 17 | "offsetY": 0, 18 | "trimX": 0, 19 | "trimY": 0, 20 | "width": 2, 21 | "height": 2, 22 | "rawWidth": 2, 23 | "rawHeight": 2, 24 | "borderTop": 0, 25 | "borderBottom": 0, 26 | "borderLeft": 0, 27 | "borderRight": 0, 28 | "subMetas": {} 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /randCreate/assets/prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "986ae5bf-c0f4-455c-a899-ccf93e6edfb7", 4 | "isSubpackage": false, 5 | "subpackageName": "", 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /randCreate/assets/prefab/cocos0.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "asyncLoadAssets": false 12 | }, 13 | { 14 | "__type__": "cc.Node", 15 | "_name": "cocos", 16 | "_objFlags": 0, 17 | "_parent": null, 18 | "_children": [], 19 | "_active": true, 20 | "_level": 1, 21 | "_components": [ 22 | { 23 | "__id__": 2 24 | } 25 | ], 26 | "_prefab": { 27 | "__id__": 3 28 | }, 29 | "_opacity": 255, 30 | "_color": { 31 | "__type__": "cc.Color", 32 | "r": 255, 33 | "g": 255, 34 | "b": 255, 35 | "a": 255 36 | }, 37 | "_contentSize": { 38 | "__type__": "cc.Size", 39 | "width": 195, 40 | "height": 270 41 | }, 42 | "_anchorPoint": { 43 | "__type__": "cc.Vec2", 44 | "x": 0.5, 45 | "y": 0.5 46 | }, 47 | "_position": { 48 | "__type__": "cc.Vec3", 49 | "x": 0, 50 | "y": 50, 51 | "z": 0 52 | }, 53 | "_scale": { 54 | "__type__": "cc.Vec3", 55 | "x": 1, 56 | "y": 1, 57 | "z": 1 58 | }, 59 | "_rotationX": 0, 60 | "_rotationY": 0, 61 | "_quat": { 62 | "__type__": "cc.Quat", 63 | "x": 0, 64 | "y": 0, 65 | "z": 0, 66 | "w": 1 67 | }, 68 | "_skewX": 0, 69 | "_skewY": 0, 70 | "_zIndex": 0, 71 | "groupIndex": 0, 72 | "_id": "" 73 | }, 74 | { 75 | "__type__": "cc.Sprite", 76 | "_name": "", 77 | "_objFlags": 0, 78 | "node": { 79 | "__id__": 1 80 | }, 81 | "_enabled": true, 82 | "_srcBlendFactor": 770, 83 | "_dstBlendFactor": 771, 84 | "_spriteFrame": { 85 | "__uuid__": "31bc895a-c003-4566-a9f3-2e54ae1c17dc" 86 | }, 87 | "_type": 0, 88 | "_sizeMode": 1, 89 | "_fillType": 0, 90 | "_fillCenter": { 91 | "__type__": "cc.Vec2", 92 | "x": 0, 93 | "y": 0 94 | }, 95 | "_fillStart": 0, 96 | "_fillRange": 0, 97 | "_isTrimmedMode": true, 98 | "_state": 0, 99 | "_atlas": null, 100 | "_id": "" 101 | }, 102 | { 103 | "__type__": "cc.PrefabInfo", 104 | "root": { 105 | "__id__": 1 106 | }, 107 | "asset": { 108 | "__uuid__": "463df748-0686-466a-8341-923225b5d7f1" 109 | }, 110 | "fileId": "c4f30YOS65G64U2TwufdJ+2", 111 | "sync": false 112 | } 113 | ] -------------------------------------------------------------------------------- /randCreate/assets/prefab/cocos0.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "463df748-0686-466a-8341-923225b5d7f1", 4 | "optimizationPolicy": "AUTO", 5 | "asyncLoadAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /randCreate/assets/prefab/cocos1.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "asyncLoadAssets": false 12 | }, 13 | { 14 | "__type__": "cc.Node", 15 | "_name": "cocos", 16 | "_objFlags": 0, 17 | "_parent": null, 18 | "_children": [], 19 | "_active": true, 20 | "_level": 1, 21 | "_components": [ 22 | { 23 | "__id__": 2 24 | } 25 | ], 26 | "_prefab": { 27 | "__id__": 3 28 | }, 29 | "_opacity": 255, 30 | "_color": { 31 | "__type__": "cc.Color", 32 | "r": 255, 33 | "g": 0, 34 | "b": 0, 35 | "a": 255 36 | }, 37 | "_contentSize": { 38 | "__type__": "cc.Size", 39 | "width": 195, 40 | "height": 270 41 | }, 42 | "_anchorPoint": { 43 | "__type__": "cc.Vec2", 44 | "x": 0.5, 45 | "y": 0.5 46 | }, 47 | "_position": { 48 | "__type__": "cc.Vec3", 49 | "x": 0, 50 | "y": 50, 51 | "z": 0 52 | }, 53 | "_scale": { 54 | "__type__": "cc.Vec3", 55 | "x": 1, 56 | "y": 1, 57 | "z": 1 58 | }, 59 | "_rotationX": 0, 60 | "_rotationY": 0, 61 | "_quat": { 62 | "__type__": "cc.Quat", 63 | "x": 0, 64 | "y": 0, 65 | "z": 0, 66 | "w": 1 67 | }, 68 | "_skewX": 0, 69 | "_skewY": 0, 70 | "_zIndex": 0, 71 | "groupIndex": 0, 72 | "_id": "" 73 | }, 74 | { 75 | "__type__": "cc.Sprite", 76 | "_name": "", 77 | "_objFlags": 0, 78 | "node": { 79 | "__id__": 1 80 | }, 81 | "_enabled": true, 82 | "_srcBlendFactor": 770, 83 | "_dstBlendFactor": 771, 84 | "_spriteFrame": { 85 | "__uuid__": "31bc895a-c003-4566-a9f3-2e54ae1c17dc" 86 | }, 87 | "_type": 0, 88 | "_sizeMode": 1, 89 | "_fillType": 0, 90 | "_fillCenter": { 91 | "__type__": "cc.Vec2", 92 | "x": 0, 93 | "y": 0 94 | }, 95 | "_fillStart": 0, 96 | "_fillRange": 0, 97 | "_isTrimmedMode": true, 98 | "_state": 0, 99 | "_atlas": null, 100 | "_id": "" 101 | }, 102 | { 103 | "__type__": "cc.PrefabInfo", 104 | "root": { 105 | "__id__": 1 106 | }, 107 | "asset": { 108 | "__uuid__": "912109f9-e972-4403-984a-35a9a8515489" 109 | }, 110 | "fileId": "c4f30YOS65G64U2TwufdJ+2", 111 | "sync": false 112 | } 113 | ] -------------------------------------------------------------------------------- /randCreate/assets/prefab/cocos1.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "912109f9-e972-4403-984a-35a9a8515489", 4 | "optimizationPolicy": "AUTO", 5 | "asyncLoadAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /randCreate/assets/prefab/cocos2.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_native": "", 7 | "data": { 8 | "__id__": 1 9 | }, 10 | "optimizationPolicy": 0, 11 | "asyncLoadAssets": false 12 | }, 13 | { 14 | "__type__": "cc.Node", 15 | "_name": "cocos", 16 | "_objFlags": 0, 17 | "_parent": null, 18 | "_children": [], 19 | "_active": true, 20 | "_level": 1, 21 | "_components": [ 22 | { 23 | "__id__": 2 24 | } 25 | ], 26 | "_prefab": { 27 | "__id__": 3 28 | }, 29 | "_opacity": 255, 30 | "_color": { 31 | "__type__": "cc.Color", 32 | "r": 235, 33 | "g": 255, 34 | "b": 0, 35 | "a": 255 36 | }, 37 | "_contentSize": { 38 | "__type__": "cc.Size", 39 | "width": 195, 40 | "height": 270 41 | }, 42 | "_anchorPoint": { 43 | "__type__": "cc.Vec2", 44 | "x": 0.5, 45 | "y": 0.5 46 | }, 47 | "_position": { 48 | "__type__": "cc.Vec3", 49 | "x": 0, 50 | "y": 50, 51 | "z": 0 52 | }, 53 | "_scale": { 54 | "__type__": "cc.Vec3", 55 | "x": 1, 56 | "y": 1, 57 | "z": 1 58 | }, 59 | "_rotationX": 0, 60 | "_rotationY": 0, 61 | "_quat": { 62 | "__type__": "cc.Quat", 63 | "x": 0, 64 | "y": 0, 65 | "z": 0, 66 | "w": 1 67 | }, 68 | "_skewX": 0, 69 | "_skewY": 0, 70 | "_zIndex": 0, 71 | "groupIndex": 0, 72 | "_id": "" 73 | }, 74 | { 75 | "__type__": "cc.Sprite", 76 | "_name": "", 77 | "_objFlags": 0, 78 | "node": { 79 | "__id__": 1 80 | }, 81 | "_enabled": true, 82 | "_srcBlendFactor": 770, 83 | "_dstBlendFactor": 771, 84 | "_spriteFrame": { 85 | "__uuid__": "31bc895a-c003-4566-a9f3-2e54ae1c17dc" 86 | }, 87 | "_type": 0, 88 | "_sizeMode": 1, 89 | "_fillType": 0, 90 | "_fillCenter": { 91 | "__type__": "cc.Vec2", 92 | "x": 0, 93 | "y": 0 94 | }, 95 | "_fillStart": 0, 96 | "_fillRange": 0, 97 | "_isTrimmedMode": true, 98 | "_state": 0, 99 | "_atlas": null, 100 | "_id": "" 101 | }, 102 | { 103 | "__type__": "cc.PrefabInfo", 104 | "root": { 105 | "__id__": 1 106 | }, 107 | "asset": { 108 | "__uuid__": "ff277a10-77c5-4740-8c8f-0389bfa22120" 109 | }, 110 | "fileId": "c4f30YOS65G64U2TwufdJ+2", 111 | "sync": false 112 | } 113 | ] -------------------------------------------------------------------------------- /randCreate/assets/prefab/cocos2.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "ff277a10-77c5-4740-8c8f-0389bfa22120", 4 | "optimizationPolicy": "AUTO", 5 | "asyncLoadAssets": false, 6 | "subMetas": {} 7 | } -------------------------------------------------------------------------------- /randCreate/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 | } -------------------------------------------------------------------------------- /randCreate/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos2d-html5", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /randCreate/settings/builder.json: -------------------------------------------------------------------------------- 1 | { 2 | "android-instant": { 3 | "REMOTE_SERVER_ROOT": "", 4 | "host": "", 5 | "pathPattern": "", 6 | "recordPath": "", 7 | "scheme": "https", 8 | "skipRecord": false 9 | }, 10 | "appKey": "", 11 | "appSecret": "", 12 | "encryptJs": true, 13 | "excludeScenes": [], 14 | "fb-instant-games": {}, 15 | "includeAnySDK": false, 16 | "includeSDKBox": false, 17 | "inlineSpriteFrames": true, 18 | "inlineSpriteFrames_native": true, 19 | "jailbreakPlatform": false, 20 | "md5Cache": false, 21 | "mergeStartScene": false, 22 | "oauthLoginServer": "", 23 | "optimizeHotUpdate": false, 24 | "orientation": { 25 | "landscapeLeft": true, 26 | "landscapeRight": true, 27 | "portrait": false, 28 | "upsideDown": false 29 | }, 30 | "packageName": "org.cocos2d.helloworld", 31 | "privateKey": "", 32 | "qqplay": { 33 | "REMOTE_SERVER_ROOT": "", 34 | "orientation": "portrait" 35 | }, 36 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", 37 | "title": "hello_world", 38 | "webOrientation": "auto", 39 | "wechatgame": { 40 | "REMOTE_SERVER_ROOT": "", 41 | "appid": "wx6ac3f5090a6b99c5", 42 | "isSubdomain": false, 43 | "orientation": "portrait", 44 | "subContext": "" 45 | }, 46 | "xxteaKey": "9995b449-b153-43", 47 | "zipCompressJs": true 48 | } -------------------------------------------------------------------------------- /randCreate/settings/builder.panel.json: -------------------------------------------------------------------------------- 1 | { 2 | "excludeScenes": [], 3 | "packageName": "org.cocos2d.helloworld", 4 | "platform": "web-mobile", 5 | "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49", 6 | "title": "HelloWorld" 7 | } -------------------------------------------------------------------------------- /randCreate/settings/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "collision-matrix": [ 3 | [ 4 | true 5 | ] 6 | ], 7 | "excluded-modules": [], 8 | "group-list": [ 9 | "default" 10 | ], 11 | "start-scene": "current", 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 | "cocos-analytics": { 24 | "enable": false, 25 | "appID": "13798", 26 | "appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2" 27 | } 28 | } -------------------------------------------------------------------------------- /randCreate/template-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Saber2pr/CocosCreatorExam/8eaafebe17a9432443937709d46262c0531ef1ab/randCreate/template-banner.png -------------------------------------------------------------------------------- /randCreate/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TEMPLATES.helloworld.name", 3 | "desc": "TEMPLATES.helloworld.desc", 4 | "banner": "template-banner.png" 5 | } --------------------------------------------------------------------------------