├── .gitignore ├── README.md ├── assets ├── res.meta ├── res │ ├── prefab.meta │ ├── prefab │ │ ├── tipsNode.prefab │ │ └── tipsNode.prefab.meta │ ├── texture.meta │ └── texture │ │ ├── HelloWorld.png │ │ ├── HelloWorld.png.meta │ │ ├── singleColor.png │ │ └── singleColor.png.meta ├── resources.meta ├── scene.meta ├── scene │ ├── helloworld.fire │ └── helloworld.fire.meta ├── script.meta └── script │ ├── Lobby.ts │ ├── Lobby.ts.meta │ ├── Login.ts │ ├── Login.ts.meta │ ├── MessageDialog.ts │ ├── MessageDialog.ts.meta │ ├── NetConfig.ts │ ├── NetConfig.ts.meta │ ├── NetControl.ts │ ├── NetControl.ts.meta │ ├── NetMessageCtrl.ts │ ├── NetMessageCtrl.ts.meta │ ├── PersistRootHelp.ts │ ├── PersistRootHelp.ts.meta │ ├── Register.ts │ ├── Register.ts.meta │ ├── Utils.ts │ ├── Utils.ts.meta │ ├── libs.meta │ ├── libs │ ├── onfire.meta │ └── onfire │ │ ├── onfire.js │ │ └── onfire.js.meta │ ├── protocol.meta │ └── protocol │ ├── protocol.d.ts │ ├── protocol.d.ts.meta │ ├── protocol.js │ └── protocol.js.meta ├── creator.d.ts ├── global.d.ts ├── jsconfig.json ├── package-lock.json ├── project.json ├── settings ├── builder.json ├── builder.panel.json └── project.json ├── template-banner.png ├── template.json └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | #///////////////////////////////////////////////////////////////////////////// 2 | # Fireball Projects 3 | #///////////////////////////////////////////////////////////////////////////// 4 | 5 | library/ 6 | temp/ 7 | local/ 8 | build/ 9 | 10 | #///////////////////////////////////////////////////////////////////////////// 11 | # Logs and databases 12 | #///////////////////////////////////////////////////////////////////////////// 13 | 14 | *.log 15 | *.sql 16 | *.sqlite 17 | 18 | #///////////////////////////////////////////////////////////////////////////// 19 | # files for debugger 20 | #///////////////////////////////////////////////////////////////////////////// 21 | 22 | *.sln 23 | *.csproj 24 | *.pidb 25 | *.unityproj 26 | *.suo 27 | 28 | #///////////////////////////////////////////////////////////////////////////// 29 | # OS generated files 30 | #///////////////////////////////////////////////////////////////////////////// 31 | 32 | .DS_Store 33 | ehthumbs.db 34 | Thumbs.db 35 | 36 | #///////////////////////////////////////////////////////////////////////////// 37 | # exvim files 38 | #///////////////////////////////////////////////////////////////////////////// 39 | 40 | *UnityVS.meta 41 | *.err 42 | *.err.meta 43 | *.exvim 44 | *.exvim.meta 45 | *.vimentry 46 | *.vimentry.meta 47 | *.vimproject 48 | *.vimproject.meta 49 | .vimfiles.*/ 50 | .exvim.*/ 51 | quick_gen_project_*_autogen.bat 52 | quick_gen_project_*_autogen.bat.meta 53 | quick_gen_project_*_autogen.sh 54 | quick_gen_project_*_autogen.sh.meta 55 | .exvim.app 56 | 57 | #///////////////////////////////////////////////////////////////////////////// 58 | # webstorm files 59 | #///////////////////////////////////////////////////////////////////////////// 60 | 61 | .idea/ 62 | 63 | #////////////////////////// 64 | # VS Code 65 | #////////////////////////// 66 | 67 | .vscode/ 68 | /node_modules 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LeafServerCocosClient 2 | Server :LeafServer Client:CocosCreator 3 | -------------------------------------------------------------------------------- /assets/res.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "f32d10d1-604d-4da7-8654-07dfec7e055f", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/res/prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "5644ad59-1ad7-46f3-9dd4-2e88b0f06aaf", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/res/prefab/tipsNode.prefab: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.Prefab", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_rawFiles": null, 7 | "data": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Node", 13 | "_name": "tipsNode", 14 | "_objFlags": 0, 15 | "_parent": null, 16 | "_children": [ 17 | { 18 | "__id__": 2 19 | }, 20 | { 21 | "__id__": 7 22 | }, 23 | { 24 | "__id__": 11 25 | } 26 | ], 27 | "_tag": -1, 28 | "_active": true, 29 | "_components": [], 30 | "_prefab": { 31 | "__id__": 22 32 | }, 33 | "_id": "", 34 | "_opacity": 255, 35 | "_color": { 36 | "__type__": "cc.Color", 37 | "r": 255, 38 | "g": 255, 39 | "b": 255, 40 | "a": 255 41 | }, 42 | "_cascadeOpacityEnabled": true, 43 | "_anchorPoint": { 44 | "__type__": "cc.Vec2", 45 | "x": 0.5, 46 | "y": 0.5 47 | }, 48 | "_contentSize": { 49 | "__type__": "cc.Size", 50 | "width": 0, 51 | "height": 0 52 | }, 53 | "_rotationX": 0, 54 | "_rotationY": 0, 55 | "_scaleX": 1, 56 | "_scaleY": 1, 57 | "_position": { 58 | "__type__": "cc.Vec2", 59 | "x": 0, 60 | "y": 0 61 | }, 62 | "_skewX": 0, 63 | "_skewY": 0, 64 | "_localZOrder": 0, 65 | "_globalZOrder": 0, 66 | "_opacityModifyRGB": false, 67 | "groupIndex": 0 68 | }, 69 | { 70 | "__type__": "cc.Node", 71 | "_name": "New Layout", 72 | "_objFlags": 0, 73 | "_parent": { 74 | "__id__": 1 75 | }, 76 | "_children": [], 77 | "_tag": -1, 78 | "_active": true, 79 | "_components": [ 80 | { 81 | "__id__": 3 82 | }, 83 | { 84 | "__id__": 4 85 | }, 86 | { 87 | "__id__": 5 88 | } 89 | ], 90 | "_prefab": { 91 | "__id__": 21 92 | }, 93 | "_id": "", 94 | "_opacity": 200, 95 | "_color": { 96 | "__type__": "cc.Color", 97 | "r": 0, 98 | "g": 0, 99 | "b": 0, 100 | "a": 255 101 | }, 102 | "_cascadeOpacityEnabled": true, 103 | "_anchorPoint": { 104 | "__type__": "cc.Vec2", 105 | "x": 0.5, 106 | "y": 0.5 107 | }, 108 | "_contentSize": { 109 | "__type__": "cc.Size", 110 | "width": 750, 111 | "height": 1334 112 | }, 113 | "_rotationX": 0, 114 | "_rotationY": 0, 115 | "_scaleX": 1, 116 | "_scaleY": 1, 117 | "_position": { 118 | "__type__": "cc.Vec2", 119 | "x": 0, 120 | "y": 0 121 | }, 122 | "_skewX": 0, 123 | "_skewY": 0, 124 | "_localZOrder": 0, 125 | "_globalZOrder": 0, 126 | "_opacityModifyRGB": false, 127 | "groupIndex": 0 128 | }, 129 | { 130 | "__type__": "cc.Sprite", 131 | "_name": "", 132 | "_objFlags": 0, 133 | "node": { 134 | "__id__": 2 135 | }, 136 | "_enabled": true, 137 | "_spriteFrame": { 138 | "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" 139 | }, 140 | "_type": 1, 141 | "_sizeMode": 0, 142 | "_fillType": 0, 143 | "_fillCenter": { 144 | "__type__": "cc.Vec2", 145 | "x": 0, 146 | "y": 0 147 | }, 148 | "_fillStart": 0, 149 | "_fillRange": 0, 150 | "_isTrimmedMode": true, 151 | "_srcBlendFactor": 770, 152 | "_dstBlendFactor": 771, 153 | "_atlas": null 154 | }, 155 | { 156 | "__type__": "cc.Layout", 157 | "_name": "", 158 | "_objFlags": 0, 159 | "node": { 160 | "__id__": 2 161 | }, 162 | "_enabled": true, 163 | "_layoutSize": { 164 | "__type__": "cc.Size", 165 | "width": 750, 166 | "height": 1334 167 | }, 168 | "_resize": 0, 169 | "_N$layoutType": 0, 170 | "_N$padding": 0, 171 | "_N$cellSize": { 172 | "__type__": "cc.Size", 173 | "width": 40, 174 | "height": 40 175 | }, 176 | "_N$startAxis": 0, 177 | "_N$paddingLeft": 0, 178 | "_N$paddingRight": 0, 179 | "_N$paddingTop": 0, 180 | "_N$paddingBottom": 0, 181 | "_N$spacingX": 0, 182 | "_N$spacingY": 0, 183 | "_N$verticalDirection": 1, 184 | "_N$horizontalDirection": 0 185 | }, 186 | { 187 | "__type__": "cc.Button", 188 | "_name": "", 189 | "_objFlags": 0, 190 | "node": { 191 | "__id__": 2 192 | }, 193 | "_enabled": true, 194 | "transition": 0, 195 | "pressedColor": { 196 | "__type__": "cc.Color", 197 | "r": 211, 198 | "g": 211, 199 | "b": 211, 200 | "a": 255 201 | }, 202 | "hoverColor": { 203 | "__type__": "cc.Color", 204 | "r": 255, 205 | "g": 255, 206 | "b": 255, 207 | "a": 255 208 | }, 209 | "duration": 0.1, 210 | "zoomScale": 1.2, 211 | "clickEvents": [ 212 | { 213 | "__id__": 6 214 | } 215 | ], 216 | "_N$interactable": true, 217 | "_N$enableAutoGrayEffect": false, 218 | "_N$normalColor": { 219 | "__type__": "cc.Color", 220 | "r": 214, 221 | "g": 214, 222 | "b": 214, 223 | "a": 255 224 | }, 225 | "_N$disabledColor": { 226 | "__type__": "cc.Color", 227 | "r": 124, 228 | "g": 124, 229 | "b": 124, 230 | "a": 255 231 | }, 232 | "_N$normalSprite": null, 233 | "_N$pressedSprite": null, 234 | "pressedSprite": null, 235 | "_N$hoverSprite": null, 236 | "hoverSprite": null, 237 | "_N$disabledSprite": null, 238 | "_N$target": { 239 | "__id__": 2 240 | } 241 | }, 242 | { 243 | "__type__": "cc.ClickEvent", 244 | "target": { 245 | "__id__": 7 246 | }, 247 | "component": "MessageDialog", 248 | "handler": "onBtnPanel", 249 | "customEventData": "" 250 | }, 251 | { 252 | "__type__": "cc.Node", 253 | "_name": "dialogctrl", 254 | "_objFlags": 0, 255 | "_parent": { 256 | "__id__": 1 257 | }, 258 | "_children": [], 259 | "_tag": -1, 260 | "_active": true, 261 | "_components": [ 262 | { 263 | "__id__": 8 264 | } 265 | ], 266 | "_prefab": { 267 | "__id__": 20 268 | }, 269 | "_id": "", 270 | "_opacity": 255, 271 | "_color": { 272 | "__type__": "cc.Color", 273 | "r": 255, 274 | "g": 255, 275 | "b": 255, 276 | "a": 255 277 | }, 278 | "_cascadeOpacityEnabled": true, 279 | "_anchorPoint": { 280 | "__type__": "cc.Vec2", 281 | "x": 0.5, 282 | "y": 0.5 283 | }, 284 | "_contentSize": { 285 | "__type__": "cc.Size", 286 | "width": 0, 287 | "height": 0 288 | }, 289 | "_rotationX": 0, 290 | "_rotationY": 0, 291 | "_scaleX": 1, 292 | "_scaleY": 1, 293 | "_position": { 294 | "__type__": "cc.Vec2", 295 | "x": 0, 296 | "y": 0 297 | }, 298 | "_skewX": 0, 299 | "_skewY": 0, 300 | "_localZOrder": 0, 301 | "_globalZOrder": 0, 302 | "_opacityModifyRGB": false, 303 | "groupIndex": 0 304 | }, 305 | { 306 | "__type__": "48ba18w3bZCgLi9LNJyaf3d", 307 | "_name": "", 308 | "_objFlags": 0, 309 | "node": { 310 | "__id__": 7 311 | }, 312 | "_enabled": true, 313 | "title": { 314 | "__id__": 9 315 | }, 316 | "text": { 317 | "__id__": 13 318 | } 319 | }, 320 | { 321 | "__type__": "cc.Label", 322 | "_name": "", 323 | "_objFlags": 0, 324 | "node": { 325 | "__id__": 10 326 | }, 327 | "_enabled": true, 328 | "_useOriginalSize": false, 329 | "_actualFontSize": 40, 330 | "_fontSize": 40, 331 | "_lineHeight": 40, 332 | "_enableWrapText": true, 333 | "_N$file": null, 334 | "_isSystemFontUsed": true, 335 | "_spacingX": 0, 336 | "_N$string": "提示", 337 | "_N$horizontalAlign": 1, 338 | "_N$verticalAlign": 1, 339 | "_N$fontFamily": "Arial", 340 | "_N$overflow": 0 341 | }, 342 | { 343 | "__type__": "cc.Node", 344 | "_name": "title", 345 | "_objFlags": 0, 346 | "_parent": { 347 | "__id__": 11 348 | }, 349 | "_children": [], 350 | "_tag": -1, 351 | "_active": true, 352 | "_components": [ 353 | { 354 | "__id__": 9 355 | } 356 | ], 357 | "_prefab": { 358 | "__id__": 19 359 | }, 360 | "_id": "", 361 | "_opacity": 255, 362 | "_color": { 363 | "__type__": "cc.Color", 364 | "r": 0, 365 | "g": 0, 366 | "b": 0, 367 | "a": 255 368 | }, 369 | "_cascadeOpacityEnabled": true, 370 | "_anchorPoint": { 371 | "__type__": "cc.Vec2", 372 | "x": 0.5, 373 | "y": 0.5 374 | }, 375 | "_contentSize": { 376 | "__type__": "cc.Size", 377 | "width": 80, 378 | "height": 40 379 | }, 380 | "_rotationX": 0, 381 | "_rotationY": 0, 382 | "_scaleX": 1, 383 | "_scaleY": 1, 384 | "_position": { 385 | "__type__": "cc.Vec2", 386 | "x": 0, 387 | "y": 135 388 | }, 389 | "_skewX": 0, 390 | "_skewY": 0, 391 | "_localZOrder": 0, 392 | "_globalZOrder": 0, 393 | "_opacityModifyRGB": false, 394 | "groupIndex": 0 395 | }, 396 | { 397 | "__type__": "cc.Node", 398 | "_name": "dialog", 399 | "_objFlags": 0, 400 | "_parent": { 401 | "__id__": 1 402 | }, 403 | "_children": [ 404 | { 405 | "__id__": 10 406 | }, 407 | { 408 | "__id__": 12 409 | } 410 | ], 411 | "_tag": -1, 412 | "_active": true, 413 | "_components": [ 414 | { 415 | "__id__": 15 416 | }, 417 | { 418 | "__id__": 16 419 | }, 420 | { 421 | "__id__": 17 422 | } 423 | ], 424 | "_prefab": { 425 | "__id__": 18 426 | }, 427 | "_id": "", 428 | "_opacity": 255, 429 | "_color": { 430 | "__type__": "cc.Color", 431 | "r": 255, 432 | "g": 255, 433 | "b": 255, 434 | "a": 255 435 | }, 436 | "_cascadeOpacityEnabled": true, 437 | "_anchorPoint": { 438 | "__type__": "cc.Vec2", 439 | "x": 0.5, 440 | "y": 0.5 441 | }, 442 | "_contentSize": { 443 | "__type__": "cc.Size", 444 | "width": 500, 445 | "height": 400 446 | }, 447 | "_rotationX": 0, 448 | "_rotationY": 0, 449 | "_scaleX": 1, 450 | "_scaleY": 1, 451 | "_position": { 452 | "__type__": "cc.Vec2", 453 | "x": 0, 454 | "y": 0 455 | }, 456 | "_skewX": 0, 457 | "_skewY": 0, 458 | "_localZOrder": 0, 459 | "_globalZOrder": 0, 460 | "_opacityModifyRGB": false, 461 | "groupIndex": 0 462 | }, 463 | { 464 | "__type__": "cc.Node", 465 | "_name": "text", 466 | "_objFlags": 0, 467 | "_parent": { 468 | "__id__": 11 469 | }, 470 | "_children": [], 471 | "_tag": -1, 472 | "_active": true, 473 | "_components": [ 474 | { 475 | "__id__": 13 476 | } 477 | ], 478 | "_prefab": { 479 | "__id__": 14 480 | }, 481 | "_id": "", 482 | "_opacity": 255, 483 | "_color": { 484 | "__type__": "cc.Color", 485 | "r": 0, 486 | "g": 0, 487 | "b": 0, 488 | "a": 255 489 | }, 490 | "_cascadeOpacityEnabled": true, 491 | "_anchorPoint": { 492 | "__type__": "cc.Vec2", 493 | "x": 0.5, 494 | "y": 1 495 | }, 496 | "_contentSize": { 497 | "__type__": "cc.Size", 498 | "width": 400, 499 | "height": 40 500 | }, 501 | "_rotationX": 0, 502 | "_rotationY": 0, 503 | "_scaleX": 1, 504 | "_scaleY": 1, 505 | "_position": { 506 | "__type__": "cc.Vec2", 507 | "x": 2, 508 | "y": 70 509 | }, 510 | "_skewX": 0, 511 | "_skewY": 0, 512 | "_localZOrder": 0, 513 | "_globalZOrder": 0, 514 | "_opacityModifyRGB": false, 515 | "groupIndex": 0 516 | }, 517 | { 518 | "__type__": "cc.Label", 519 | "_name": "", 520 | "_objFlags": 0, 521 | "node": { 522 | "__id__": 12 523 | }, 524 | "_enabled": true, 525 | "_useOriginalSize": false, 526 | "_actualFontSize": 40, 527 | "_fontSize": 40, 528 | "_lineHeight": 40, 529 | "_enableWrapText": true, 530 | "_N$file": null, 531 | "_isSystemFontUsed": true, 532 | "_spacingX": 0, 533 | "_N$string": "text", 534 | "_N$horizontalAlign": 0, 535 | "_N$verticalAlign": 0, 536 | "_N$fontFamily": "Arial", 537 | "_N$overflow": 3 538 | }, 539 | { 540 | "__type__": "cc.PrefabInfo", 541 | "root": { 542 | "__id__": 1 543 | }, 544 | "asset": { 545 | "__uuid__": "f50eda98-db22-4494-92f2-5261505abfaa" 546 | }, 547 | "fileId": "f9+Z6j2BNH/4ZnGduGpBTh", 548 | "sync": false 549 | }, 550 | { 551 | "__type__": "cc.Sprite", 552 | "_name": "", 553 | "_objFlags": 0, 554 | "node": { 555 | "__id__": 11 556 | }, 557 | "_enabled": true, 558 | "_spriteFrame": { 559 | "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" 560 | }, 561 | "_type": 1, 562 | "_sizeMode": 0, 563 | "_fillType": 0, 564 | "_fillCenter": { 565 | "__type__": "cc.Vec2", 566 | "x": 0, 567 | "y": 0 568 | }, 569 | "_fillStart": 0, 570 | "_fillRange": 0, 571 | "_isTrimmedMode": true, 572 | "_srcBlendFactor": 770, 573 | "_dstBlendFactor": 771, 574 | "_atlas": null 575 | }, 576 | { 577 | "__type__": "cc.Layout", 578 | "_name": "", 579 | "_objFlags": 0, 580 | "node": { 581 | "__id__": 11 582 | }, 583 | "_enabled": true, 584 | "_layoutSize": { 585 | "__type__": "cc.Size", 586 | "width": 500, 587 | "height": 400 588 | }, 589 | "_resize": 0, 590 | "_N$layoutType": 0, 591 | "_N$padding": 0, 592 | "_N$cellSize": { 593 | "__type__": "cc.Size", 594 | "width": 40, 595 | "height": 40 596 | }, 597 | "_N$startAxis": 0, 598 | "_N$paddingLeft": 0, 599 | "_N$paddingRight": 0, 600 | "_N$paddingTop": 0, 601 | "_N$paddingBottom": 0, 602 | "_N$spacingX": 0, 603 | "_N$spacingY": 0, 604 | "_N$verticalDirection": 1, 605 | "_N$horizontalDirection": 0 606 | }, 607 | { 608 | "__type__": "cc.Button", 609 | "_name": "", 610 | "_objFlags": 0, 611 | "node": { 612 | "__id__": 11 613 | }, 614 | "_enabled": true, 615 | "transition": 0, 616 | "pressedColor": { 617 | "__type__": "cc.Color", 618 | "r": 211, 619 | "g": 211, 620 | "b": 211, 621 | "a": 255 622 | }, 623 | "hoverColor": { 624 | "__type__": "cc.Color", 625 | "r": 255, 626 | "g": 255, 627 | "b": 255, 628 | "a": 255 629 | }, 630 | "duration": 0.1, 631 | "zoomScale": 1.2, 632 | "clickEvents": [], 633 | "_N$interactable": true, 634 | "_N$enableAutoGrayEffect": false, 635 | "_N$normalColor": { 636 | "__type__": "cc.Color", 637 | "r": 214, 638 | "g": 214, 639 | "b": 214, 640 | "a": 255 641 | }, 642 | "_N$disabledColor": { 643 | "__type__": "cc.Color", 644 | "r": 124, 645 | "g": 124, 646 | "b": 124, 647 | "a": 255 648 | }, 649 | "_N$normalSprite": null, 650 | "_N$pressedSprite": null, 651 | "pressedSprite": null, 652 | "_N$hoverSprite": null, 653 | "hoverSprite": null, 654 | "_N$disabledSprite": null, 655 | "_N$target": { 656 | "__id__": 11 657 | } 658 | }, 659 | { 660 | "__type__": "cc.PrefabInfo", 661 | "root": { 662 | "__id__": 1 663 | }, 664 | "asset": { 665 | "__uuid__": "f50eda98-db22-4494-92f2-5261505abfaa" 666 | }, 667 | "fileId": "dcvs9elFdDI5RSyRKd2h3G", 668 | "sync": false 669 | }, 670 | { 671 | "__type__": "cc.PrefabInfo", 672 | "root": { 673 | "__id__": 1 674 | }, 675 | "asset": { 676 | "__uuid__": "f50eda98-db22-4494-92f2-5261505abfaa" 677 | }, 678 | "fileId": "4aFaraE9dJ+rgrkv/AuHEQ", 679 | "sync": false 680 | }, 681 | { 682 | "__type__": "cc.PrefabInfo", 683 | "root": { 684 | "__id__": 1 685 | }, 686 | "asset": { 687 | "__uuid__": "f50eda98-db22-4494-92f2-5261505abfaa" 688 | }, 689 | "fileId": "38ZsRuvDtMh6Pmn3JM6qFI", 690 | "sync": false 691 | }, 692 | { 693 | "__type__": "cc.PrefabInfo", 694 | "root": { 695 | "__id__": 1 696 | }, 697 | "asset": { 698 | "__uuid__": "f50eda98-db22-4494-92f2-5261505abfaa" 699 | }, 700 | "fileId": "cc5roz3udCC78Rw4yFDs0D", 701 | "sync": false 702 | }, 703 | { 704 | "__type__": "cc.PrefabInfo", 705 | "root": { 706 | "__id__": 1 707 | }, 708 | "asset": { 709 | "__uuid__": "f50eda98-db22-4494-92f2-5261505abfaa" 710 | }, 711 | "fileId": "97wrYcdm9Pc4J43Cc4XFaU", 712 | "sync": false 713 | } 714 | ] -------------------------------------------------------------------------------- /assets/res/prefab/tipsNode.prefab.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.0", 3 | "uuid": "f50eda98-db22-4494-92f2-5261505abfaa", 4 | "asyncLoadAssets": false, 5 | "subMetas": {} 6 | } -------------------------------------------------------------------------------- /assets/res/texture.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "1477d85b-73dd-498c-bb76-1e8b4b174129", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/res/texture/HelloWorld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ddkgo/LeafServerCocosClient/5459cf03a47148473d7abade841a53d6dd983410/assets/res/texture/HelloWorld.png -------------------------------------------------------------------------------- /assets/res/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 | } -------------------------------------------------------------------------------- /assets/res/texture/singleColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ddkgo/LeafServerCocosClient/5459cf03a47148473d7abade841a53d6dd983410/assets/res/texture/singleColor.png -------------------------------------------------------------------------------- /assets/res/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 | } -------------------------------------------------------------------------------- /assets/resources.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "8dd2cc9b-6247-4eed-b509-a53eb14be246", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/scene.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "e4b8177e-33f1-4254-ab16-c461ed9c8b34", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/scene/helloworld.fire: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "__type__": "cc.SceneAsset", 4 | "_name": "", 5 | "_objFlags": 0, 6 | "_rawFiles": null, 7 | "scene": { 8 | "__id__": 1 9 | } 10 | }, 11 | { 12 | "__type__": "cc.Scene", 13 | "_objFlags": 0, 14 | "_parent": null, 15 | "_children": [ 16 | { 17 | "__id__": 2 18 | }, 19 | { 20 | "__id__": 74 21 | } 22 | ], 23 | "_tag": -1, 24 | "_active": true, 25 | "_components": [], 26 | "_prefab": null, 27 | "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49", 28 | "_opacity": 255, 29 | "_color": { 30 | "__type__": "cc.Color", 31 | "r": 255, 32 | "g": 255, 33 | "b": 255, 34 | "a": 255 35 | }, 36 | "_cascadeOpacityEnabled": true, 37 | "_anchorPoint": { 38 | "__type__": "cc.Vec2", 39 | "x": 0, 40 | "y": 0 41 | }, 42 | "_contentSize": { 43 | "__type__": "cc.Size", 44 | "width": 0, 45 | "height": 0 46 | }, 47 | "_localZOrder": 0, 48 | "_globalZOrder": 0, 49 | "_opacityModifyRGB": false, 50 | "groupIndex": 0, 51 | "autoReleaseAssets": false 52 | }, 53 | { 54 | "__type__": "cc.Node", 55 | "_name": "Canvas", 56 | "_objFlags": 0, 57 | "_parent": { 58 | "__id__": 1 59 | }, 60 | "_children": [ 61 | { 62 | "__id__": 3 63 | }, 64 | { 65 | "__id__": 6 66 | }, 67 | { 68 | "__id__": 8 69 | }, 70 | { 71 | "__id__": 10 72 | }, 73 | { 74 | "__id__": 16 75 | }, 76 | { 77 | "__id__": 22 78 | }, 79 | { 80 | "__id__": 28 81 | }, 82 | { 83 | "__id__": 50 84 | } 85 | ], 86 | "_tag": -1, 87 | "_active": true, 88 | "_components": [ 89 | { 90 | "__id__": 72 91 | }, 92 | { 93 | "__id__": 73 94 | } 95 | ], 96 | "_prefab": null, 97 | "_id": "a286bbGknJLZpRpxROV6M94", 98 | "_opacity": 255, 99 | "_color": { 100 | "__type__": "cc.Color", 101 | "r": 252, 102 | "g": 252, 103 | "b": 252, 104 | "a": 255 105 | }, 106 | "_cascadeOpacityEnabled": true, 107 | "_anchorPoint": { 108 | "__type__": "cc.Vec2", 109 | "x": 0.5, 110 | "y": 0.5 111 | }, 112 | "_contentSize": { 113 | "__type__": "cc.Size", 114 | "width": 750, 115 | "height": 1334 116 | }, 117 | "_rotationX": 0, 118 | "_rotationY": 0, 119 | "_scaleX": 1, 120 | "_scaleY": 1, 121 | "_position": { 122 | "__type__": "cc.Vec2", 123 | "x": 375, 124 | "y": 667 125 | }, 126 | "_skewX": 0, 127 | "_skewY": 0, 128 | "_localZOrder": 0, 129 | "_globalZOrder": 0, 130 | "_opacityModifyRGB": false, 131 | "groupIndex": 0 132 | }, 133 | { 134 | "__type__": "cc.Node", 135 | "_name": "background", 136 | "_objFlags": 0, 137 | "_parent": { 138 | "__id__": 2 139 | }, 140 | "_children": [], 141 | "_tag": -1, 142 | "_active": true, 143 | "_components": [ 144 | { 145 | "__id__": 4 146 | }, 147 | { 148 | "__id__": 5 149 | } 150 | ], 151 | "_prefab": null, 152 | "_id": "e2e0crkOLxGrpMxpbC4iQg1", 153 | "_opacity": 255, 154 | "_color": { 155 | "__type__": "cc.Color", 156 | "r": 27, 157 | "g": 38, 158 | "b": 46, 159 | "a": 255 160 | }, 161 | "_cascadeOpacityEnabled": true, 162 | "_anchorPoint": { 163 | "__type__": "cc.Vec2", 164 | "x": 0.5, 165 | "y": 0.5 166 | }, 167 | "_contentSize": { 168 | "__type__": "cc.Size", 169 | "width": 750, 170 | "height": 1334 171 | }, 172 | "_rotationX": 0, 173 | "_rotationY": 0, 174 | "_scaleX": 1, 175 | "_scaleY": 1, 176 | "_position": { 177 | "__type__": "cc.Vec2", 178 | "x": 0, 179 | "y": 0 180 | }, 181 | "_skewX": 0, 182 | "_skewY": 0, 183 | "_localZOrder": 0, 184 | "_globalZOrder": 0, 185 | "_opacityModifyRGB": false, 186 | "groupIndex": 0 187 | }, 188 | { 189 | "__type__": "cc.Widget", 190 | "_name": "", 191 | "_objFlags": 0, 192 | "node": { 193 | "__id__": 3 194 | }, 195 | "_enabled": true, 196 | "isAlignOnce": true, 197 | "_target": null, 198 | "_alignFlags": 45, 199 | "_left": 0, 200 | "_right": 0, 201 | "_top": 0, 202 | "_bottom": 0, 203 | "_verticalCenter": 0, 204 | "_horizontalCenter": 0, 205 | "_isAbsLeft": true, 206 | "_isAbsRight": true, 207 | "_isAbsTop": true, 208 | "_isAbsBottom": true, 209 | "_isAbsHorizontalCenter": true, 210 | "_isAbsVerticalCenter": true, 211 | "_originalWidth": 200, 212 | "_originalHeight": 150 213 | }, 214 | { 215 | "__type__": "cc.Sprite", 216 | "_name": "", 217 | "_objFlags": 0, 218 | "node": { 219 | "__id__": 3 220 | }, 221 | "_enabled": true, 222 | "_spriteFrame": { 223 | "__uuid__": "410fb916-8721-4663-bab8-34397391ace7" 224 | }, 225 | "_type": 1, 226 | "_sizeMode": 0, 227 | "_fillType": 0, 228 | "_fillCenter": { 229 | "__type__": "cc.Vec2", 230 | "x": 0, 231 | "y": 0 232 | }, 233 | "_fillStart": 0, 234 | "_fillRange": 0, 235 | "_isTrimmedMode": true, 236 | "_srcBlendFactor": 770, 237 | "_dstBlendFactor": 771, 238 | "_atlas": null 239 | }, 240 | { 241 | "__type__": "cc.Node", 242 | "_name": "cocos", 243 | "_objFlags": 0, 244 | "_parent": { 245 | "__id__": 2 246 | }, 247 | "_children": [], 248 | "_tag": -1, 249 | "_active": true, 250 | "_components": [ 251 | { 252 | "__id__": 7 253 | } 254 | ], 255 | "_prefab": null, 256 | "_id": "c4f30YOS65G64U2TwufdJ+2", 257 | "_opacity": 255, 258 | "_color": { 259 | "__type__": "cc.Color", 260 | "r": 255, 261 | "g": 255, 262 | "b": 255, 263 | "a": 255 264 | }, 265 | "_cascadeOpacityEnabled": true, 266 | "_anchorPoint": { 267 | "__type__": "cc.Vec2", 268 | "x": 0.5, 269 | "y": 0.5 270 | }, 271 | "_contentSize": { 272 | "__type__": "cc.Size", 273 | "width": 195, 274 | "height": 270 275 | }, 276 | "_rotationX": 0, 277 | "_rotationY": 0, 278 | "_scaleX": 1, 279 | "_scaleY": 1, 280 | "_position": { 281 | "__type__": "cc.Vec2", 282 | "x": 0, 283 | "y": 350 284 | }, 285 | "_skewX": 0, 286 | "_skewY": 0, 287 | "_localZOrder": 0, 288 | "_globalZOrder": 0, 289 | "_opacityModifyRGB": false, 290 | "groupIndex": 0 291 | }, 292 | { 293 | "__type__": "cc.Sprite", 294 | "_name": "", 295 | "_objFlags": 0, 296 | "node": { 297 | "__id__": 6 298 | }, 299 | "_enabled": true, 300 | "_spriteFrame": { 301 | "__uuid__": "31bc895a-c003-4566-a9f3-2e54ae1c17dc" 302 | }, 303 | "_type": 0, 304 | "_sizeMode": 1, 305 | "_fillType": 0, 306 | "_fillCenter": { 307 | "__type__": "cc.Vec2", 308 | "x": 0, 309 | "y": 0 310 | }, 311 | "_fillStart": 0, 312 | "_fillRange": 0, 313 | "_isTrimmedMode": true, 314 | "_srcBlendFactor": 770, 315 | "_dstBlendFactor": 771, 316 | "_atlas": null 317 | }, 318 | { 319 | "__type__": "cc.Node", 320 | "_name": "label", 321 | "_objFlags": 0, 322 | "_parent": { 323 | "__id__": 2 324 | }, 325 | "_children": [], 326 | "_tag": -1, 327 | "_active": true, 328 | "_components": [ 329 | { 330 | "__id__": 9 331 | } 332 | ], 333 | "_prefab": null, 334 | "_id": "31f1bH7V69Ajr1iXhluMpTB", 335 | "_opacity": 255, 336 | "_color": { 337 | "__type__": "cc.Color", 338 | "r": 255, 339 | "g": 255, 340 | "b": 255, 341 | "a": 255 342 | }, 343 | "_cascadeOpacityEnabled": true, 344 | "_anchorPoint": { 345 | "__type__": "cc.Vec2", 346 | "x": 0.5, 347 | "y": 0.5 348 | }, 349 | "_contentSize": { 350 | "__type__": "cc.Size", 351 | "width": 342, 352 | "height": 60 353 | }, 354 | "_rotationX": 0, 355 | "_rotationY": 0, 356 | "_scaleX": 1, 357 | "_scaleY": 1, 358 | "_position": { 359 | "__type__": "cc.Vec2", 360 | "x": 0, 361 | "y": 100 362 | }, 363 | "_skewX": 0, 364 | "_skewY": 0, 365 | "_localZOrder": 0, 366 | "_globalZOrder": 0, 367 | "_opacityModifyRGB": false, 368 | "groupIndex": 0 369 | }, 370 | { 371 | "__type__": "cc.Label", 372 | "_name": "", 373 | "_objFlags": 0, 374 | "node": { 375 | "__id__": 8 376 | }, 377 | "_enabled": true, 378 | "_useOriginalSize": false, 379 | "_actualFontSize": 60, 380 | "_fontSize": 60, 381 | "_lineHeight": 60, 382 | "_enableWrapText": true, 383 | "_N$file": null, 384 | "_isSystemFontUsed": true, 385 | "_spacingX": 0, 386 | "_N$string": "Hello, World!", 387 | "_N$horizontalAlign": 1, 388 | "_N$verticalAlign": 1, 389 | "_N$fontFamily": "Arial", 390 | "_N$overflow": 0 391 | }, 392 | { 393 | "__type__": "cc.Node", 394 | "_name": "sendHello", 395 | "_objFlags": 0, 396 | "_parent": { 397 | "__id__": 2 398 | }, 399 | "_children": [ 400 | { 401 | "__id__": 11 402 | } 403 | ], 404 | "_tag": -1, 405 | "_active": true, 406 | "_components": [ 407 | { 408 | "__id__": 13 409 | }, 410 | { 411 | "__id__": 14 412 | } 413 | ], 414 | "_prefab": null, 415 | "_id": "e4UoyqK8BIO7pu1YU3y1QJ", 416 | "_opacity": 255, 417 | "_color": { 418 | "__type__": "cc.Color", 419 | "r": 255, 420 | "g": 255, 421 | "b": 255, 422 | "a": 255 423 | }, 424 | "_cascadeOpacityEnabled": true, 425 | "_anchorPoint": { 426 | "__type__": "cc.Vec2", 427 | "x": 0.5, 428 | "y": 0.5 429 | }, 430 | "_contentSize": { 431 | "__type__": "cc.Size", 432 | "width": 100, 433 | "height": 40 434 | }, 435 | "_rotationX": 0, 436 | "_rotationY": 0, 437 | "_scaleX": 1, 438 | "_scaleY": 1, 439 | "_position": { 440 | "__type__": "cc.Vec2", 441 | "x": 0, 442 | "y": -172 443 | }, 444 | "_skewX": 0, 445 | "_skewY": 0, 446 | "_localZOrder": 0, 447 | "_globalZOrder": 0, 448 | "_opacityModifyRGB": false, 449 | "groupIndex": 0 450 | }, 451 | { 452 | "__type__": "cc.Node", 453 | "_name": "Label", 454 | "_objFlags": 0, 455 | "_parent": { 456 | "__id__": 10 457 | }, 458 | "_children": [], 459 | "_tag": -1, 460 | "_active": true, 461 | "_components": [ 462 | { 463 | "__id__": 12 464 | } 465 | ], 466 | "_prefab": null, 467 | "_id": "d3xlQ6KzdDmpFXGeptfAGh", 468 | "_opacity": 255, 469 | "_color": { 470 | "__type__": "cc.Color", 471 | "r": 0, 472 | "g": 0, 473 | "b": 0, 474 | "a": 255 475 | }, 476 | "_cascadeOpacityEnabled": true, 477 | "_anchorPoint": { 478 | "__type__": "cc.Vec2", 479 | "x": 0.5, 480 | "y": 0.5 481 | }, 482 | "_contentSize": { 483 | "__type__": "cc.Size", 484 | "width": 100, 485 | "height": 40 486 | }, 487 | "_rotationX": 0, 488 | "_rotationY": 0, 489 | "_scaleX": 1, 490 | "_scaleY": 1, 491 | "_position": { 492 | "__type__": "cc.Vec2", 493 | "x": 0, 494 | "y": 0 495 | }, 496 | "_skewX": 0, 497 | "_skewY": 0, 498 | "_localZOrder": 0, 499 | "_globalZOrder": 0, 500 | "_opacityModifyRGB": false, 501 | "groupIndex": 0 502 | }, 503 | { 504 | "__type__": "cc.Label", 505 | "_name": "", 506 | "_objFlags": 0, 507 | "node": { 508 | "__id__": 11 509 | }, 510 | "_enabled": true, 511 | "_useOriginalSize": false, 512 | "_actualFontSize": 20, 513 | "_fontSize": 20, 514 | "_lineHeight": 40, 515 | "_enableWrapText": false, 516 | "_N$file": null, 517 | "_isSystemFontUsed": true, 518 | "_spacingX": 0, 519 | "_N$string": "send Hello", 520 | "_N$horizontalAlign": 1, 521 | "_N$verticalAlign": 1, 522 | "_N$fontFamily": "Arial", 523 | "_N$overflow": 1 524 | }, 525 | { 526 | "__type__": "cc.Sprite", 527 | "_name": "", 528 | "_objFlags": 0, 529 | "node": { 530 | "__id__": 10 531 | }, 532 | "_enabled": true, 533 | "_spriteFrame": { 534 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 535 | }, 536 | "_type": 1, 537 | "_sizeMode": 0, 538 | "_fillType": 0, 539 | "_fillCenter": { 540 | "__type__": "cc.Vec2", 541 | "x": 0, 542 | "y": 0 543 | }, 544 | "_fillStart": 0, 545 | "_fillRange": 0, 546 | "_isTrimmedMode": true, 547 | "_srcBlendFactor": 770, 548 | "_dstBlendFactor": 771, 549 | "_atlas": null 550 | }, 551 | { 552 | "__type__": "cc.Button", 553 | "_name": "", 554 | "_objFlags": 0, 555 | "node": { 556 | "__id__": 10 557 | }, 558 | "_enabled": true, 559 | "transition": 2, 560 | "pressedColor": { 561 | "__type__": "cc.Color", 562 | "r": 255, 563 | "g": 255, 564 | "b": 255, 565 | "a": 255 566 | }, 567 | "hoverColor": { 568 | "__type__": "cc.Color", 569 | "r": 255, 570 | "g": 255, 571 | "b": 255, 572 | "a": 255 573 | }, 574 | "duration": 0.1, 575 | "zoomScale": 1.2, 576 | "clickEvents": [ 577 | { 578 | "__id__": 15 579 | } 580 | ], 581 | "_N$interactable": true, 582 | "_N$enableAutoGrayEffect": false, 583 | "_N$normalColor": { 584 | "__type__": "cc.Color", 585 | "r": 255, 586 | "g": 255, 587 | "b": 255, 588 | "a": 255 589 | }, 590 | "_N$disabledColor": { 591 | "__type__": "cc.Color", 592 | "r": 255, 593 | "g": 255, 594 | "b": 255, 595 | "a": 255 596 | }, 597 | "_N$normalSprite": { 598 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 599 | }, 600 | "_N$pressedSprite": { 601 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 602 | }, 603 | "pressedSprite": { 604 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 605 | }, 606 | "_N$hoverSprite": { 607 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 608 | }, 609 | "hoverSprite": { 610 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 611 | }, 612 | "_N$disabledSprite": { 613 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 614 | }, 615 | "_N$target": { 616 | "__id__": 10 617 | } 618 | }, 619 | { 620 | "__type__": "cc.ClickEvent", 621 | "target": { 622 | "__id__": 2 623 | }, 624 | "component": "Lobby", 625 | "handler": "onBtnSendHello", 626 | "customEventData": "" 627 | }, 628 | { 629 | "__type__": "cc.Node", 630 | "_name": "register", 631 | "_objFlags": 0, 632 | "_parent": { 633 | "__id__": 2 634 | }, 635 | "_children": [ 636 | { 637 | "__id__": 17 638 | } 639 | ], 640 | "_tag": -1, 641 | "_active": true, 642 | "_components": [ 643 | { 644 | "__id__": 19 645 | }, 646 | { 647 | "__id__": 20 648 | } 649 | ], 650 | "_prefab": null, 651 | "_id": "5fd3CReyhMQaEix7B1pg5q", 652 | "_opacity": 255, 653 | "_color": { 654 | "__type__": "cc.Color", 655 | "r": 255, 656 | "g": 255, 657 | "b": 255, 658 | "a": 255 659 | }, 660 | "_cascadeOpacityEnabled": true, 661 | "_anchorPoint": { 662 | "__type__": "cc.Vec2", 663 | "x": 0.5, 664 | "y": 0.5 665 | }, 666 | "_contentSize": { 667 | "__type__": "cc.Size", 668 | "width": 100, 669 | "height": 40 670 | }, 671 | "_rotationX": 0, 672 | "_rotationY": 0, 673 | "_scaleX": 1, 674 | "_scaleY": 1, 675 | "_position": { 676 | "__type__": "cc.Vec2", 677 | "x": 0, 678 | "y": -236 679 | }, 680 | "_skewX": 0, 681 | "_skewY": 0, 682 | "_localZOrder": 0, 683 | "_globalZOrder": 0, 684 | "_opacityModifyRGB": false, 685 | "groupIndex": 0 686 | }, 687 | { 688 | "__type__": "cc.Node", 689 | "_name": "Label", 690 | "_objFlags": 0, 691 | "_parent": { 692 | "__id__": 16 693 | }, 694 | "_children": [], 695 | "_tag": -1, 696 | "_active": true, 697 | "_components": [ 698 | { 699 | "__id__": 18 700 | } 701 | ], 702 | "_prefab": null, 703 | "_id": "0fRd2fhRZM3ZYKPHFt6wNi", 704 | "_opacity": 255, 705 | "_color": { 706 | "__type__": "cc.Color", 707 | "r": 0, 708 | "g": 0, 709 | "b": 0, 710 | "a": 255 711 | }, 712 | "_cascadeOpacityEnabled": true, 713 | "_anchorPoint": { 714 | "__type__": "cc.Vec2", 715 | "x": 0.5, 716 | "y": 0.5 717 | }, 718 | "_contentSize": { 719 | "__type__": "cc.Size", 720 | "width": 100, 721 | "height": 40 722 | }, 723 | "_rotationX": 0, 724 | "_rotationY": 0, 725 | "_scaleX": 1, 726 | "_scaleY": 1, 727 | "_position": { 728 | "__type__": "cc.Vec2", 729 | "x": 0, 730 | "y": 0 731 | }, 732 | "_skewX": 0, 733 | "_skewY": 0, 734 | "_localZOrder": 0, 735 | "_globalZOrder": 0, 736 | "_opacityModifyRGB": false, 737 | "groupIndex": 0 738 | }, 739 | { 740 | "__type__": "cc.Label", 741 | "_name": "", 742 | "_objFlags": 0, 743 | "node": { 744 | "__id__": 17 745 | }, 746 | "_enabled": true, 747 | "_useOriginalSize": false, 748 | "_actualFontSize": 20, 749 | "_fontSize": 20, 750 | "_lineHeight": 40, 751 | "_enableWrapText": false, 752 | "_N$file": null, 753 | "_isSystemFontUsed": true, 754 | "_spacingX": 0, 755 | "_N$string": "注册", 756 | "_N$horizontalAlign": 1, 757 | "_N$verticalAlign": 1, 758 | "_N$fontFamily": "Arial", 759 | "_N$overflow": 1 760 | }, 761 | { 762 | "__type__": "cc.Sprite", 763 | "_name": "", 764 | "_objFlags": 0, 765 | "node": { 766 | "__id__": 16 767 | }, 768 | "_enabled": true, 769 | "_spriteFrame": { 770 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 771 | }, 772 | "_type": 1, 773 | "_sizeMode": 0, 774 | "_fillType": 0, 775 | "_fillCenter": { 776 | "__type__": "cc.Vec2", 777 | "x": 0, 778 | "y": 0 779 | }, 780 | "_fillStart": 0, 781 | "_fillRange": 0, 782 | "_isTrimmedMode": true, 783 | "_srcBlendFactor": 770, 784 | "_dstBlendFactor": 771, 785 | "_atlas": null 786 | }, 787 | { 788 | "__type__": "cc.Button", 789 | "_name": "", 790 | "_objFlags": 0, 791 | "node": { 792 | "__id__": 16 793 | }, 794 | "_enabled": true, 795 | "transition": 2, 796 | "pressedColor": { 797 | "__type__": "cc.Color", 798 | "r": 255, 799 | "g": 255, 800 | "b": 255, 801 | "a": 255 802 | }, 803 | "hoverColor": { 804 | "__type__": "cc.Color", 805 | "r": 255, 806 | "g": 255, 807 | "b": 255, 808 | "a": 255 809 | }, 810 | "duration": 0.1, 811 | "zoomScale": 1.2, 812 | "clickEvents": [ 813 | { 814 | "__id__": 21 815 | } 816 | ], 817 | "_N$interactable": true, 818 | "_N$enableAutoGrayEffect": false, 819 | "_N$normalColor": { 820 | "__type__": "cc.Color", 821 | "r": 255, 822 | "g": 255, 823 | "b": 255, 824 | "a": 255 825 | }, 826 | "_N$disabledColor": { 827 | "__type__": "cc.Color", 828 | "r": 255, 829 | "g": 255, 830 | "b": 255, 831 | "a": 255 832 | }, 833 | "_N$normalSprite": { 834 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 835 | }, 836 | "_N$pressedSprite": { 837 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 838 | }, 839 | "pressedSprite": { 840 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 841 | }, 842 | "_N$hoverSprite": { 843 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 844 | }, 845 | "hoverSprite": { 846 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 847 | }, 848 | "_N$disabledSprite": { 849 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 850 | }, 851 | "_N$target": { 852 | "__id__": 16 853 | } 854 | }, 855 | { 856 | "__type__": "cc.ClickEvent", 857 | "target": { 858 | "__id__": 2 859 | }, 860 | "component": "Lobby", 861 | "handler": "onBtnRegister", 862 | "customEventData": "" 863 | }, 864 | { 865 | "__type__": "cc.Node", 866 | "_name": "login", 867 | "_objFlags": 0, 868 | "_parent": { 869 | "__id__": 2 870 | }, 871 | "_children": [ 872 | { 873 | "__id__": 23 874 | } 875 | ], 876 | "_tag": -1, 877 | "_active": true, 878 | "_components": [ 879 | { 880 | "__id__": 25 881 | }, 882 | { 883 | "__id__": 26 884 | } 885 | ], 886 | "_prefab": null, 887 | "_id": "d7YB3YcKJD6b5WfhxGSmoz", 888 | "_opacity": 255, 889 | "_color": { 890 | "__type__": "cc.Color", 891 | "r": 255, 892 | "g": 255, 893 | "b": 255, 894 | "a": 255 895 | }, 896 | "_cascadeOpacityEnabled": true, 897 | "_anchorPoint": { 898 | "__type__": "cc.Vec2", 899 | "x": 0.5, 900 | "y": 0.5 901 | }, 902 | "_contentSize": { 903 | "__type__": "cc.Size", 904 | "width": 100, 905 | "height": 40 906 | }, 907 | "_rotationX": 0, 908 | "_rotationY": 0, 909 | "_scaleX": 1, 910 | "_scaleY": 1, 911 | "_position": { 912 | "__type__": "cc.Vec2", 913 | "x": 0, 914 | "y": -300 915 | }, 916 | "_skewX": 0, 917 | "_skewY": 0, 918 | "_localZOrder": 0, 919 | "_globalZOrder": 0, 920 | "_opacityModifyRGB": false, 921 | "groupIndex": 0 922 | }, 923 | { 924 | "__type__": "cc.Node", 925 | "_name": "Label", 926 | "_objFlags": 0, 927 | "_parent": { 928 | "__id__": 22 929 | }, 930 | "_children": [], 931 | "_tag": -1, 932 | "_active": true, 933 | "_components": [ 934 | { 935 | "__id__": 24 936 | } 937 | ], 938 | "_prefab": null, 939 | "_id": "5bsmGD9aVHYam1r7Bft33X", 940 | "_opacity": 255, 941 | "_color": { 942 | "__type__": "cc.Color", 943 | "r": 0, 944 | "g": 0, 945 | "b": 0, 946 | "a": 255 947 | }, 948 | "_cascadeOpacityEnabled": true, 949 | "_anchorPoint": { 950 | "__type__": "cc.Vec2", 951 | "x": 0.5, 952 | "y": 0.5 953 | }, 954 | "_contentSize": { 955 | "__type__": "cc.Size", 956 | "width": 100, 957 | "height": 40 958 | }, 959 | "_rotationX": 0, 960 | "_rotationY": 0, 961 | "_scaleX": 1, 962 | "_scaleY": 1, 963 | "_position": { 964 | "__type__": "cc.Vec2", 965 | "x": 0, 966 | "y": 0 967 | }, 968 | "_skewX": 0, 969 | "_skewY": 0, 970 | "_localZOrder": 0, 971 | "_globalZOrder": 0, 972 | "_opacityModifyRGB": false, 973 | "groupIndex": 0 974 | }, 975 | { 976 | "__type__": "cc.Label", 977 | "_name": "", 978 | "_objFlags": 0, 979 | "node": { 980 | "__id__": 23 981 | }, 982 | "_enabled": true, 983 | "_useOriginalSize": false, 984 | "_actualFontSize": 20, 985 | "_fontSize": 20, 986 | "_lineHeight": 40, 987 | "_enableWrapText": false, 988 | "_N$file": null, 989 | "_isSystemFontUsed": true, 990 | "_spacingX": 0, 991 | "_N$string": "登陆", 992 | "_N$horizontalAlign": 1, 993 | "_N$verticalAlign": 1, 994 | "_N$fontFamily": "Arial", 995 | "_N$overflow": 1 996 | }, 997 | { 998 | "__type__": "cc.Sprite", 999 | "_name": "", 1000 | "_objFlags": 0, 1001 | "node": { 1002 | "__id__": 22 1003 | }, 1004 | "_enabled": true, 1005 | "_spriteFrame": { 1006 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1007 | }, 1008 | "_type": 1, 1009 | "_sizeMode": 0, 1010 | "_fillType": 0, 1011 | "_fillCenter": { 1012 | "__type__": "cc.Vec2", 1013 | "x": 0, 1014 | "y": 0 1015 | }, 1016 | "_fillStart": 0, 1017 | "_fillRange": 0, 1018 | "_isTrimmedMode": true, 1019 | "_srcBlendFactor": 770, 1020 | "_dstBlendFactor": 771, 1021 | "_atlas": null 1022 | }, 1023 | { 1024 | "__type__": "cc.Button", 1025 | "_name": "", 1026 | "_objFlags": 0, 1027 | "node": { 1028 | "__id__": 22 1029 | }, 1030 | "_enabled": true, 1031 | "transition": 2, 1032 | "pressedColor": { 1033 | "__type__": "cc.Color", 1034 | "r": 255, 1035 | "g": 255, 1036 | "b": 255, 1037 | "a": 255 1038 | }, 1039 | "hoverColor": { 1040 | "__type__": "cc.Color", 1041 | "r": 255, 1042 | "g": 255, 1043 | "b": 255, 1044 | "a": 255 1045 | }, 1046 | "duration": 0.1, 1047 | "zoomScale": 1.2, 1048 | "clickEvents": [ 1049 | { 1050 | "__id__": 27 1051 | } 1052 | ], 1053 | "_N$interactable": true, 1054 | "_N$enableAutoGrayEffect": false, 1055 | "_N$normalColor": { 1056 | "__type__": "cc.Color", 1057 | "r": 255, 1058 | "g": 255, 1059 | "b": 255, 1060 | "a": 255 1061 | }, 1062 | "_N$disabledColor": { 1063 | "__type__": "cc.Color", 1064 | "r": 255, 1065 | "g": 255, 1066 | "b": 255, 1067 | "a": 255 1068 | }, 1069 | "_N$normalSprite": { 1070 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1071 | }, 1072 | "_N$pressedSprite": { 1073 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1074 | }, 1075 | "pressedSprite": { 1076 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1077 | }, 1078 | "_N$hoverSprite": { 1079 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1080 | }, 1081 | "hoverSprite": { 1082 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1083 | }, 1084 | "_N$disabledSprite": { 1085 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 1086 | }, 1087 | "_N$target": { 1088 | "__id__": 22 1089 | } 1090 | }, 1091 | { 1092 | "__type__": "cc.ClickEvent", 1093 | "target": { 1094 | "__id__": 2 1095 | }, 1096 | "component": "Lobby", 1097 | "handler": "onBtnLogin", 1098 | "customEventData": "" 1099 | }, 1100 | { 1101 | "__type__": "cc.Node", 1102 | "_name": "RegNode", 1103 | "_objFlags": 0, 1104 | "_parent": { 1105 | "__id__": 2 1106 | }, 1107 | "_children": [ 1108 | { 1109 | "__id__": 29 1110 | }, 1111 | { 1112 | "__id__": 37 1113 | }, 1114 | { 1115 | "__id__": 41 1116 | }, 1117 | { 1118 | "__id__": 44 1119 | }, 1120 | { 1121 | "__id__": 34 1122 | } 1123 | ], 1124 | "_tag": -1, 1125 | "_active": true, 1126 | "_components": [], 1127 | "_prefab": null, 1128 | "_id": "e96jm7m7hNlpjCRZ+EaNS7", 1129 | "_opacity": 255, 1130 | "_color": { 1131 | "__type__": "cc.Color", 1132 | "r": 255, 1133 | "g": 255, 1134 | "b": 255, 1135 | "a": 255 1136 | }, 1137 | "_cascadeOpacityEnabled": true, 1138 | "_anchorPoint": { 1139 | "__type__": "cc.Vec2", 1140 | "x": 0.5, 1141 | "y": 0.5 1142 | }, 1143 | "_contentSize": { 1144 | "__type__": "cc.Size", 1145 | "width": 0, 1146 | "height": 0 1147 | }, 1148 | "_rotationX": 0, 1149 | "_rotationY": 0, 1150 | "_scaleX": 1, 1151 | "_scaleY": 1, 1152 | "_position": { 1153 | "__type__": "cc.Vec2", 1154 | "x": 0, 1155 | "y": 0 1156 | }, 1157 | "_skewX": 0, 1158 | "_skewY": 0, 1159 | "_localZOrder": 0, 1160 | "_globalZOrder": 0, 1161 | "_opacityModifyRGB": false, 1162 | "groupIndex": 0 1163 | }, 1164 | { 1165 | "__type__": "cc.Node", 1166 | "_name": "New Layout", 1167 | "_objFlags": 0, 1168 | "_parent": { 1169 | "__id__": 28 1170 | }, 1171 | "_children": [], 1172 | "_tag": -1, 1173 | "_active": true, 1174 | "_components": [ 1175 | { 1176 | "__id__": 30 1177 | }, 1178 | { 1179 | "__id__": 31 1180 | }, 1181 | { 1182 | "__id__": 32 1183 | } 1184 | ], 1185 | "_prefab": null, 1186 | "_id": "80kvHh6gBJrrYYZVMKAAW0", 1187 | "_opacity": 180, 1188 | "_color": { 1189 | "__type__": "cc.Color", 1190 | "r": 0, 1191 | "g": 0, 1192 | "b": 0, 1193 | "a": 255 1194 | }, 1195 | "_cascadeOpacityEnabled": true, 1196 | "_anchorPoint": { 1197 | "__type__": "cc.Vec2", 1198 | "x": 0.5, 1199 | "y": 0.5 1200 | }, 1201 | "_contentSize": { 1202 | "__type__": "cc.Size", 1203 | "width": 750, 1204 | "height": 1334 1205 | }, 1206 | "_rotationX": 0, 1207 | "_rotationY": 0, 1208 | "_scaleX": 1, 1209 | "_scaleY": 1, 1210 | "_position": { 1211 | "__type__": "cc.Vec2", 1212 | "x": 0, 1213 | "y": 0 1214 | }, 1215 | "_skewX": 0, 1216 | "_skewY": 0, 1217 | "_localZOrder": 0, 1218 | "_globalZOrder": 0, 1219 | "_opacityModifyRGB": false, 1220 | "groupIndex": 0 1221 | }, 1222 | { 1223 | "__type__": "cc.Sprite", 1224 | "_name": "", 1225 | "_objFlags": 0, 1226 | "node": { 1227 | "__id__": 29 1228 | }, 1229 | "_enabled": true, 1230 | "_spriteFrame": { 1231 | "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" 1232 | }, 1233 | "_type": 1, 1234 | "_sizeMode": 0, 1235 | "_fillType": 0, 1236 | "_fillCenter": { 1237 | "__type__": "cc.Vec2", 1238 | "x": 0, 1239 | "y": 0 1240 | }, 1241 | "_fillStart": 0, 1242 | "_fillRange": 0, 1243 | "_isTrimmedMode": true, 1244 | "_srcBlendFactor": 770, 1245 | "_dstBlendFactor": 771, 1246 | "_atlas": null 1247 | }, 1248 | { 1249 | "__type__": "cc.Layout", 1250 | "_name": "", 1251 | "_objFlags": 0, 1252 | "node": { 1253 | "__id__": 29 1254 | }, 1255 | "_enabled": true, 1256 | "_layoutSize": { 1257 | "__type__": "cc.Size", 1258 | "width": 750, 1259 | "height": 1334 1260 | }, 1261 | "_resize": 0, 1262 | "_N$layoutType": 0, 1263 | "_N$padding": 0, 1264 | "_N$cellSize": { 1265 | "__type__": "cc.Size", 1266 | "width": 40, 1267 | "height": 40 1268 | }, 1269 | "_N$startAxis": 0, 1270 | "_N$paddingLeft": 0, 1271 | "_N$paddingRight": 0, 1272 | "_N$paddingTop": 0, 1273 | "_N$paddingBottom": 0, 1274 | "_N$spacingX": 0, 1275 | "_N$spacingY": 0, 1276 | "_N$verticalDirection": 1, 1277 | "_N$horizontalDirection": 0 1278 | }, 1279 | { 1280 | "__type__": "cc.Button", 1281 | "_name": "", 1282 | "_objFlags": 0, 1283 | "node": { 1284 | "__id__": 29 1285 | }, 1286 | "_enabled": true, 1287 | "transition": 0, 1288 | "pressedColor": { 1289 | "__type__": "cc.Color", 1290 | "r": 211, 1291 | "g": 211, 1292 | "b": 211, 1293 | "a": 255 1294 | }, 1295 | "hoverColor": { 1296 | "__type__": "cc.Color", 1297 | "r": 255, 1298 | "g": 255, 1299 | "b": 255, 1300 | "a": 255 1301 | }, 1302 | "duration": 0.1, 1303 | "zoomScale": 1.2, 1304 | "clickEvents": [ 1305 | { 1306 | "__id__": 33 1307 | } 1308 | ], 1309 | "_N$interactable": true, 1310 | "_N$enableAutoGrayEffect": false, 1311 | "_N$normalColor": { 1312 | "__type__": "cc.Color", 1313 | "r": 214, 1314 | "g": 214, 1315 | "b": 214, 1316 | "a": 255 1317 | }, 1318 | "_N$disabledColor": { 1319 | "__type__": "cc.Color", 1320 | "r": 124, 1321 | "g": 124, 1322 | "b": 124, 1323 | "a": 255 1324 | }, 1325 | "_N$normalSprite": null, 1326 | "_N$pressedSprite": null, 1327 | "pressedSprite": null, 1328 | "_N$hoverSprite": null, 1329 | "hoverSprite": null, 1330 | "_N$disabledSprite": null, 1331 | "_N$target": { 1332 | "__id__": 29 1333 | } 1334 | }, 1335 | { 1336 | "__type__": "cc.ClickEvent", 1337 | "target": { 1338 | "__id__": 34 1339 | }, 1340 | "component": "Register", 1341 | "handler": "onBtnPanel", 1342 | "customEventData": "" 1343 | }, 1344 | { 1345 | "__type__": "cc.Node", 1346 | "_name": "ctrl", 1347 | "_objFlags": 0, 1348 | "_parent": { 1349 | "__id__": 28 1350 | }, 1351 | "_children": [], 1352 | "_tag": -1, 1353 | "_active": true, 1354 | "_components": [ 1355 | { 1356 | "__id__": 35 1357 | } 1358 | ], 1359 | "_prefab": null, 1360 | "_id": "b8sSsLvn9KtpMuchxc1w4M", 1361 | "_opacity": 255, 1362 | "_color": { 1363 | "__type__": "cc.Color", 1364 | "r": 255, 1365 | "g": 255, 1366 | "b": 255, 1367 | "a": 255 1368 | }, 1369 | "_cascadeOpacityEnabled": true, 1370 | "_anchorPoint": { 1371 | "__type__": "cc.Vec2", 1372 | "x": 0.5, 1373 | "y": 0.5 1374 | }, 1375 | "_contentSize": { 1376 | "__type__": "cc.Size", 1377 | "width": 0, 1378 | "height": 0 1379 | }, 1380 | "_rotationX": 0, 1381 | "_rotationY": 0, 1382 | "_scaleX": 1, 1383 | "_scaleY": 1, 1384 | "_position": { 1385 | "__type__": "cc.Vec2", 1386 | "x": 0, 1387 | "y": 0 1388 | }, 1389 | "_skewX": 0, 1390 | "_skewY": 0, 1391 | "_localZOrder": 0, 1392 | "_globalZOrder": 0, 1393 | "_opacityModifyRGB": false, 1394 | "groupIndex": 0 1395 | }, 1396 | { 1397 | "__type__": "7e0ddkylBJOFJvSYaixPz9N", 1398 | "_name": "", 1399 | "_objFlags": 0, 1400 | "node": { 1401 | "__id__": 34 1402 | }, 1403 | "_enabled": true, 1404 | "Name": { 1405 | "__id__": 36 1406 | }, 1407 | "Pwd": { 1408 | "__id__": 40 1409 | } 1410 | }, 1411 | { 1412 | "__type__": "cc.EditBox", 1413 | "_name": "", 1414 | "_objFlags": 0, 1415 | "node": { 1416 | "__id__": 37 1417 | }, 1418 | "_enabled": true, 1419 | "_useOriginalSize": false, 1420 | "_string": "", 1421 | "_tabIndex": 0, 1422 | "editingDidBegan": [], 1423 | "textChanged": [], 1424 | "editingDidEnded": [], 1425 | "editingReturn": [], 1426 | "_N$backgroundImage": { 1427 | "__uuid__": "67e68bc9-dad5-4ad9-a2d8-7e03d458e32f" 1428 | }, 1429 | "_N$returnType": 0, 1430 | "_N$inputFlag": 3, 1431 | "_N$inputMode": 6, 1432 | "_N$fontSize": 29, 1433 | "_N$lineHeight": 40, 1434 | "_N$fontColor": { 1435 | "__type__": "cc.Color", 1436 | "r": 0, 1437 | "g": 0, 1438 | "b": 0, 1439 | "a": 255 1440 | }, 1441 | "_N$placeholder": "Enter user name here", 1442 | "_N$placeholderFontSize": 20, 1443 | "_N$placeholderFontColor": { 1444 | "__type__": "cc.Color", 1445 | "r": 127, 1446 | "g": 127, 1447 | "b": 127, 1448 | "a": 255 1449 | }, 1450 | "_N$maxLength": 25, 1451 | "_N$stayOnTop": false 1452 | }, 1453 | { 1454 | "__type__": "cc.Node", 1455 | "_name": "NameEditBox", 1456 | "_objFlags": 0, 1457 | "_parent": { 1458 | "__id__": 28 1459 | }, 1460 | "_children": [ 1461 | { 1462 | "__id__": 38 1463 | } 1464 | ], 1465 | "_tag": -1, 1466 | "_active": true, 1467 | "_components": [ 1468 | { 1469 | "__id__": 36 1470 | } 1471 | ], 1472 | "_prefab": null, 1473 | "_id": "f7mkYERXtArJVWvlWZ0jD1", 1474 | "_opacity": 255, 1475 | "_color": { 1476 | "__type__": "cc.Color", 1477 | "r": 255, 1478 | "g": 255, 1479 | "b": 255, 1480 | "a": 255 1481 | }, 1482 | "_cascadeOpacityEnabled": true, 1483 | "_anchorPoint": { 1484 | "__type__": "cc.Vec2", 1485 | "x": 0.5, 1486 | "y": 0.5 1487 | }, 1488 | "_contentSize": { 1489 | "__type__": "cc.Size", 1490 | "width": 300, 1491 | "height": 50 1492 | }, 1493 | "_rotationX": 0, 1494 | "_rotationY": 0, 1495 | "_scaleX": 1, 1496 | "_scaleY": 1, 1497 | "_position": { 1498 | "__type__": "cc.Vec2", 1499 | "x": 50, 1500 | "y": 100 1501 | }, 1502 | "_skewX": 0, 1503 | "_skewY": 0, 1504 | "_localZOrder": 0, 1505 | "_globalZOrder": 0, 1506 | "_opacityModifyRGB": false, 1507 | "groupIndex": 0 1508 | }, 1509 | { 1510 | "__type__": "cc.Node", 1511 | "_name": "New Label", 1512 | "_objFlags": 0, 1513 | "_parent": { 1514 | "__id__": 37 1515 | }, 1516 | "_children": [], 1517 | "_tag": -1, 1518 | "_active": true, 1519 | "_components": [ 1520 | { 1521 | "__id__": 39 1522 | } 1523 | ], 1524 | "_prefab": null, 1525 | "_id": "c5pZHarNRN2aOlyumsr8bK", 1526 | "_opacity": 255, 1527 | "_color": { 1528 | "__type__": "cc.Color", 1529 | "r": 255, 1530 | "g": 255, 1531 | "b": 255, 1532 | "a": 255 1533 | }, 1534 | "_cascadeOpacityEnabled": true, 1535 | "_anchorPoint": { 1536 | "__type__": "cc.Vec2", 1537 | "x": 0.5, 1538 | "y": 0.5 1539 | }, 1540 | "_contentSize": { 1541 | "__type__": "cc.Size", 1542 | "width": 120, 1543 | "height": 40 1544 | }, 1545 | "_rotationX": 0, 1546 | "_rotationY": 0, 1547 | "_scaleX": 1, 1548 | "_scaleY": 1, 1549 | "_position": { 1550 | "__type__": "cc.Vec2", 1551 | "x": -226, 1552 | "y": 0 1553 | }, 1554 | "_skewX": 0, 1555 | "_skewY": 0, 1556 | "_localZOrder": 0, 1557 | "_globalZOrder": 0, 1558 | "_opacityModifyRGB": false, 1559 | "groupIndex": 0 1560 | }, 1561 | { 1562 | "__type__": "cc.Label", 1563 | "_name": "", 1564 | "_objFlags": 0, 1565 | "node": { 1566 | "__id__": 38 1567 | }, 1568 | "_enabled": true, 1569 | "_useOriginalSize": false, 1570 | "_actualFontSize": 40, 1571 | "_fontSize": 40, 1572 | "_lineHeight": 40, 1573 | "_enableWrapText": true, 1574 | "_N$file": null, 1575 | "_isSystemFontUsed": true, 1576 | "_spacingX": 0, 1577 | "_N$string": "用户名", 1578 | "_N$horizontalAlign": 1, 1579 | "_N$verticalAlign": 1, 1580 | "_N$fontFamily": "Arial", 1581 | "_N$overflow": 0 1582 | }, 1583 | { 1584 | "__type__": "cc.EditBox", 1585 | "_name": "", 1586 | "_objFlags": 0, 1587 | "node": { 1588 | "__id__": 41 1589 | }, 1590 | "_enabled": true, 1591 | "_useOriginalSize": false, 1592 | "_string": "", 1593 | "_tabIndex": 0, 1594 | "editingDidBegan": [], 1595 | "textChanged": [], 1596 | "editingDidEnded": [], 1597 | "editingReturn": [], 1598 | "_N$backgroundImage": { 1599 | "__uuid__": "67e68bc9-dad5-4ad9-a2d8-7e03d458e32f" 1600 | }, 1601 | "_N$returnType": 0, 1602 | "_N$inputFlag": 0, 1603 | "_N$inputMode": 6, 1604 | "_N$fontSize": 29, 1605 | "_N$lineHeight": 40, 1606 | "_N$fontColor": { 1607 | "__type__": "cc.Color", 1608 | "r": 0, 1609 | "g": 0, 1610 | "b": 0, 1611 | "a": 255 1612 | }, 1613 | "_N$placeholder": "Enter password here...", 1614 | "_N$placeholderFontSize": 20, 1615 | "_N$placeholderFontColor": { 1616 | "__type__": "cc.Color", 1617 | "r": 127, 1618 | "g": 127, 1619 | "b": 127, 1620 | "a": 255 1621 | }, 1622 | "_N$maxLength": 25, 1623 | "_N$stayOnTop": false 1624 | }, 1625 | { 1626 | "__type__": "cc.Node", 1627 | "_name": "PwdEditBox", 1628 | "_objFlags": 0, 1629 | "_parent": { 1630 | "__id__": 28 1631 | }, 1632 | "_children": [ 1633 | { 1634 | "__id__": 42 1635 | } 1636 | ], 1637 | "_tag": -1, 1638 | "_active": true, 1639 | "_components": [ 1640 | { 1641 | "__id__": 40 1642 | } 1643 | ], 1644 | "_prefab": null, 1645 | "_id": "e5p4Wan8lFVr7j4M4qsnYd", 1646 | "_opacity": 255, 1647 | "_color": { 1648 | "__type__": "cc.Color", 1649 | "r": 255, 1650 | "g": 255, 1651 | "b": 255, 1652 | "a": 255 1653 | }, 1654 | "_cascadeOpacityEnabled": true, 1655 | "_anchorPoint": { 1656 | "__type__": "cc.Vec2", 1657 | "x": 0.5, 1658 | "y": 0.5 1659 | }, 1660 | "_contentSize": { 1661 | "__type__": "cc.Size", 1662 | "width": 300, 1663 | "height": 50 1664 | }, 1665 | "_rotationX": 0, 1666 | "_rotationY": 0, 1667 | "_scaleX": 1, 1668 | "_scaleY": 1, 1669 | "_position": { 1670 | "__type__": "cc.Vec2", 1671 | "x": 50, 1672 | "y": 0 1673 | }, 1674 | "_skewX": 0, 1675 | "_skewY": 0, 1676 | "_localZOrder": 0, 1677 | "_globalZOrder": 0, 1678 | "_opacityModifyRGB": false, 1679 | "groupIndex": 0 1680 | }, 1681 | { 1682 | "__type__": "cc.Node", 1683 | "_name": "New Label", 1684 | "_objFlags": 0, 1685 | "_parent": { 1686 | "__id__": 41 1687 | }, 1688 | "_children": [], 1689 | "_tag": -1, 1690 | "_active": true, 1691 | "_components": [ 1692 | { 1693 | "__id__": 43 1694 | } 1695 | ], 1696 | "_prefab": null, 1697 | "_id": "d8H2W/7QFLaI87/Ov30R8s", 1698 | "_opacity": 255, 1699 | "_color": { 1700 | "__type__": "cc.Color", 1701 | "r": 255, 1702 | "g": 255, 1703 | "b": 255, 1704 | "a": 255 1705 | }, 1706 | "_cascadeOpacityEnabled": true, 1707 | "_anchorPoint": { 1708 | "__type__": "cc.Vec2", 1709 | "x": 0.5, 1710 | "y": 0.5 1711 | }, 1712 | "_contentSize": { 1713 | "__type__": "cc.Size", 1714 | "width": 80, 1715 | "height": 40 1716 | }, 1717 | "_rotationX": 0, 1718 | "_rotationY": 0, 1719 | "_scaleX": 1, 1720 | "_scaleY": 1, 1721 | "_position": { 1722 | "__type__": "cc.Vec2", 1723 | "x": -227, 1724 | "y": 0 1725 | }, 1726 | "_skewX": 0, 1727 | "_skewY": 0, 1728 | "_localZOrder": 0, 1729 | "_globalZOrder": 0, 1730 | "_opacityModifyRGB": false, 1731 | "groupIndex": 0 1732 | }, 1733 | { 1734 | "__type__": "cc.Label", 1735 | "_name": "", 1736 | "_objFlags": 0, 1737 | "node": { 1738 | "__id__": 42 1739 | }, 1740 | "_enabled": true, 1741 | "_useOriginalSize": false, 1742 | "_actualFontSize": 40, 1743 | "_fontSize": 40, 1744 | "_lineHeight": 40, 1745 | "_enableWrapText": true, 1746 | "_N$file": null, 1747 | "_isSystemFontUsed": true, 1748 | "_spacingX": 0, 1749 | "_N$string": "密码", 1750 | "_N$horizontalAlign": 1, 1751 | "_N$verticalAlign": 1, 1752 | "_N$fontFamily": "Arial", 1753 | "_N$overflow": 0 1754 | }, 1755 | { 1756 | "__type__": "cc.Node", 1757 | "_name": "comfire", 1758 | "_objFlags": 0, 1759 | "_parent": { 1760 | "__id__": 28 1761 | }, 1762 | "_children": [ 1763 | { 1764 | "__id__": 45 1765 | } 1766 | ], 1767 | "_tag": -1, 1768 | "_active": true, 1769 | "_components": [ 1770 | { 1771 | "__id__": 47 1772 | }, 1773 | { 1774 | "__id__": 48 1775 | } 1776 | ], 1777 | "_prefab": null, 1778 | "_id": "baVTp/pOZEt6ont841LI9x", 1779 | "_opacity": 255, 1780 | "_color": { 1781 | "__type__": "cc.Color", 1782 | "r": 255, 1783 | "g": 255, 1784 | "b": 255, 1785 | "a": 255 1786 | }, 1787 | "_cascadeOpacityEnabled": true, 1788 | "_anchorPoint": { 1789 | "__type__": "cc.Vec2", 1790 | "x": 0.5, 1791 | "y": 0.5 1792 | }, 1793 | "_contentSize": { 1794 | "__type__": "cc.Size", 1795 | "width": 200, 1796 | "height": 70 1797 | }, 1798 | "_rotationX": 0, 1799 | "_rotationY": 0, 1800 | "_scaleX": 1, 1801 | "_scaleY": 1, 1802 | "_position": { 1803 | "__type__": "cc.Vec2", 1804 | "x": 30, 1805 | "y": -200 1806 | }, 1807 | "_skewX": 0, 1808 | "_skewY": 0, 1809 | "_localZOrder": 0, 1810 | "_globalZOrder": 0, 1811 | "_opacityModifyRGB": false, 1812 | "groupIndex": 0 1813 | }, 1814 | { 1815 | "__type__": "cc.Node", 1816 | "_name": "Label", 1817 | "_objFlags": 0, 1818 | "_parent": { 1819 | "__id__": 44 1820 | }, 1821 | "_children": [], 1822 | "_tag": -1, 1823 | "_active": true, 1824 | "_components": [ 1825 | { 1826 | "__id__": 46 1827 | } 1828 | ], 1829 | "_prefab": null, 1830 | "_id": "61TN9MNyRCTKO/F7dZO36l", 1831 | "_opacity": 255, 1832 | "_color": { 1833 | "__type__": "cc.Color", 1834 | "r": 0, 1835 | "g": 0, 1836 | "b": 0, 1837 | "a": 255 1838 | }, 1839 | "_cascadeOpacityEnabled": true, 1840 | "_anchorPoint": { 1841 | "__type__": "cc.Vec2", 1842 | "x": 0.5, 1843 | "y": 0.5 1844 | }, 1845 | "_contentSize": { 1846 | "__type__": "cc.Size", 1847 | "width": 100, 1848 | "height": 40 1849 | }, 1850 | "_rotationX": 0, 1851 | "_rotationY": 0, 1852 | "_scaleX": 1, 1853 | "_scaleY": 1, 1854 | "_position": { 1855 | "__type__": "cc.Vec2", 1856 | "x": 0, 1857 | "y": 0 1858 | }, 1859 | "_skewX": 0, 1860 | "_skewY": 0, 1861 | "_localZOrder": 0, 1862 | "_globalZOrder": 0, 1863 | "_opacityModifyRGB": false, 1864 | "groupIndex": 0 1865 | }, 1866 | { 1867 | "__type__": "cc.Label", 1868 | "_name": "", 1869 | "_objFlags": 0, 1870 | "node": { 1871 | "__id__": 45 1872 | }, 1873 | "_enabled": true, 1874 | "_useOriginalSize": false, 1875 | "_actualFontSize": 20, 1876 | "_fontSize": 20, 1877 | "_lineHeight": 40, 1878 | "_enableWrapText": false, 1879 | "_N$file": null, 1880 | "_isSystemFontUsed": true, 1881 | "_spacingX": 0, 1882 | "_N$string": "注册", 1883 | "_N$horizontalAlign": 1, 1884 | "_N$verticalAlign": 1, 1885 | "_N$fontFamily": "Arial", 1886 | "_N$overflow": 1 1887 | }, 1888 | { 1889 | "__type__": "cc.Sprite", 1890 | "_name": "", 1891 | "_objFlags": 0, 1892 | "node": { 1893 | "__id__": 44 1894 | }, 1895 | "_enabled": true, 1896 | "_spriteFrame": { 1897 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1898 | }, 1899 | "_type": 1, 1900 | "_sizeMode": 0, 1901 | "_fillType": 0, 1902 | "_fillCenter": { 1903 | "__type__": "cc.Vec2", 1904 | "x": 0, 1905 | "y": 0 1906 | }, 1907 | "_fillStart": 0, 1908 | "_fillRange": 0, 1909 | "_isTrimmedMode": true, 1910 | "_srcBlendFactor": 770, 1911 | "_dstBlendFactor": 771, 1912 | "_atlas": null 1913 | }, 1914 | { 1915 | "__type__": "cc.Button", 1916 | "_name": "", 1917 | "_objFlags": 0, 1918 | "node": { 1919 | "__id__": 44 1920 | }, 1921 | "_enabled": true, 1922 | "transition": 2, 1923 | "pressedColor": { 1924 | "__type__": "cc.Color", 1925 | "r": 255, 1926 | "g": 255, 1927 | "b": 255, 1928 | "a": 255 1929 | }, 1930 | "hoverColor": { 1931 | "__type__": "cc.Color", 1932 | "r": 255, 1933 | "g": 255, 1934 | "b": 255, 1935 | "a": 255 1936 | }, 1937 | "duration": 0.1, 1938 | "zoomScale": 1.2, 1939 | "clickEvents": [ 1940 | { 1941 | "__id__": 49 1942 | } 1943 | ], 1944 | "_N$interactable": true, 1945 | "_N$enableAutoGrayEffect": false, 1946 | "_N$normalColor": { 1947 | "__type__": "cc.Color", 1948 | "r": 255, 1949 | "g": 255, 1950 | "b": 255, 1951 | "a": 255 1952 | }, 1953 | "_N$disabledColor": { 1954 | "__type__": "cc.Color", 1955 | "r": 255, 1956 | "g": 255, 1957 | "b": 255, 1958 | "a": 255 1959 | }, 1960 | "_N$normalSprite": { 1961 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 1962 | }, 1963 | "_N$pressedSprite": { 1964 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1965 | }, 1966 | "pressedSprite": { 1967 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1968 | }, 1969 | "_N$hoverSprite": { 1970 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1971 | }, 1972 | "hoverSprite": { 1973 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 1974 | }, 1975 | "_N$disabledSprite": { 1976 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 1977 | }, 1978 | "_N$target": { 1979 | "__id__": 44 1980 | } 1981 | }, 1982 | { 1983 | "__type__": "cc.ClickEvent", 1984 | "target": { 1985 | "__id__": 34 1986 | }, 1987 | "component": "Register", 1988 | "handler": "onBtnComfirm", 1989 | "customEventData": "" 1990 | }, 1991 | { 1992 | "__type__": "cc.Node", 1993 | "_name": "loginNode", 1994 | "_objFlags": 0, 1995 | "_parent": { 1996 | "__id__": 2 1997 | }, 1998 | "_children": [ 1999 | { 2000 | "__id__": 51 2001 | }, 2002 | { 2003 | "__id__": 59 2004 | }, 2005 | { 2006 | "__id__": 63 2007 | }, 2008 | { 2009 | "__id__": 66 2010 | }, 2011 | { 2012 | "__id__": 56 2013 | } 2014 | ], 2015 | "_tag": -1, 2016 | "_active": false, 2017 | "_components": [], 2018 | "_prefab": null, 2019 | "_id": "1cddMDLm5I1ZbQAosfbHtA", 2020 | "_opacity": 255, 2021 | "_color": { 2022 | "__type__": "cc.Color", 2023 | "r": 255, 2024 | "g": 255, 2025 | "b": 255, 2026 | "a": 255 2027 | }, 2028 | "_cascadeOpacityEnabled": true, 2029 | "_anchorPoint": { 2030 | "__type__": "cc.Vec2", 2031 | "x": 0.5, 2032 | "y": 0.5 2033 | }, 2034 | "_contentSize": { 2035 | "__type__": "cc.Size", 2036 | "width": 0, 2037 | "height": 0 2038 | }, 2039 | "_rotationX": 0, 2040 | "_rotationY": 0, 2041 | "_scaleX": 1, 2042 | "_scaleY": 1, 2043 | "_position": { 2044 | "__type__": "cc.Vec2", 2045 | "x": 0, 2046 | "y": 0 2047 | }, 2048 | "_skewX": 0, 2049 | "_skewY": 0, 2050 | "_localZOrder": 0, 2051 | "_globalZOrder": 0, 2052 | "_opacityModifyRGB": false, 2053 | "groupIndex": 0 2054 | }, 2055 | { 2056 | "__type__": "cc.Node", 2057 | "_name": "New Layout", 2058 | "_objFlags": 0, 2059 | "_parent": { 2060 | "__id__": 50 2061 | }, 2062 | "_children": [], 2063 | "_tag": -1, 2064 | "_active": true, 2065 | "_components": [ 2066 | { 2067 | "__id__": 52 2068 | }, 2069 | { 2070 | "__id__": 53 2071 | }, 2072 | { 2073 | "__id__": 54 2074 | } 2075 | ], 2076 | "_prefab": null, 2077 | "_id": "27kxgQBRtLWJ0VvwZt8xjO", 2078 | "_opacity": 180, 2079 | "_color": { 2080 | "__type__": "cc.Color", 2081 | "r": 0, 2082 | "g": 0, 2083 | "b": 0, 2084 | "a": 255 2085 | }, 2086 | "_cascadeOpacityEnabled": true, 2087 | "_anchorPoint": { 2088 | "__type__": "cc.Vec2", 2089 | "x": 0.5, 2090 | "y": 0.5 2091 | }, 2092 | "_contentSize": { 2093 | "__type__": "cc.Size", 2094 | "width": 750, 2095 | "height": 1334 2096 | }, 2097 | "_rotationX": 0, 2098 | "_rotationY": 0, 2099 | "_scaleX": 1, 2100 | "_scaleY": 1, 2101 | "_position": { 2102 | "__type__": "cc.Vec2", 2103 | "x": 0, 2104 | "y": 0 2105 | }, 2106 | "_skewX": 0, 2107 | "_skewY": 0, 2108 | "_localZOrder": 0, 2109 | "_globalZOrder": 0, 2110 | "_opacityModifyRGB": false, 2111 | "groupIndex": 0 2112 | }, 2113 | { 2114 | "__type__": "cc.Sprite", 2115 | "_name": "", 2116 | "_objFlags": 0, 2117 | "node": { 2118 | "__id__": 51 2119 | }, 2120 | "_enabled": true, 2121 | "_spriteFrame": { 2122 | "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" 2123 | }, 2124 | "_type": 1, 2125 | "_sizeMode": 0, 2126 | "_fillType": 0, 2127 | "_fillCenter": { 2128 | "__type__": "cc.Vec2", 2129 | "x": 0, 2130 | "y": 0 2131 | }, 2132 | "_fillStart": 0, 2133 | "_fillRange": 0, 2134 | "_isTrimmedMode": true, 2135 | "_srcBlendFactor": 770, 2136 | "_dstBlendFactor": 771, 2137 | "_atlas": null 2138 | }, 2139 | { 2140 | "__type__": "cc.Layout", 2141 | "_name": "", 2142 | "_objFlags": 0, 2143 | "node": { 2144 | "__id__": 51 2145 | }, 2146 | "_enabled": true, 2147 | "_layoutSize": { 2148 | "__type__": "cc.Size", 2149 | "width": 960, 2150 | "height": 640 2151 | }, 2152 | "_resize": 0, 2153 | "_N$layoutType": 0, 2154 | "_N$padding": 0, 2155 | "_N$cellSize": { 2156 | "__type__": "cc.Size", 2157 | "width": 40, 2158 | "height": 40 2159 | }, 2160 | "_N$startAxis": 0, 2161 | "_N$paddingLeft": 0, 2162 | "_N$paddingRight": 0, 2163 | "_N$paddingTop": 0, 2164 | "_N$paddingBottom": 0, 2165 | "_N$spacingX": 0, 2166 | "_N$spacingY": 0, 2167 | "_N$verticalDirection": 1, 2168 | "_N$horizontalDirection": 0 2169 | }, 2170 | { 2171 | "__type__": "cc.Button", 2172 | "_name": "", 2173 | "_objFlags": 0, 2174 | "node": { 2175 | "__id__": 51 2176 | }, 2177 | "_enabled": true, 2178 | "transition": 0, 2179 | "pressedColor": { 2180 | "__type__": "cc.Color", 2181 | "r": 211, 2182 | "g": 211, 2183 | "b": 211, 2184 | "a": 255 2185 | }, 2186 | "hoverColor": { 2187 | "__type__": "cc.Color", 2188 | "r": 255, 2189 | "g": 255, 2190 | "b": 255, 2191 | "a": 255 2192 | }, 2193 | "duration": 0.1, 2194 | "zoomScale": 1.2, 2195 | "clickEvents": [ 2196 | { 2197 | "__id__": 55 2198 | } 2199 | ], 2200 | "_N$interactable": true, 2201 | "_N$enableAutoGrayEffect": false, 2202 | "_N$normalColor": { 2203 | "__type__": "cc.Color", 2204 | "r": 214, 2205 | "g": 214, 2206 | "b": 214, 2207 | "a": 255 2208 | }, 2209 | "_N$disabledColor": { 2210 | "__type__": "cc.Color", 2211 | "r": 124, 2212 | "g": 124, 2213 | "b": 124, 2214 | "a": 255 2215 | }, 2216 | "_N$normalSprite": null, 2217 | "_N$pressedSprite": null, 2218 | "pressedSprite": null, 2219 | "_N$hoverSprite": null, 2220 | "hoverSprite": null, 2221 | "_N$disabledSprite": null, 2222 | "_N$target": { 2223 | "__id__": 50 2224 | } 2225 | }, 2226 | { 2227 | "__type__": "cc.ClickEvent", 2228 | "target": { 2229 | "__id__": 56 2230 | }, 2231 | "component": "Login", 2232 | "handler": "onBtnPanel", 2233 | "customEventData": "" 2234 | }, 2235 | { 2236 | "__type__": "cc.Node", 2237 | "_name": "ctrl", 2238 | "_objFlags": 0, 2239 | "_parent": { 2240 | "__id__": 50 2241 | }, 2242 | "_children": [], 2243 | "_tag": -1, 2244 | "_active": true, 2245 | "_components": [ 2246 | { 2247 | "__id__": 57 2248 | } 2249 | ], 2250 | "_prefab": null, 2251 | "_id": "46iJl0yRVBd6Zng9uYjI7r", 2252 | "_opacity": 255, 2253 | "_color": { 2254 | "__type__": "cc.Color", 2255 | "r": 255, 2256 | "g": 255, 2257 | "b": 255, 2258 | "a": 255 2259 | }, 2260 | "_cascadeOpacityEnabled": true, 2261 | "_anchorPoint": { 2262 | "__type__": "cc.Vec2", 2263 | "x": 0.5, 2264 | "y": 0.5 2265 | }, 2266 | "_contentSize": { 2267 | "__type__": "cc.Size", 2268 | "width": 0, 2269 | "height": 0 2270 | }, 2271 | "_rotationX": 0, 2272 | "_rotationY": 0, 2273 | "_scaleX": 1, 2274 | "_scaleY": 1, 2275 | "_position": { 2276 | "__type__": "cc.Vec2", 2277 | "x": 0, 2278 | "y": 0 2279 | }, 2280 | "_skewX": 0, 2281 | "_skewY": 0, 2282 | "_localZOrder": 0, 2283 | "_globalZOrder": 0, 2284 | "_opacityModifyRGB": false, 2285 | "groupIndex": 0 2286 | }, 2287 | { 2288 | "__type__": "4660alKh+xNA78thOAGGSZe", 2289 | "_name": "", 2290 | "_objFlags": 0, 2291 | "node": { 2292 | "__id__": 56 2293 | }, 2294 | "_enabled": true, 2295 | "Name": { 2296 | "__id__": 58 2297 | }, 2298 | "Pwd": { 2299 | "__id__": 62 2300 | } 2301 | }, 2302 | { 2303 | "__type__": "cc.EditBox", 2304 | "_name": "", 2305 | "_objFlags": 0, 2306 | "node": { 2307 | "__id__": 59 2308 | }, 2309 | "_enabled": true, 2310 | "_useOriginalSize": false, 2311 | "_string": "", 2312 | "_tabIndex": 0, 2313 | "editingDidBegan": [], 2314 | "textChanged": [], 2315 | "editingDidEnded": [], 2316 | "editingReturn": [], 2317 | "_N$backgroundImage": { 2318 | "__uuid__": "67e68bc9-dad5-4ad9-a2d8-7e03d458e32f" 2319 | }, 2320 | "_N$returnType": 0, 2321 | "_N$inputFlag": 5, 2322 | "_N$inputMode": 6, 2323 | "_N$fontSize": 29, 2324 | "_N$lineHeight": 40, 2325 | "_N$fontColor": { 2326 | "__type__": "cc.Color", 2327 | "r": 0, 2328 | "g": 0, 2329 | "b": 0, 2330 | "a": 255 2331 | }, 2332 | "_N$placeholder": "Enter user name here", 2333 | "_N$placeholderFontSize": 20, 2334 | "_N$placeholderFontColor": { 2335 | "__type__": "cc.Color", 2336 | "r": 127, 2337 | "g": 127, 2338 | "b": 127, 2339 | "a": 255 2340 | }, 2341 | "_N$maxLength": 8, 2342 | "_N$stayOnTop": false 2343 | }, 2344 | { 2345 | "__type__": "cc.Node", 2346 | "_name": "NameEditBox", 2347 | "_objFlags": 0, 2348 | "_parent": { 2349 | "__id__": 50 2350 | }, 2351 | "_children": [ 2352 | { 2353 | "__id__": 60 2354 | } 2355 | ], 2356 | "_tag": -1, 2357 | "_active": true, 2358 | "_components": [ 2359 | { 2360 | "__id__": 58 2361 | } 2362 | ], 2363 | "_prefab": null, 2364 | "_id": "817v7hjmdFYYMEMKSAT7E0", 2365 | "_opacity": 255, 2366 | "_color": { 2367 | "__type__": "cc.Color", 2368 | "r": 255, 2369 | "g": 255, 2370 | "b": 255, 2371 | "a": 255 2372 | }, 2373 | "_cascadeOpacityEnabled": true, 2374 | "_anchorPoint": { 2375 | "__type__": "cc.Vec2", 2376 | "x": 0.5, 2377 | "y": 0.5 2378 | }, 2379 | "_contentSize": { 2380 | "__type__": "cc.Size", 2381 | "width": 300, 2382 | "height": 50 2383 | }, 2384 | "_rotationX": 0, 2385 | "_rotationY": 0, 2386 | "_scaleX": 1, 2387 | "_scaleY": 1, 2388 | "_position": { 2389 | "__type__": "cc.Vec2", 2390 | "x": 50, 2391 | "y": 100 2392 | }, 2393 | "_skewX": 0, 2394 | "_skewY": 0, 2395 | "_localZOrder": 0, 2396 | "_globalZOrder": 0, 2397 | "_opacityModifyRGB": false, 2398 | "groupIndex": 0 2399 | }, 2400 | { 2401 | "__type__": "cc.Node", 2402 | "_name": "New Label", 2403 | "_objFlags": 0, 2404 | "_parent": { 2405 | "__id__": 59 2406 | }, 2407 | "_children": [], 2408 | "_tag": -1, 2409 | "_active": true, 2410 | "_components": [ 2411 | { 2412 | "__id__": 61 2413 | } 2414 | ], 2415 | "_prefab": null, 2416 | "_id": "03p0yeWl5ECajxCrAZKXD3", 2417 | "_opacity": 255, 2418 | "_color": { 2419 | "__type__": "cc.Color", 2420 | "r": 255, 2421 | "g": 255, 2422 | "b": 255, 2423 | "a": 255 2424 | }, 2425 | "_cascadeOpacityEnabled": true, 2426 | "_anchorPoint": { 2427 | "__type__": "cc.Vec2", 2428 | "x": 0.5, 2429 | "y": 0.5 2430 | }, 2431 | "_contentSize": { 2432 | "__type__": "cc.Size", 2433 | "width": 120, 2434 | "height": 40 2435 | }, 2436 | "_rotationX": 0, 2437 | "_rotationY": 0, 2438 | "_scaleX": 1, 2439 | "_scaleY": 1, 2440 | "_position": { 2441 | "__type__": "cc.Vec2", 2442 | "x": -226, 2443 | "y": 0 2444 | }, 2445 | "_skewX": 0, 2446 | "_skewY": 0, 2447 | "_localZOrder": 0, 2448 | "_globalZOrder": 0, 2449 | "_opacityModifyRGB": false, 2450 | "groupIndex": 0 2451 | }, 2452 | { 2453 | "__type__": "cc.Label", 2454 | "_name": "", 2455 | "_objFlags": 0, 2456 | "node": { 2457 | "__id__": 60 2458 | }, 2459 | "_enabled": true, 2460 | "_useOriginalSize": false, 2461 | "_actualFontSize": 40, 2462 | "_fontSize": 40, 2463 | "_lineHeight": 40, 2464 | "_enableWrapText": true, 2465 | "_N$file": null, 2466 | "_isSystemFontUsed": true, 2467 | "_spacingX": 0, 2468 | "_N$string": "用户名", 2469 | "_N$horizontalAlign": 1, 2470 | "_N$verticalAlign": 1, 2471 | "_N$fontFamily": "Arial", 2472 | "_N$overflow": 0 2473 | }, 2474 | { 2475 | "__type__": "cc.EditBox", 2476 | "_name": "", 2477 | "_objFlags": 0, 2478 | "node": { 2479 | "__id__": 63 2480 | }, 2481 | "_enabled": true, 2482 | "_useOriginalSize": false, 2483 | "_string": "", 2484 | "_tabIndex": 0, 2485 | "editingDidBegan": [], 2486 | "textChanged": [], 2487 | "editingDidEnded": [], 2488 | "editingReturn": [], 2489 | "_N$backgroundImage": { 2490 | "__uuid__": "67e68bc9-dad5-4ad9-a2d8-7e03d458e32f" 2491 | }, 2492 | "_N$returnType": 0, 2493 | "_N$inputFlag": 0, 2494 | "_N$inputMode": 6, 2495 | "_N$fontSize": 29, 2496 | "_N$lineHeight": 40, 2497 | "_N$fontColor": { 2498 | "__type__": "cc.Color", 2499 | "r": 0, 2500 | "g": 0, 2501 | "b": 0, 2502 | "a": 255 2503 | }, 2504 | "_N$placeholder": "Enter password here...", 2505 | "_N$placeholderFontSize": 20, 2506 | "_N$placeholderFontColor": { 2507 | "__type__": "cc.Color", 2508 | "r": 127, 2509 | "g": 127, 2510 | "b": 127, 2511 | "a": 255 2512 | }, 2513 | "_N$maxLength": 8, 2514 | "_N$stayOnTop": false 2515 | }, 2516 | { 2517 | "__type__": "cc.Node", 2518 | "_name": "PwdEditBox", 2519 | "_objFlags": 0, 2520 | "_parent": { 2521 | "__id__": 50 2522 | }, 2523 | "_children": [ 2524 | { 2525 | "__id__": 64 2526 | } 2527 | ], 2528 | "_tag": -1, 2529 | "_active": true, 2530 | "_components": [ 2531 | { 2532 | "__id__": 62 2533 | } 2534 | ], 2535 | "_prefab": null, 2536 | "_id": "209EaHbQxOmL8GAz4ngHZw", 2537 | "_opacity": 255, 2538 | "_color": { 2539 | "__type__": "cc.Color", 2540 | "r": 255, 2541 | "g": 255, 2542 | "b": 255, 2543 | "a": 255 2544 | }, 2545 | "_cascadeOpacityEnabled": true, 2546 | "_anchorPoint": { 2547 | "__type__": "cc.Vec2", 2548 | "x": 0.5, 2549 | "y": 0.5 2550 | }, 2551 | "_contentSize": { 2552 | "__type__": "cc.Size", 2553 | "width": 300, 2554 | "height": 50 2555 | }, 2556 | "_rotationX": 0, 2557 | "_rotationY": 0, 2558 | "_scaleX": 1, 2559 | "_scaleY": 1, 2560 | "_position": { 2561 | "__type__": "cc.Vec2", 2562 | "x": 50, 2563 | "y": 0 2564 | }, 2565 | "_skewX": 0, 2566 | "_skewY": 0, 2567 | "_localZOrder": 0, 2568 | "_globalZOrder": 0, 2569 | "_opacityModifyRGB": false, 2570 | "groupIndex": 0 2571 | }, 2572 | { 2573 | "__type__": "cc.Node", 2574 | "_name": "New Label", 2575 | "_objFlags": 0, 2576 | "_parent": { 2577 | "__id__": 63 2578 | }, 2579 | "_children": [], 2580 | "_tag": -1, 2581 | "_active": true, 2582 | "_components": [ 2583 | { 2584 | "__id__": 65 2585 | } 2586 | ], 2587 | "_prefab": null, 2588 | "_id": "fcEjbieNRG4ZNLbaCTr0yv", 2589 | "_opacity": 255, 2590 | "_color": { 2591 | "__type__": "cc.Color", 2592 | "r": 255, 2593 | "g": 255, 2594 | "b": 255, 2595 | "a": 255 2596 | }, 2597 | "_cascadeOpacityEnabled": true, 2598 | "_anchorPoint": { 2599 | "__type__": "cc.Vec2", 2600 | "x": 0.5, 2601 | "y": 0.5 2602 | }, 2603 | "_contentSize": { 2604 | "__type__": "cc.Size", 2605 | "width": 80, 2606 | "height": 40 2607 | }, 2608 | "_rotationX": 0, 2609 | "_rotationY": 0, 2610 | "_scaleX": 1, 2611 | "_scaleY": 1, 2612 | "_position": { 2613 | "__type__": "cc.Vec2", 2614 | "x": -227, 2615 | "y": 0 2616 | }, 2617 | "_skewX": 0, 2618 | "_skewY": 0, 2619 | "_localZOrder": 0, 2620 | "_globalZOrder": 0, 2621 | "_opacityModifyRGB": false, 2622 | "groupIndex": 0 2623 | }, 2624 | { 2625 | "__type__": "cc.Label", 2626 | "_name": "", 2627 | "_objFlags": 0, 2628 | "node": { 2629 | "__id__": 64 2630 | }, 2631 | "_enabled": true, 2632 | "_useOriginalSize": false, 2633 | "_actualFontSize": 40, 2634 | "_fontSize": 40, 2635 | "_lineHeight": 40, 2636 | "_enableWrapText": true, 2637 | "_N$file": null, 2638 | "_isSystemFontUsed": true, 2639 | "_spacingX": 0, 2640 | "_N$string": "密码", 2641 | "_N$horizontalAlign": 1, 2642 | "_N$verticalAlign": 1, 2643 | "_N$fontFamily": "Arial", 2644 | "_N$overflow": 0 2645 | }, 2646 | { 2647 | "__type__": "cc.Node", 2648 | "_name": "comfire", 2649 | "_objFlags": 0, 2650 | "_parent": { 2651 | "__id__": 50 2652 | }, 2653 | "_children": [ 2654 | { 2655 | "__id__": 67 2656 | } 2657 | ], 2658 | "_tag": -1, 2659 | "_active": true, 2660 | "_components": [ 2661 | { 2662 | "__id__": 69 2663 | }, 2664 | { 2665 | "__id__": 70 2666 | } 2667 | ], 2668 | "_prefab": null, 2669 | "_id": "bflhivgcFO7ZlI6wtPo/nH", 2670 | "_opacity": 255, 2671 | "_color": { 2672 | "__type__": "cc.Color", 2673 | "r": 255, 2674 | "g": 255, 2675 | "b": 255, 2676 | "a": 255 2677 | }, 2678 | "_cascadeOpacityEnabled": true, 2679 | "_anchorPoint": { 2680 | "__type__": "cc.Vec2", 2681 | "x": 0.5, 2682 | "y": 0.5 2683 | }, 2684 | "_contentSize": { 2685 | "__type__": "cc.Size", 2686 | "width": 200, 2687 | "height": 70 2688 | }, 2689 | "_rotationX": 0, 2690 | "_rotationY": 0, 2691 | "_scaleX": 1, 2692 | "_scaleY": 1, 2693 | "_position": { 2694 | "__type__": "cc.Vec2", 2695 | "x": 30, 2696 | "y": -200 2697 | }, 2698 | "_skewX": 0, 2699 | "_skewY": 0, 2700 | "_localZOrder": 0, 2701 | "_globalZOrder": 0, 2702 | "_opacityModifyRGB": false, 2703 | "groupIndex": 0 2704 | }, 2705 | { 2706 | "__type__": "cc.Node", 2707 | "_name": "Label", 2708 | "_objFlags": 0, 2709 | "_parent": { 2710 | "__id__": 66 2711 | }, 2712 | "_children": [], 2713 | "_tag": -1, 2714 | "_active": true, 2715 | "_components": [ 2716 | { 2717 | "__id__": 68 2718 | } 2719 | ], 2720 | "_prefab": null, 2721 | "_id": "c2rSCqbehIzYneLH4/kK80", 2722 | "_opacity": 255, 2723 | "_color": { 2724 | "__type__": "cc.Color", 2725 | "r": 0, 2726 | "g": 0, 2727 | "b": 0, 2728 | "a": 255 2729 | }, 2730 | "_cascadeOpacityEnabled": true, 2731 | "_anchorPoint": { 2732 | "__type__": "cc.Vec2", 2733 | "x": 0.5, 2734 | "y": 0.5 2735 | }, 2736 | "_contentSize": { 2737 | "__type__": "cc.Size", 2738 | "width": 100, 2739 | "height": 40 2740 | }, 2741 | "_rotationX": 0, 2742 | "_rotationY": 0, 2743 | "_scaleX": 1, 2744 | "_scaleY": 1, 2745 | "_position": { 2746 | "__type__": "cc.Vec2", 2747 | "x": 0, 2748 | "y": 0 2749 | }, 2750 | "_skewX": 0, 2751 | "_skewY": 0, 2752 | "_localZOrder": 0, 2753 | "_globalZOrder": 0, 2754 | "_opacityModifyRGB": false, 2755 | "groupIndex": 0 2756 | }, 2757 | { 2758 | "__type__": "cc.Label", 2759 | "_name": "", 2760 | "_objFlags": 0, 2761 | "node": { 2762 | "__id__": 67 2763 | }, 2764 | "_enabled": true, 2765 | "_useOriginalSize": false, 2766 | "_actualFontSize": 20, 2767 | "_fontSize": 20, 2768 | "_lineHeight": 40, 2769 | "_enableWrapText": false, 2770 | "_N$file": null, 2771 | "_isSystemFontUsed": true, 2772 | "_spacingX": 0, 2773 | "_N$string": "登陆", 2774 | "_N$horizontalAlign": 1, 2775 | "_N$verticalAlign": 1, 2776 | "_N$fontFamily": "Arial", 2777 | "_N$overflow": 1 2778 | }, 2779 | { 2780 | "__type__": "cc.Sprite", 2781 | "_name": "", 2782 | "_objFlags": 0, 2783 | "node": { 2784 | "__id__": 66 2785 | }, 2786 | "_enabled": true, 2787 | "_spriteFrame": { 2788 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 2789 | }, 2790 | "_type": 1, 2791 | "_sizeMode": 0, 2792 | "_fillType": 0, 2793 | "_fillCenter": { 2794 | "__type__": "cc.Vec2", 2795 | "x": 0, 2796 | "y": 0 2797 | }, 2798 | "_fillStart": 0, 2799 | "_fillRange": 0, 2800 | "_isTrimmedMode": true, 2801 | "_srcBlendFactor": 770, 2802 | "_dstBlendFactor": 771, 2803 | "_atlas": null 2804 | }, 2805 | { 2806 | "__type__": "cc.Button", 2807 | "_name": "", 2808 | "_objFlags": 0, 2809 | "node": { 2810 | "__id__": 66 2811 | }, 2812 | "_enabled": true, 2813 | "transition": 2, 2814 | "pressedColor": { 2815 | "__type__": "cc.Color", 2816 | "r": 255, 2817 | "g": 255, 2818 | "b": 255, 2819 | "a": 255 2820 | }, 2821 | "hoverColor": { 2822 | "__type__": "cc.Color", 2823 | "r": 255, 2824 | "g": 255, 2825 | "b": 255, 2826 | "a": 255 2827 | }, 2828 | "duration": 0.1, 2829 | "zoomScale": 1.2, 2830 | "clickEvents": [ 2831 | { 2832 | "__id__": 71 2833 | } 2834 | ], 2835 | "_N$interactable": true, 2836 | "_N$enableAutoGrayEffect": false, 2837 | "_N$normalColor": { 2838 | "__type__": "cc.Color", 2839 | "r": 255, 2840 | "g": 255, 2841 | "b": 255, 2842 | "a": 255 2843 | }, 2844 | "_N$disabledColor": { 2845 | "__type__": "cc.Color", 2846 | "r": 255, 2847 | "g": 255, 2848 | "b": 255, 2849 | "a": 255 2850 | }, 2851 | "_N$normalSprite": { 2852 | "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" 2853 | }, 2854 | "_N$pressedSprite": { 2855 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 2856 | }, 2857 | "pressedSprite": { 2858 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 2859 | }, 2860 | "_N$hoverSprite": { 2861 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 2862 | }, 2863 | "hoverSprite": { 2864 | "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" 2865 | }, 2866 | "_N$disabledSprite": { 2867 | "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" 2868 | }, 2869 | "_N$target": { 2870 | "__id__": 66 2871 | } 2872 | }, 2873 | { 2874 | "__type__": "cc.ClickEvent", 2875 | "target": { 2876 | "__id__": 56 2877 | }, 2878 | "component": "Login", 2879 | "handler": "onBtnComfirm", 2880 | "customEventData": "" 2881 | }, 2882 | { 2883 | "__type__": "cc.Canvas", 2884 | "_name": "", 2885 | "_objFlags": 0, 2886 | "node": { 2887 | "__id__": 2 2888 | }, 2889 | "_enabled": true, 2890 | "_designResolution": { 2891 | "__type__": "cc.Size", 2892 | "width": 750, 2893 | "height": 1334 2894 | }, 2895 | "_fitWidth": false, 2896 | "_fitHeight": true 2897 | }, 2898 | { 2899 | "__type__": "e1b90/rohdEk4SdmmEZANaD", 2900 | "_name": "", 2901 | "_objFlags": 0, 2902 | "node": { 2903 | "__id__": 2 2904 | }, 2905 | "_enabled": true, 2906 | "label": { 2907 | "__id__": 9 2908 | }, 2909 | "regNode": { 2910 | "__id__": 28 2911 | }, 2912 | "loginNode": { 2913 | "__id__": 50 2914 | }, 2915 | "PersistRootNode": { 2916 | "__id__": 74 2917 | }, 2918 | "text": "hello" 2919 | }, 2920 | { 2921 | "__type__": "cc.Node", 2922 | "_name": "PersistRootNode", 2923 | "_objFlags": 0, 2924 | "_parent": { 2925 | "__id__": 1 2926 | }, 2927 | "_children": [ 2928 | { 2929 | "__id__": 75 2930 | } 2931 | ], 2932 | "_tag": -1, 2933 | "_active": true, 2934 | "_components": [], 2935 | "_prefab": null, 2936 | "_id": "9a2QWN06hFTqtGlYaUj9Y1", 2937 | "_opacity": 255, 2938 | "_color": { 2939 | "__type__": "cc.Color", 2940 | "r": 255, 2941 | "g": 255, 2942 | "b": 255, 2943 | "a": 255 2944 | }, 2945 | "_cascadeOpacityEnabled": true, 2946 | "_anchorPoint": { 2947 | "__type__": "cc.Vec2", 2948 | "x": 0.5, 2949 | "y": 0.5 2950 | }, 2951 | "_contentSize": { 2952 | "__type__": "cc.Size", 2953 | "width": 0, 2954 | "height": 0 2955 | }, 2956 | "_rotationX": 0, 2957 | "_rotationY": 0, 2958 | "_scaleX": 1, 2959 | "_scaleY": 1, 2960 | "_position": { 2961 | "__type__": "cc.Vec2", 2962 | "x": 375, 2963 | "y": 667 2964 | }, 2965 | "_skewX": 0, 2966 | "_skewY": 0, 2967 | "_localZOrder": 0, 2968 | "_globalZOrder": 0, 2969 | "_opacityModifyRGB": false, 2970 | "groupIndex": 0 2971 | }, 2972 | { 2973 | "__type__": "cc.Node", 2974 | "_name": "ctrl", 2975 | "_objFlags": 0, 2976 | "_parent": { 2977 | "__id__": 74 2978 | }, 2979 | "_children": [], 2980 | "_tag": -1, 2981 | "_active": true, 2982 | "_components": [ 2983 | { 2984 | "__id__": 76 2985 | } 2986 | ], 2987 | "_prefab": null, 2988 | "_id": "d03fH/O81EvL8gK9cyB/F1", 2989 | "_opacity": 255, 2990 | "_color": { 2991 | "__type__": "cc.Color", 2992 | "r": 255, 2993 | "g": 255, 2994 | "b": 255, 2995 | "a": 255 2996 | }, 2997 | "_cascadeOpacityEnabled": true, 2998 | "_anchorPoint": { 2999 | "__type__": "cc.Vec2", 3000 | "x": 0.5, 3001 | "y": 0.5 3002 | }, 3003 | "_contentSize": { 3004 | "__type__": "cc.Size", 3005 | "width": 0, 3006 | "height": 0 3007 | }, 3008 | "_rotationX": 0, 3009 | "_rotationY": 0, 3010 | "_scaleX": 1, 3011 | "_scaleY": 1, 3012 | "_position": { 3013 | "__type__": "cc.Vec2", 3014 | "x": 0, 3015 | "y": 0 3016 | }, 3017 | "_skewX": 0, 3018 | "_skewY": 0, 3019 | "_localZOrder": 0, 3020 | "_globalZOrder": 0, 3021 | "_opacityModifyRGB": false, 3022 | "groupIndex": 0 3023 | }, 3024 | { 3025 | "__type__": "91aa0V3+RxD9oDw6INWvwBS", 3026 | "_name": "", 3027 | "_objFlags": 0, 3028 | "node": { 3029 | "__id__": 75 3030 | }, 3031 | "_enabled": true, 3032 | "tipDialog": { 3033 | "__uuid__": "f50eda98-db22-4494-92f2-5261505abfaa" 3034 | } 3035 | } 3036 | ] -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /assets/script.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "be1553c0-9700-471b-be86-2d764517364f", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/script/Lobby.ts: -------------------------------------------------------------------------------- 1 | import netControl from "./NetControl" 2 | import * as onfire from "./libs/onfire/onfire" 3 | import NetMessageCtrl from './NetMessageCtrl'; 4 | const {ccclass, property} = cc._decorator 5 | 6 | @ccclass 7 | export default class Lobby extends cc.Component { 8 | 9 | @property(cc.Label) 10 | label: cc.Label = null; 11 | 12 | @property(cc.Node) 13 | regNode: cc.Node = null; 14 | 15 | @property(cc.Node) 16 | loginNode: cc.Node = null; 17 | 18 | @property(cc.Node) 19 | PersistRootNode: cc.Node = null; 20 | 21 | @property 22 | text: string = 'hello'; 23 | 24 | private msssageFire 25 | private netControl:netControl = null 26 | private netMessageCtrl:NetMessageCtrl = null 27 | 28 | onLoad(){ 29 | this.netControl = new netControl(); 30 | this.netMessageCtrl = new NetMessageCtrl(this.netControl); 31 | 32 | cc.game.addPersistRootNode(this.PersistRootNode); 33 | } 34 | 35 | start () { 36 | // init logic 37 | this.label.string = this.text; 38 | 39 | this.netControl.connect(); 40 | this.msssageFire=onfire.on("onmessage",this.onMessage.bind(this)); 41 | } 42 | 43 | onMessage(obj: MessageEvent){ 44 | if(obj.data instanceof ArrayBuffer){ 45 | //leaf 前两位为协议序号,需要解一下啊协议序号 46 | let retdata = this.netControl.parseProtoBufId(obj); 47 | let id = retdata.id; 48 | let data = retdata.data; 49 | this.netMessageCtrl.dealMessage(id,data); 50 | } 51 | } 52 | 53 | onDestroy(){ 54 | onfire.un(this.msssageFire); 55 | 56 | } 57 | 58 | onBtnSendHello(){ 59 | this.netMessageCtrl.sendHello("ddk"); 60 | } 61 | 62 | onBtnRegister(){ 63 | this.regNode.active = true; 64 | } 65 | 66 | onBtnLogin(){ 67 | this.loginNode.active = true; 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /assets/script/Lobby.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "e1b90feb-a217-4493-849d-9a611900d683", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/script/Login.ts: -------------------------------------------------------------------------------- 1 | import NetMessageCtrl from './NetMessageCtrl'; 2 | import Utils from './Utils'; 3 | const {ccclass, property} = cc._decorator 4 | 5 | @ccclass 6 | export default class Login extends cc.Component { 7 | 8 | @property(cc.EditBox) 9 | Name: cc.EditBox = null; 10 | 11 | @property(cc.EditBox) 12 | Pwd: cc.EditBox = null; 13 | 14 | onLoad(){ 15 | } 16 | 17 | onBtnPanel(){ 18 | this.node.parent.active = false 19 | } 20 | 21 | onBtnComfirm(){ 22 | var name = this.Name.string; 23 | var pwd = this.Pwd.string; 24 | if(name && pwd){ 25 | let check = Utils.check_usr(name) 26 | let checkPwd = Utils.check_psw(name) 27 | if(check.ret){ 28 | if(checkPwd.ret){ 29 | NetMessageCtrl.getInstance().sendLogin(name,pwd); 30 | } 31 | else{ 32 | Utils.showTips("提示",checkPwd.msg) 33 | } 34 | } 35 | else{ 36 | Utils.showTips("提示",check.msg) 37 | } 38 | } 39 | else{ 40 | Utils.showTips("提示","请输入完整登陆数据") 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /assets/script/Login.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "4660a94a-87ec-4d03-bf2d-84e00619265e", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/script/MessageDialog.ts: -------------------------------------------------------------------------------- 1 | interface message{ 2 | title:string, 3 | text:string 4 | } 5 | const {ccclass, property} = cc._decorator 6 | 7 | @ccclass 8 | export default class MessageDialog extends cc.Component{ 9 | @property(cc.Label) 10 | title: cc.Label = null; 11 | 12 | @property(cc.Label) 13 | text: cc.Label = null; 14 | 15 | private static instance:MessageDialog = null; 16 | 17 | public static getInstance():MessageDialog{ 18 | return MessageDialog.instance; 19 | } 20 | 21 | onLoad(){ 22 | MessageDialog.instance = this 23 | } 24 | 25 | onBtnPanel(){ 26 | this.Hide() 27 | } 28 | 29 | showTips(msg :message){ 30 | this.title.string = msg.title 31 | this.text.string = msg.text 32 | this.node.parent.active = true 33 | } 34 | 35 | Hide(){ 36 | this.node.parent.active = false 37 | } 38 | } -------------------------------------------------------------------------------- /assets/script/MessageDialog.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "48ba1f30-ddb6-4280-b8bd-2cd27269fddd", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/script/NetConfig.ts: -------------------------------------------------------------------------------- 1 | export default class netConfig { 2 | static host = "ws://localhost" 3 | static port = 3653 4 | 5 | static ProtocolId={ 6 | Test:0, 7 | UserLogin:1, 8 | UserRegister:2, 9 | UserResult:3, 10 | UserST:4 11 | } 12 | } -------------------------------------------------------------------------------- /assets/script/NetConfig.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "cb5c110f-6ffb-48da-9522-edd7a8a4f196", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/script/NetControl.ts: -------------------------------------------------------------------------------- 1 | import * as onfire from "./libs/onfire/onfire.js"; //处理事件的类库 2 | import netConfig from './NetConfig.js' 3 | 4 | export default class netControl { 5 | 6 | private _sock:WebSocket = null //当前的webSocket的对象 7 | 8 | connect(){ 9 | if(this._sock ==null || this._sock.readyState!==1){ 10 | //当前接口没有打开 11 | //重新连接 12 | this._sock = new WebSocket(netConfig.host+":"+netConfig.port); 13 | this._sock.onopen = this._onOpen.bind(this); 14 | this._sock.onclose = this._onClose.bind(this); 15 | this._sock.onmessage = this._onMessage.bind(this); 16 | this._sock.binaryType = "arraybuffer"; 17 | } 18 | return this; 19 | } 20 | 21 | _onOpen(){ 22 | onfire.fire("onopen"); 23 | } 24 | _onClose(err){ 25 | onfire.fire("onclose",err); 26 | let self = this; 27 | let reVar = setInterval(function(){ 28 | // 先对重连过后的Websocket进行判断,如果重连成功则断开循环 29 | if(self._sock.readyState == 1){ 30 | clearInterval(reVar); 31 | } 32 | self._sock = new WebSocket(netConfig.host+":"+netConfig.port); 33 | }, 5000) //每5秒尝试一次重连 34 | } 35 | _onMessage(obj){ 36 | onfire.fire("onmessage",obj) 37 | } 38 | 39 | send(msg){ 40 | if(this._sock.readyState == 1){ 41 | this._sock.send(msg); 42 | } 43 | } 44 | 45 | protoBufAddtag(tag: number,buffer: Uint8Array){ 46 | let addtag_buffer=new Uint8Array(buffer.length+2); 47 | let tagBinary = this.IntToUint8Array(tag,16); 48 | let tagUnit8 = new Uint8Array(tagBinary); 49 | 50 | addtag_buffer.set(tagUnit8,0); 51 | addtag_buffer.set(buffer.subarray(0,buffer.length),2); 52 | 53 | return addtag_buffer; 54 | } 55 | 56 | parseProtoBufId(obj: MessageEvent) :{id:number,data:Uint8Array} { 57 | let arrayBuffer:ArrayBuffer = obj.data; 58 | let dataUnit8Array = new Uint8Array(arrayBuffer); 59 | let id = this.Uint8ArrayToInt(dataUnit8Array.slice(0,2)); 60 | console.log("receive message id = "+id); 61 | dataUnit8Array = dataUnit8Array.slice(2); 62 | 63 | return {id: id,data:dataUnit8Array}; 64 | } 65 | 66 | IntToUint8Array (num: number, Bits: number) :number[]{ 67 | let resArry = []; 68 | let xresArry = []; 69 | let binaryStr:string = num.toString(2); 70 | for(let i=0;i{}; 14 | var b :RegExp=/^[a-zA-Z\d]\w{2,10}[a-zA-Z\d]$/; 15 | if (b.test(str)) { 16 | c.ret = true; 17 | c.msg = "用戶名合法"; 18 | } 19 | else { 20 | c.ret = false; 21 | c.msg = "用戶名不合法"; 22 | } 23 | 24 | return c; 25 | } 26 | 27 | 28 | //判断密码输入是否合法,一个是长度,一个是没有特殊字符 29 | static check_psw(str:string):CheckRet{ 30 | let c={}; 31 | if(str.length > 5 && str.length<21){ 32 | c.ret = true; 33 | c.msg = ""; 34 | }else { 35 | c.ret = false; 36 | c.msg = "密码长度不合规范"; 37 | } 38 | var b:RegExp =/^[a-zA-Z\d]\w{2,10}[a-zA-Z\d]$/; 39 | if (b.test(str)) { 40 | c.ret = true; 41 | c.msg = ""; 42 | }else { 43 | c.ret = false; 44 | c.msg = "密码字符不合规范"; 45 | } 46 | 47 | return c; 48 | } 49 | 50 | 51 | //判断手机号码格式是否合法 52 | static check_tel(str:string):CheckRet{ 53 | let c={}; 54 | var regx=/^(?:13\d|15\d|18[123456789])-?\d{5}(\d{3}|\*{3})$/; 55 | if(regx.test(str)){ 56 | c.ret = true; 57 | c.msg = ""; 58 | }else{ 59 | c.ret = false; 60 | c.msg = "手机号不合规范"; 61 | } 62 | 63 | return c; 64 | } 65 | 66 | 67 | //判断邮箱地址格式是否合法 68 | static check_mail(str:string):CheckRet{ 69 | let c={}; 70 | var regm = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;//验证Mail的正则表达式,^[a-zA-Z0-9_-]:开头必须为字母,下划线,数字, 71 | if (str.match(regm)){ 72 | c.ret = true; 73 | c.msg = ""; 74 | 75 | } else{ 76 | c.ret = false; 77 | c.msg = "邮箱地址不合规范"; 78 | } 79 | 80 | return c; 81 | } 82 | 83 | static showTips(title:string,text:string){ 84 | messageDialog.getInstance().showTips({title:title,text:text}) 85 | } 86 | } -------------------------------------------------------------------------------- /assets/script/Utils.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "212d70b1-b14b-406a-a270-94a9501c3b6f", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/script/libs.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "8c2d334a-22d3-4824-bc71-7dc399ba2a3f", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/script/libs/onfire.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "e35c3db0-8e39-42d2-8e6f-27a67a4c102f", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/script/libs/onfire/onfire.js: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2016 hustcc http://www.atool.org/ 3 | License: MIT 4 | https://github.com/hustcc/onfire.js 5 | **/ 6 | /* jshint expr: true */ 7 | !function (root, factory) { 8 | if (typeof module === 'object' && module.exports) 9 | module.exports = factory(); 10 | else 11 | root.onfire = factory(); 12 | }(typeof window !== 'undefined' ? window : this, function () { 13 | var __onfireEvents = {}, 14 | __cnt = 0, // evnet counter 15 | string_str = 'string', 16 | function_str = 'function', 17 | hasOwnKey = Function.call.bind(Object.hasOwnProperty), 18 | slice = Function.call.bind(Array.prototype.slice); 19 | 20 | function _bind(eventName, callback, is_one, context) { 21 | if (typeof eventName !== string_str || typeof callback !== function_str) { 22 | throw new Error('args: '+string_str+', '+function_str+''); 23 | } 24 | if (! hasOwnKey(__onfireEvents, eventName)) { 25 | __onfireEvents[eventName] = {}; 26 | } 27 | __onfireEvents[eventName][++__cnt] = [callback, is_one, context]; 28 | 29 | return [eventName, __cnt]; 30 | } 31 | function _each(obj, callback) { 32 | for (var key in obj) { 33 | if (hasOwnKey(obj, key)) callback(key, obj[key]); 34 | } 35 | } 36 | /** 37 | * onfire.on( event, func, context ) -> Object 38 | * - event (String): The event name to subscribe / bind to 39 | * - func (Function): The function to call when a new event is published / triggered 40 | * Bind / subscribe the event name, and the callback function when event is triggered, will return an event Object 41 | **/ 42 | function on(eventName, callback, context) { 43 | return _bind(eventName, callback, 0, context); 44 | } 45 | /** 46 | * onfire.one( event, func, context ) -> Object 47 | * - event (String): The event name to subscribe / bind to 48 | * - func (Function): The function to call when a new event is published / triggered 49 | * Bind / subscribe the event name, and the callback function when event is triggered only once(can be triggered for one time), will return an event Object 50 | **/ 51 | function one(eventName, callback, context) { 52 | return _bind(eventName, callback, 1, context); 53 | } 54 | function _fire_func(eventName, args) { 55 | if (hasOwnKey(__onfireEvents, eventName)) { 56 | _each(__onfireEvents[eventName], function(key, item) { 57 | item[0].apply(item[2], args); // do the function 58 | if (item[1]) delete __onfireEvents[eventName][key]; // when is one, delete it after triggle 59 | }); 60 | } 61 | } 62 | /** 63 | * onfire.fire( event[, data1 [,data2] ... ] ) 64 | * - event (String): The event name to publish 65 | * - data...: The data to pass to subscribers / callbacks 66 | * Async Publishes / fires the the event, passing the data to it's subscribers / callbacks 67 | **/ 68 | function fire(eventName) { 69 | // fire events 70 | var args = slice(arguments, 1); 71 | setTimeout(function () { 72 | _fire_func(eventName, args); 73 | }); 74 | } 75 | /** 76 | * onfire.fireSync( event[, data1 [,data2] ... ] ) 77 | * - event (String): The event name to publish 78 | * - data...: The data to pass to subscribers / callbacks 79 | * Sync Publishes / fires the the event, passing the data to it's subscribers / callbacks 80 | **/ 81 | function fireSync(eventName) { 82 | _fire_func(eventName, slice(arguments, 1)); 83 | } 84 | /** 85 | * onfire.un( event ) -> Boolean 86 | * - event (String / Object): The message to publish 87 | * When passed a event Object, removes a specific subscription. 88 | * When passed event name String, removes all subscriptions for that event name(hierarchy) 89 | * 90 | * Unsubscribe / unbind an event or event object. 91 | * 92 | * Examples 93 | * 94 | * // Example 1 - unsubscribing with a event object 95 | * var event_object = onfire.on('my_event', myFunc); 96 | * onfire.un(event_object); 97 | * 98 | * // Example 2 - unsubscribing with a event name string 99 | * onfire.un('my_event'); 100 | **/ 101 | function un(event) { 102 | var eventName, key, r = false, type = typeof event; 103 | if (type === string_str) { 104 | // cancel the event name if exist 105 | if (hasOwnKey(__onfireEvents, event)) { 106 | delete __onfireEvents[event]; 107 | return true; 108 | } 109 | return false; 110 | } 111 | else if (type === 'object') { 112 | eventName = event[0]; 113 | key = event[1]; 114 | if (hasOwnKey(__onfireEvents, eventName) && hasOwnKey(__onfireEvents[eventName], key)) { 115 | delete __onfireEvents[eventName][key]; 116 | return true; 117 | } 118 | // can not find this event, return false 119 | return false; 120 | } 121 | else if (type === function_str) { 122 | _each(__onfireEvents, function(key_1, item_1) { 123 | _each(item_1, function(key_2, item_2) { 124 | if (item_2[0] === event) { 125 | delete __onfireEvents[key_1][key_2]; 126 | r = true; 127 | } 128 | }); 129 | }); 130 | return r; 131 | } 132 | return true; 133 | } 134 | /** 135 | * onfire.clear() 136 | * Clears all subscriptions 137 | **/ 138 | function clear() { 139 | __onfireEvents = {}; 140 | } 141 | return { 142 | on: on, 143 | one: one, 144 | un: un, 145 | fire: fire, 146 | fireSync: fireSync, 147 | clear: clear 148 | }; 149 | }); -------------------------------------------------------------------------------- /assets/script/libs/onfire/onfire.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "90053554-c60e-4aca-bc91-7b51c87f3cfe", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/script/protocol.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.1", 3 | "uuid": "51fc92a2-f96a-470b-be7d-6cceecd63604", 4 | "subMetas": {} 5 | } -------------------------------------------------------------------------------- /assets/script/protocol/protocol.d.ts: -------------------------------------------------------------------------------- 1 | import * as $protobuf from "protobufjs"; 2 | 3 | /** Namespace msg. */ 4 | export namespace msg { 5 | 6 | /** Result enum. */ 7 | enum Result { 8 | REGISTER_SUCCESS = 0, 9 | REGISTER_FAIL = 1, 10 | LOGIN_SUCCESS = 2, 11 | LOGIN_FAIL = 3 12 | } 13 | 14 | /** Properties of a Test. */ 15 | interface ITest { 16 | 17 | /** Test Test */ 18 | Test?: (string|null); 19 | } 20 | 21 | /** Represents a Test. */ 22 | class Test implements ITest { 23 | 24 | /** 25 | * Constructs a new Test. 26 | * @param [properties] Properties to set 27 | */ 28 | constructor(properties?: msg.ITest); 29 | 30 | /** Test Test. */ 31 | public Test: string; 32 | 33 | /** 34 | * Creates a new Test instance using the specified properties. 35 | * @param [properties] Properties to set 36 | * @returns Test instance 37 | */ 38 | public static create(properties?: msg.ITest): msg.Test; 39 | 40 | /** 41 | * Encodes the specified Test message. Does not implicitly {@link msg.Test.verify|verify} messages. 42 | * @param message Test message or plain object to encode 43 | * @param [writer] Writer to encode to 44 | * @returns Writer 45 | */ 46 | public static encode(message: msg.ITest, writer?: $protobuf.Writer): $protobuf.Writer; 47 | 48 | /** 49 | * Encodes the specified Test message, length delimited. Does not implicitly {@link msg.Test.verify|verify} messages. 50 | * @param message Test message or plain object to encode 51 | * @param [writer] Writer to encode to 52 | * @returns Writer 53 | */ 54 | public static encodeDelimited(message: msg.ITest, writer?: $protobuf.Writer): $protobuf.Writer; 55 | 56 | /** 57 | * Decodes a Test message from the specified reader or buffer. 58 | * @param reader Reader or buffer to decode from 59 | * @param [length] Message length if known beforehand 60 | * @returns Test 61 | * @throws {Error} If the payload is not a reader or valid buffer 62 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 63 | */ 64 | public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): msg.Test; 65 | 66 | /** 67 | * Decodes a Test message from the specified reader or buffer, length delimited. 68 | * @param reader Reader or buffer to decode from 69 | * @returns Test 70 | * @throws {Error} If the payload is not a reader or valid buffer 71 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 72 | */ 73 | public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): msg.Test; 74 | 75 | /** 76 | * Verifies a Test message. 77 | * @param message Plain object to verify 78 | * @returns `null` if valid, otherwise the reason why it is not 79 | */ 80 | public static verify(message: { [k: string]: any }): (string|null); 81 | 82 | /** 83 | * Creates a Test message from a plain object. Also converts values to their respective internal types. 84 | * @param object Plain object 85 | * @returns Test 86 | */ 87 | public static fromObject(object: { [k: string]: any }): msg.Test; 88 | 89 | /** 90 | * Creates a plain object from a Test message. Also converts values to other types if specified. 91 | * @param message Test 92 | * @param [options] Conversion options 93 | * @returns Plain object 94 | */ 95 | public static toObject(message: msg.Test, options?: $protobuf.IConversionOptions): { [k: string]: any }; 96 | 97 | /** 98 | * Converts this Test to JSON. 99 | * @returns JSON object 100 | */ 101 | public toJSON(): { [k: string]: any }; 102 | } 103 | 104 | /** Properties of a UserLogin. */ 105 | interface IUserLogin { 106 | 107 | /** UserLogin LoginName */ 108 | LoginName?: (string|null); 109 | 110 | /** UserLogin LoginPW */ 111 | LoginPW?: (string|null); 112 | } 113 | 114 | /** Represents a UserLogin. */ 115 | class UserLogin implements IUserLogin { 116 | 117 | /** 118 | * Constructs a new UserLogin. 119 | * @param [properties] Properties to set 120 | */ 121 | constructor(properties?: msg.IUserLogin); 122 | 123 | /** UserLogin LoginName. */ 124 | public LoginName: string; 125 | 126 | /** UserLogin LoginPW. */ 127 | public LoginPW: string; 128 | 129 | /** 130 | * Creates a new UserLogin instance using the specified properties. 131 | * @param [properties] Properties to set 132 | * @returns UserLogin instance 133 | */ 134 | public static create(properties?: msg.IUserLogin): msg.UserLogin; 135 | 136 | /** 137 | * Encodes the specified UserLogin message. Does not implicitly {@link msg.UserLogin.verify|verify} messages. 138 | * @param message UserLogin message or plain object to encode 139 | * @param [writer] Writer to encode to 140 | * @returns Writer 141 | */ 142 | public static encode(message: msg.IUserLogin, writer?: $protobuf.Writer): $protobuf.Writer; 143 | 144 | /** 145 | * Encodes the specified UserLogin message, length delimited. Does not implicitly {@link msg.UserLogin.verify|verify} messages. 146 | * @param message UserLogin message or plain object to encode 147 | * @param [writer] Writer to encode to 148 | * @returns Writer 149 | */ 150 | public static encodeDelimited(message: msg.IUserLogin, writer?: $protobuf.Writer): $protobuf.Writer; 151 | 152 | /** 153 | * Decodes a UserLogin message from the specified reader or buffer. 154 | * @param reader Reader or buffer to decode from 155 | * @param [length] Message length if known beforehand 156 | * @returns UserLogin 157 | * @throws {Error} If the payload is not a reader or valid buffer 158 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 159 | */ 160 | public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): msg.UserLogin; 161 | 162 | /** 163 | * Decodes a UserLogin message from the specified reader or buffer, length delimited. 164 | * @param reader Reader or buffer to decode from 165 | * @returns UserLogin 166 | * @throws {Error} If the payload is not a reader or valid buffer 167 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 168 | */ 169 | public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): msg.UserLogin; 170 | 171 | /** 172 | * Verifies a UserLogin message. 173 | * @param message Plain object to verify 174 | * @returns `null` if valid, otherwise the reason why it is not 175 | */ 176 | public static verify(message: { [k: string]: any }): (string|null); 177 | 178 | /** 179 | * Creates a UserLogin message from a plain object. Also converts values to their respective internal types. 180 | * @param object Plain object 181 | * @returns UserLogin 182 | */ 183 | public static fromObject(object: { [k: string]: any }): msg.UserLogin; 184 | 185 | /** 186 | * Creates a plain object from a UserLogin message. Also converts values to other types if specified. 187 | * @param message UserLogin 188 | * @param [options] Conversion options 189 | * @returns Plain object 190 | */ 191 | public static toObject(message: msg.UserLogin, options?: $protobuf.IConversionOptions): { [k: string]: any }; 192 | 193 | /** 194 | * Converts this UserLogin to JSON. 195 | * @returns JSON object 196 | */ 197 | public toJSON(): { [k: string]: any }; 198 | } 199 | 200 | /** Properties of a UserRegister. */ 201 | interface IUserRegister { 202 | 203 | /** UserRegister LoginName */ 204 | LoginName?: (string|null); 205 | 206 | /** UserRegister LoginPW */ 207 | LoginPW?: (string|null); 208 | } 209 | 210 | /** Represents a UserRegister. */ 211 | class UserRegister implements IUserRegister { 212 | 213 | /** 214 | * Constructs a new UserRegister. 215 | * @param [properties] Properties to set 216 | */ 217 | constructor(properties?: msg.IUserRegister); 218 | 219 | /** UserRegister LoginName. */ 220 | public LoginName: string; 221 | 222 | /** UserRegister LoginPW. */ 223 | public LoginPW: string; 224 | 225 | /** 226 | * Creates a new UserRegister instance using the specified properties. 227 | * @param [properties] Properties to set 228 | * @returns UserRegister instance 229 | */ 230 | public static create(properties?: msg.IUserRegister): msg.UserRegister; 231 | 232 | /** 233 | * Encodes the specified UserRegister message. Does not implicitly {@link msg.UserRegister.verify|verify} messages. 234 | * @param message UserRegister message or plain object to encode 235 | * @param [writer] Writer to encode to 236 | * @returns Writer 237 | */ 238 | public static encode(message: msg.IUserRegister, writer?: $protobuf.Writer): $protobuf.Writer; 239 | 240 | /** 241 | * Encodes the specified UserRegister message, length delimited. Does not implicitly {@link msg.UserRegister.verify|verify} messages. 242 | * @param message UserRegister message or plain object to encode 243 | * @param [writer] Writer to encode to 244 | * @returns Writer 245 | */ 246 | public static encodeDelimited(message: msg.IUserRegister, writer?: $protobuf.Writer): $protobuf.Writer; 247 | 248 | /** 249 | * Decodes a UserRegister message from the specified reader or buffer. 250 | * @param reader Reader or buffer to decode from 251 | * @param [length] Message length if known beforehand 252 | * @returns UserRegister 253 | * @throws {Error} If the payload is not a reader or valid buffer 254 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 255 | */ 256 | public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): msg.UserRegister; 257 | 258 | /** 259 | * Decodes a UserRegister message from the specified reader or buffer, length delimited. 260 | * @param reader Reader or buffer to decode from 261 | * @returns UserRegister 262 | * @throws {Error} If the payload is not a reader or valid buffer 263 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 264 | */ 265 | public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): msg.UserRegister; 266 | 267 | /** 268 | * Verifies a UserRegister message. 269 | * @param message Plain object to verify 270 | * @returns `null` if valid, otherwise the reason why it is not 271 | */ 272 | public static verify(message: { [k: string]: any }): (string|null); 273 | 274 | /** 275 | * Creates a UserRegister message from a plain object. Also converts values to their respective internal types. 276 | * @param object Plain object 277 | * @returns UserRegister 278 | */ 279 | public static fromObject(object: { [k: string]: any }): msg.UserRegister; 280 | 281 | /** 282 | * Creates a plain object from a UserRegister message. Also converts values to other types if specified. 283 | * @param message UserRegister 284 | * @param [options] Conversion options 285 | * @returns Plain object 286 | */ 287 | public static toObject(message: msg.UserRegister, options?: $protobuf.IConversionOptions): { [k: string]: any }; 288 | 289 | /** 290 | * Converts this UserRegister to JSON. 291 | * @returns JSON object 292 | */ 293 | public toJSON(): { [k: string]: any }; 294 | } 295 | 296 | /** Properties of a UserResult. */ 297 | interface IUserResult { 298 | 299 | /** UserResult RetResult */ 300 | RetResult?: (msg.Result|null); 301 | 302 | /** UserResult ErrorInfo */ 303 | ErrorInfo?: (string|null); 304 | } 305 | 306 | /** Represents a UserResult. */ 307 | class UserResult implements IUserResult { 308 | 309 | /** 310 | * Constructs a new UserResult. 311 | * @param [properties] Properties to set 312 | */ 313 | constructor(properties?: msg.IUserResult); 314 | 315 | /** UserResult RetResult. */ 316 | public RetResult: msg.Result; 317 | 318 | /** UserResult ErrorInfo. */ 319 | public ErrorInfo: string; 320 | 321 | /** 322 | * Creates a new UserResult instance using the specified properties. 323 | * @param [properties] Properties to set 324 | * @returns UserResult instance 325 | */ 326 | public static create(properties?: msg.IUserResult): msg.UserResult; 327 | 328 | /** 329 | * Encodes the specified UserResult message. Does not implicitly {@link msg.UserResult.verify|verify} messages. 330 | * @param message UserResult message or plain object to encode 331 | * @param [writer] Writer to encode to 332 | * @returns Writer 333 | */ 334 | public static encode(message: msg.IUserResult, writer?: $protobuf.Writer): $protobuf.Writer; 335 | 336 | /** 337 | * Encodes the specified UserResult message, length delimited. Does not implicitly {@link msg.UserResult.verify|verify} messages. 338 | * @param message UserResult message or plain object to encode 339 | * @param [writer] Writer to encode to 340 | * @returns Writer 341 | */ 342 | public static encodeDelimited(message: msg.IUserResult, writer?: $protobuf.Writer): $protobuf.Writer; 343 | 344 | /** 345 | * Decodes a UserResult message from the specified reader or buffer. 346 | * @param reader Reader or buffer to decode from 347 | * @param [length] Message length if known beforehand 348 | * @returns UserResult 349 | * @throws {Error} If the payload is not a reader or valid buffer 350 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 351 | */ 352 | public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): msg.UserResult; 353 | 354 | /** 355 | * Decodes a UserResult message from the specified reader or buffer, length delimited. 356 | * @param reader Reader or buffer to decode from 357 | * @returns UserResult 358 | * @throws {Error} If the payload is not a reader or valid buffer 359 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 360 | */ 361 | public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): msg.UserResult; 362 | 363 | /** 364 | * Verifies a UserResult message. 365 | * @param message Plain object to verify 366 | * @returns `null` if valid, otherwise the reason why it is not 367 | */ 368 | public static verify(message: { [k: string]: any }): (string|null); 369 | 370 | /** 371 | * Creates a UserResult message from a plain object. Also converts values to their respective internal types. 372 | * @param object Plain object 373 | * @returns UserResult 374 | */ 375 | public static fromObject(object: { [k: string]: any }): msg.UserResult; 376 | 377 | /** 378 | * Creates a plain object from a UserResult message. Also converts values to other types if specified. 379 | * @param message UserResult 380 | * @param [options] Conversion options 381 | * @returns Plain object 382 | */ 383 | public static toObject(message: msg.UserResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; 384 | 385 | /** 386 | * Converts this UserResult to JSON. 387 | * @returns JSON object 388 | */ 389 | public toJSON(): { [k: string]: any }; 390 | } 391 | 392 | /** Properties of a UserST. */ 393 | interface IUserST { 394 | 395 | /** UserST UID */ 396 | UID?: (string|null); 397 | 398 | /** UserST ServerID */ 399 | ServerID?: (string|null); 400 | 401 | /** UserST RoleUID */ 402 | RoleUID?: (string|null); 403 | 404 | /** UserST RoleName */ 405 | RoleName?: (string|null); 406 | 407 | /** UserST RoleLev */ 408 | RoleLev?: (string|null); 409 | 410 | /** UserST Coin */ 411 | Coin?: (string|null); 412 | } 413 | 414 | /** Represents a UserST. */ 415 | class UserST implements IUserST { 416 | 417 | /** 418 | * Constructs a new UserST. 419 | * @param [properties] Properties to set 420 | */ 421 | constructor(properties?: msg.IUserST); 422 | 423 | /** UserST UID. */ 424 | public UID: string; 425 | 426 | /** UserST ServerID. */ 427 | public ServerID: string; 428 | 429 | /** UserST RoleUID. */ 430 | public RoleUID: string; 431 | 432 | /** UserST RoleName. */ 433 | public RoleName: string; 434 | 435 | /** UserST RoleLev. */ 436 | public RoleLev: string; 437 | 438 | /** UserST Coin. */ 439 | public Coin: string; 440 | 441 | /** 442 | * Creates a new UserST instance using the specified properties. 443 | * @param [properties] Properties to set 444 | * @returns UserST instance 445 | */ 446 | public static create(properties?: msg.IUserST): msg.UserST; 447 | 448 | /** 449 | * Encodes the specified UserST message. Does not implicitly {@link msg.UserST.verify|verify} messages. 450 | * @param message UserST message or plain object to encode 451 | * @param [writer] Writer to encode to 452 | * @returns Writer 453 | */ 454 | public static encode(message: msg.IUserST, writer?: $protobuf.Writer): $protobuf.Writer; 455 | 456 | /** 457 | * Encodes the specified UserST message, length delimited. Does not implicitly {@link msg.UserST.verify|verify} messages. 458 | * @param message UserST message or plain object to encode 459 | * @param [writer] Writer to encode to 460 | * @returns Writer 461 | */ 462 | public static encodeDelimited(message: msg.IUserST, writer?: $protobuf.Writer): $protobuf.Writer; 463 | 464 | /** 465 | * Decodes a UserST message from the specified reader or buffer. 466 | * @param reader Reader or buffer to decode from 467 | * @param [length] Message length if known beforehand 468 | * @returns UserST 469 | * @throws {Error} If the payload is not a reader or valid buffer 470 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 471 | */ 472 | public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): msg.UserST; 473 | 474 | /** 475 | * Decodes a UserST message from the specified reader or buffer, length delimited. 476 | * @param reader Reader or buffer to decode from 477 | * @returns UserST 478 | * @throws {Error} If the payload is not a reader or valid buffer 479 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 480 | */ 481 | public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): msg.UserST; 482 | 483 | /** 484 | * Verifies a UserST message. 485 | * @param message Plain object to verify 486 | * @returns `null` if valid, otherwise the reason why it is not 487 | */ 488 | public static verify(message: { [k: string]: any }): (string|null); 489 | 490 | /** 491 | * Creates a UserST message from a plain object. Also converts values to their respective internal types. 492 | * @param object Plain object 493 | * @returns UserST 494 | */ 495 | public static fromObject(object: { [k: string]: any }): msg.UserST; 496 | 497 | /** 498 | * Creates a plain object from a UserST message. Also converts values to other types if specified. 499 | * @param message UserST 500 | * @param [options] Conversion options 501 | * @returns Plain object 502 | */ 503 | public static toObject(message: msg.UserST, options?: $protobuf.IConversionOptions): { [k: string]: any }; 504 | 505 | /** 506 | * Converts this UserST to JSON. 507 | * @returns JSON object 508 | */ 509 | public toJSON(): { [k: string]: any }; 510 | } 511 | } 512 | -------------------------------------------------------------------------------- /assets/script/protocol/protocol.d.ts.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "0a76b93f-f5fe-4205-a60f-5eeb3a2f0b7c", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /assets/script/protocol/protocol.js: -------------------------------------------------------------------------------- 1 | /*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/ 2 | "use strict"; 3 | 4 | var $protobuf = require("protobufjs/minimal"); 5 | 6 | // Common aliases 7 | var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; 8 | 9 | // Exported root namespace 10 | var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); 11 | 12 | $root.msg = (function() { 13 | 14 | /** 15 | * Namespace msg. 16 | * @exports msg 17 | * @namespace 18 | */ 19 | var msg = {}; 20 | 21 | /** 22 | * Result enum. 23 | * @name msg.Result 24 | * @enum {string} 25 | * @property {number} REGISTER_SUCCESS=0 REGISTER_SUCCESS value 26 | * @property {number} REGISTER_FAIL=1 REGISTER_FAIL value 27 | * @property {number} LOGIN_SUCCESS=2 LOGIN_SUCCESS value 28 | * @property {number} LOGIN_FAIL=3 LOGIN_FAIL value 29 | */ 30 | msg.Result = (function() { 31 | var valuesById = {}, values = Object.create(valuesById); 32 | values[valuesById[0] = "REGISTER_SUCCESS"] = 0; 33 | values[valuesById[1] = "REGISTER_FAIL"] = 1; 34 | values[valuesById[2] = "LOGIN_SUCCESS"] = 2; 35 | values[valuesById[3] = "LOGIN_FAIL"] = 3; 36 | return values; 37 | })(); 38 | 39 | msg.Test = (function() { 40 | 41 | /** 42 | * Properties of a Test. 43 | * @memberof msg 44 | * @interface ITest 45 | * @property {string|null} [Test] Test Test 46 | */ 47 | 48 | /** 49 | * Constructs a new Test. 50 | * @memberof msg 51 | * @classdesc Represents a Test. 52 | * @implements ITest 53 | * @constructor 54 | * @param {msg.ITest=} [properties] Properties to set 55 | */ 56 | function Test(properties) { 57 | if (properties) 58 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) 59 | if (properties[keys[i]] != null) 60 | this[keys[i]] = properties[keys[i]]; 61 | } 62 | 63 | /** 64 | * Test Test. 65 | * @member {string} Test 66 | * @memberof msg.Test 67 | * @instance 68 | */ 69 | Test.prototype.Test = ""; 70 | 71 | /** 72 | * Creates a new Test instance using the specified properties. 73 | * @function create 74 | * @memberof msg.Test 75 | * @static 76 | * @param {msg.ITest=} [properties] Properties to set 77 | * @returns {msg.Test} Test instance 78 | */ 79 | Test.create = function create(properties) { 80 | return new Test(properties); 81 | }; 82 | 83 | /** 84 | * Encodes the specified Test message. Does not implicitly {@link msg.Test.verify|verify} messages. 85 | * @function encode 86 | * @memberof msg.Test 87 | * @static 88 | * @param {msg.ITest} message Test message or plain object to encode 89 | * @param {$protobuf.Writer} [writer] Writer to encode to 90 | * @returns {$protobuf.Writer} Writer 91 | */ 92 | Test.encode = function encode(message, writer) { 93 | if (!writer) 94 | writer = $Writer.create(); 95 | if (message.Test != null && message.hasOwnProperty("Test")) 96 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.Test); 97 | return writer; 98 | }; 99 | 100 | /** 101 | * Encodes the specified Test message, length delimited. Does not implicitly {@link msg.Test.verify|verify} messages. 102 | * @function encodeDelimited 103 | * @memberof msg.Test 104 | * @static 105 | * @param {msg.ITest} message Test message or plain object to encode 106 | * @param {$protobuf.Writer} [writer] Writer to encode to 107 | * @returns {$protobuf.Writer} Writer 108 | */ 109 | Test.encodeDelimited = function encodeDelimited(message, writer) { 110 | return this.encode(message, writer).ldelim(); 111 | }; 112 | 113 | /** 114 | * Decodes a Test message from the specified reader or buffer. 115 | * @function decode 116 | * @memberof msg.Test 117 | * @static 118 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 119 | * @param {number} [length] Message length if known beforehand 120 | * @returns {msg.Test} Test 121 | * @throws {Error} If the payload is not a reader or valid buffer 122 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 123 | */ 124 | Test.decode = function decode(reader, length) { 125 | if (!(reader instanceof $Reader)) 126 | reader = $Reader.create(reader); 127 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.Test(); 128 | while (reader.pos < end) { 129 | var tag = reader.uint32(); 130 | switch (tag >>> 3) { 131 | case 2: 132 | message.Test = reader.string(); 133 | break; 134 | default: 135 | reader.skipType(tag & 7); 136 | break; 137 | } 138 | } 139 | return message; 140 | }; 141 | 142 | /** 143 | * Decodes a Test message from the specified reader or buffer, length delimited. 144 | * @function decodeDelimited 145 | * @memberof msg.Test 146 | * @static 147 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 148 | * @returns {msg.Test} Test 149 | * @throws {Error} If the payload is not a reader or valid buffer 150 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 151 | */ 152 | Test.decodeDelimited = function decodeDelimited(reader) { 153 | if (!(reader instanceof $Reader)) 154 | reader = new $Reader(reader); 155 | return this.decode(reader, reader.uint32()); 156 | }; 157 | 158 | /** 159 | * Verifies a Test message. 160 | * @function verify 161 | * @memberof msg.Test 162 | * @static 163 | * @param {Object.} message Plain object to verify 164 | * @returns {string|null} `null` if valid, otherwise the reason why it is not 165 | */ 166 | Test.verify = function verify(message) { 167 | if (typeof message !== "object" || message === null) 168 | return "object expected"; 169 | if (message.Test != null && message.hasOwnProperty("Test")) 170 | if (!$util.isString(message.Test)) 171 | return "Test: string expected"; 172 | return null; 173 | }; 174 | 175 | /** 176 | * Creates a Test message from a plain object. Also converts values to their respective internal types. 177 | * @function fromObject 178 | * @memberof msg.Test 179 | * @static 180 | * @param {Object.} object Plain object 181 | * @returns {msg.Test} Test 182 | */ 183 | Test.fromObject = function fromObject(object) { 184 | if (object instanceof $root.msg.Test) 185 | return object; 186 | var message = new $root.msg.Test(); 187 | if (object.Test != null) 188 | message.Test = String(object.Test); 189 | return message; 190 | }; 191 | 192 | /** 193 | * Creates a plain object from a Test message. Also converts values to other types if specified. 194 | * @function toObject 195 | * @memberof msg.Test 196 | * @static 197 | * @param {msg.Test} message Test 198 | * @param {$protobuf.IConversionOptions} [options] Conversion options 199 | * @returns {Object.} Plain object 200 | */ 201 | Test.toObject = function toObject(message, options) { 202 | if (!options) 203 | options = {}; 204 | var object = {}; 205 | if (options.defaults) 206 | object.Test = ""; 207 | if (message.Test != null && message.hasOwnProperty("Test")) 208 | object.Test = message.Test; 209 | return object; 210 | }; 211 | 212 | /** 213 | * Converts this Test to JSON. 214 | * @function toJSON 215 | * @memberof msg.Test 216 | * @instance 217 | * @returns {Object.} JSON object 218 | */ 219 | Test.prototype.toJSON = function toJSON() { 220 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions); 221 | }; 222 | 223 | return Test; 224 | })(); 225 | 226 | msg.UserLogin = (function() { 227 | 228 | /** 229 | * Properties of a UserLogin. 230 | * @memberof msg 231 | * @interface IUserLogin 232 | * @property {string|null} [LoginName] UserLogin LoginName 233 | * @property {string|null} [LoginPW] UserLogin LoginPW 234 | */ 235 | 236 | /** 237 | * Constructs a new UserLogin. 238 | * @memberof msg 239 | * @classdesc Represents a UserLogin. 240 | * @implements IUserLogin 241 | * @constructor 242 | * @param {msg.IUserLogin=} [properties] Properties to set 243 | */ 244 | function UserLogin(properties) { 245 | if (properties) 246 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) 247 | if (properties[keys[i]] != null) 248 | this[keys[i]] = properties[keys[i]]; 249 | } 250 | 251 | /** 252 | * UserLogin LoginName. 253 | * @member {string} LoginName 254 | * @memberof msg.UserLogin 255 | * @instance 256 | */ 257 | UserLogin.prototype.LoginName = ""; 258 | 259 | /** 260 | * UserLogin LoginPW. 261 | * @member {string} LoginPW 262 | * @memberof msg.UserLogin 263 | * @instance 264 | */ 265 | UserLogin.prototype.LoginPW = ""; 266 | 267 | /** 268 | * Creates a new UserLogin instance using the specified properties. 269 | * @function create 270 | * @memberof msg.UserLogin 271 | * @static 272 | * @param {msg.IUserLogin=} [properties] Properties to set 273 | * @returns {msg.UserLogin} UserLogin instance 274 | */ 275 | UserLogin.create = function create(properties) { 276 | return new UserLogin(properties); 277 | }; 278 | 279 | /** 280 | * Encodes the specified UserLogin message. Does not implicitly {@link msg.UserLogin.verify|verify} messages. 281 | * @function encode 282 | * @memberof msg.UserLogin 283 | * @static 284 | * @param {msg.IUserLogin} message UserLogin message or plain object to encode 285 | * @param {$protobuf.Writer} [writer] Writer to encode to 286 | * @returns {$protobuf.Writer} Writer 287 | */ 288 | UserLogin.encode = function encode(message, writer) { 289 | if (!writer) 290 | writer = $Writer.create(); 291 | if (message.LoginName != null && message.hasOwnProperty("LoginName")) 292 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.LoginName); 293 | if (message.LoginPW != null && message.hasOwnProperty("LoginPW")) 294 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.LoginPW); 295 | return writer; 296 | }; 297 | 298 | /** 299 | * Encodes the specified UserLogin message, length delimited. Does not implicitly {@link msg.UserLogin.verify|verify} messages. 300 | * @function encodeDelimited 301 | * @memberof msg.UserLogin 302 | * @static 303 | * @param {msg.IUserLogin} message UserLogin message or plain object to encode 304 | * @param {$protobuf.Writer} [writer] Writer to encode to 305 | * @returns {$protobuf.Writer} Writer 306 | */ 307 | UserLogin.encodeDelimited = function encodeDelimited(message, writer) { 308 | return this.encode(message, writer).ldelim(); 309 | }; 310 | 311 | /** 312 | * Decodes a UserLogin message from the specified reader or buffer. 313 | * @function decode 314 | * @memberof msg.UserLogin 315 | * @static 316 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 317 | * @param {number} [length] Message length if known beforehand 318 | * @returns {msg.UserLogin} UserLogin 319 | * @throws {Error} If the payload is not a reader or valid buffer 320 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 321 | */ 322 | UserLogin.decode = function decode(reader, length) { 323 | if (!(reader instanceof $Reader)) 324 | reader = $Reader.create(reader); 325 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserLogin(); 326 | while (reader.pos < end) { 327 | var tag = reader.uint32(); 328 | switch (tag >>> 3) { 329 | case 1: 330 | message.LoginName = reader.string(); 331 | break; 332 | case 2: 333 | message.LoginPW = reader.string(); 334 | break; 335 | default: 336 | reader.skipType(tag & 7); 337 | break; 338 | } 339 | } 340 | return message; 341 | }; 342 | 343 | /** 344 | * Decodes a UserLogin message from the specified reader or buffer, length delimited. 345 | * @function decodeDelimited 346 | * @memberof msg.UserLogin 347 | * @static 348 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 349 | * @returns {msg.UserLogin} UserLogin 350 | * @throws {Error} If the payload is not a reader or valid buffer 351 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 352 | */ 353 | UserLogin.decodeDelimited = function decodeDelimited(reader) { 354 | if (!(reader instanceof $Reader)) 355 | reader = new $Reader(reader); 356 | return this.decode(reader, reader.uint32()); 357 | }; 358 | 359 | /** 360 | * Verifies a UserLogin message. 361 | * @function verify 362 | * @memberof msg.UserLogin 363 | * @static 364 | * @param {Object.} message Plain object to verify 365 | * @returns {string|null} `null` if valid, otherwise the reason why it is not 366 | */ 367 | UserLogin.verify = function verify(message) { 368 | if (typeof message !== "object" || message === null) 369 | return "object expected"; 370 | if (message.LoginName != null && message.hasOwnProperty("LoginName")) 371 | if (!$util.isString(message.LoginName)) 372 | return "LoginName: string expected"; 373 | if (message.LoginPW != null && message.hasOwnProperty("LoginPW")) 374 | if (!$util.isString(message.LoginPW)) 375 | return "LoginPW: string expected"; 376 | return null; 377 | }; 378 | 379 | /** 380 | * Creates a UserLogin message from a plain object. Also converts values to their respective internal types. 381 | * @function fromObject 382 | * @memberof msg.UserLogin 383 | * @static 384 | * @param {Object.} object Plain object 385 | * @returns {msg.UserLogin} UserLogin 386 | */ 387 | UserLogin.fromObject = function fromObject(object) { 388 | if (object instanceof $root.msg.UserLogin) 389 | return object; 390 | var message = new $root.msg.UserLogin(); 391 | if (object.LoginName != null) 392 | message.LoginName = String(object.LoginName); 393 | if (object.LoginPW != null) 394 | message.LoginPW = String(object.LoginPW); 395 | return message; 396 | }; 397 | 398 | /** 399 | * Creates a plain object from a UserLogin message. Also converts values to other types if specified. 400 | * @function toObject 401 | * @memberof msg.UserLogin 402 | * @static 403 | * @param {msg.UserLogin} message UserLogin 404 | * @param {$protobuf.IConversionOptions} [options] Conversion options 405 | * @returns {Object.} Plain object 406 | */ 407 | UserLogin.toObject = function toObject(message, options) { 408 | if (!options) 409 | options = {}; 410 | var object = {}; 411 | if (options.defaults) { 412 | object.LoginName = ""; 413 | object.LoginPW = ""; 414 | } 415 | if (message.LoginName != null && message.hasOwnProperty("LoginName")) 416 | object.LoginName = message.LoginName; 417 | if (message.LoginPW != null && message.hasOwnProperty("LoginPW")) 418 | object.LoginPW = message.LoginPW; 419 | return object; 420 | }; 421 | 422 | /** 423 | * Converts this UserLogin to JSON. 424 | * @function toJSON 425 | * @memberof msg.UserLogin 426 | * @instance 427 | * @returns {Object.} JSON object 428 | */ 429 | UserLogin.prototype.toJSON = function toJSON() { 430 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions); 431 | }; 432 | 433 | return UserLogin; 434 | })(); 435 | 436 | msg.UserRegister = (function() { 437 | 438 | /** 439 | * Properties of a UserRegister. 440 | * @memberof msg 441 | * @interface IUserRegister 442 | * @property {string|null} [LoginName] UserRegister LoginName 443 | * @property {string|null} [LoginPW] UserRegister LoginPW 444 | */ 445 | 446 | /** 447 | * Constructs a new UserRegister. 448 | * @memberof msg 449 | * @classdesc Represents a UserRegister. 450 | * @implements IUserRegister 451 | * @constructor 452 | * @param {msg.IUserRegister=} [properties] Properties to set 453 | */ 454 | function UserRegister(properties) { 455 | if (properties) 456 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) 457 | if (properties[keys[i]] != null) 458 | this[keys[i]] = properties[keys[i]]; 459 | } 460 | 461 | /** 462 | * UserRegister LoginName. 463 | * @member {string} LoginName 464 | * @memberof msg.UserRegister 465 | * @instance 466 | */ 467 | UserRegister.prototype.LoginName = ""; 468 | 469 | /** 470 | * UserRegister LoginPW. 471 | * @member {string} LoginPW 472 | * @memberof msg.UserRegister 473 | * @instance 474 | */ 475 | UserRegister.prototype.LoginPW = ""; 476 | 477 | /** 478 | * Creates a new UserRegister instance using the specified properties. 479 | * @function create 480 | * @memberof msg.UserRegister 481 | * @static 482 | * @param {msg.IUserRegister=} [properties] Properties to set 483 | * @returns {msg.UserRegister} UserRegister instance 484 | */ 485 | UserRegister.create = function create(properties) { 486 | return new UserRegister(properties); 487 | }; 488 | 489 | /** 490 | * Encodes the specified UserRegister message. Does not implicitly {@link msg.UserRegister.verify|verify} messages. 491 | * @function encode 492 | * @memberof msg.UserRegister 493 | * @static 494 | * @param {msg.IUserRegister} message UserRegister message or plain object to encode 495 | * @param {$protobuf.Writer} [writer] Writer to encode to 496 | * @returns {$protobuf.Writer} Writer 497 | */ 498 | UserRegister.encode = function encode(message, writer) { 499 | if (!writer) 500 | writer = $Writer.create(); 501 | if (message.LoginName != null && message.hasOwnProperty("LoginName")) 502 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.LoginName); 503 | if (message.LoginPW != null && message.hasOwnProperty("LoginPW")) 504 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.LoginPW); 505 | return writer; 506 | }; 507 | 508 | /** 509 | * Encodes the specified UserRegister message, length delimited. Does not implicitly {@link msg.UserRegister.verify|verify} messages. 510 | * @function encodeDelimited 511 | * @memberof msg.UserRegister 512 | * @static 513 | * @param {msg.IUserRegister} message UserRegister message or plain object to encode 514 | * @param {$protobuf.Writer} [writer] Writer to encode to 515 | * @returns {$protobuf.Writer} Writer 516 | */ 517 | UserRegister.encodeDelimited = function encodeDelimited(message, writer) { 518 | return this.encode(message, writer).ldelim(); 519 | }; 520 | 521 | /** 522 | * Decodes a UserRegister message from the specified reader or buffer. 523 | * @function decode 524 | * @memberof msg.UserRegister 525 | * @static 526 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 527 | * @param {number} [length] Message length if known beforehand 528 | * @returns {msg.UserRegister} UserRegister 529 | * @throws {Error} If the payload is not a reader or valid buffer 530 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 531 | */ 532 | UserRegister.decode = function decode(reader, length) { 533 | if (!(reader instanceof $Reader)) 534 | reader = $Reader.create(reader); 535 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserRegister(); 536 | while (reader.pos < end) { 537 | var tag = reader.uint32(); 538 | switch (tag >>> 3) { 539 | case 1: 540 | message.LoginName = reader.string(); 541 | break; 542 | case 2: 543 | message.LoginPW = reader.string(); 544 | break; 545 | default: 546 | reader.skipType(tag & 7); 547 | break; 548 | } 549 | } 550 | return message; 551 | }; 552 | 553 | /** 554 | * Decodes a UserRegister message from the specified reader or buffer, length delimited. 555 | * @function decodeDelimited 556 | * @memberof msg.UserRegister 557 | * @static 558 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 559 | * @returns {msg.UserRegister} UserRegister 560 | * @throws {Error} If the payload is not a reader or valid buffer 561 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 562 | */ 563 | UserRegister.decodeDelimited = function decodeDelimited(reader) { 564 | if (!(reader instanceof $Reader)) 565 | reader = new $Reader(reader); 566 | return this.decode(reader, reader.uint32()); 567 | }; 568 | 569 | /** 570 | * Verifies a UserRegister message. 571 | * @function verify 572 | * @memberof msg.UserRegister 573 | * @static 574 | * @param {Object.} message Plain object to verify 575 | * @returns {string|null} `null` if valid, otherwise the reason why it is not 576 | */ 577 | UserRegister.verify = function verify(message) { 578 | if (typeof message !== "object" || message === null) 579 | return "object expected"; 580 | if (message.LoginName != null && message.hasOwnProperty("LoginName")) 581 | if (!$util.isString(message.LoginName)) 582 | return "LoginName: string expected"; 583 | if (message.LoginPW != null && message.hasOwnProperty("LoginPW")) 584 | if (!$util.isString(message.LoginPW)) 585 | return "LoginPW: string expected"; 586 | return null; 587 | }; 588 | 589 | /** 590 | * Creates a UserRegister message from a plain object. Also converts values to their respective internal types. 591 | * @function fromObject 592 | * @memberof msg.UserRegister 593 | * @static 594 | * @param {Object.} object Plain object 595 | * @returns {msg.UserRegister} UserRegister 596 | */ 597 | UserRegister.fromObject = function fromObject(object) { 598 | if (object instanceof $root.msg.UserRegister) 599 | return object; 600 | var message = new $root.msg.UserRegister(); 601 | if (object.LoginName != null) 602 | message.LoginName = String(object.LoginName); 603 | if (object.LoginPW != null) 604 | message.LoginPW = String(object.LoginPW); 605 | return message; 606 | }; 607 | 608 | /** 609 | * Creates a plain object from a UserRegister message. Also converts values to other types if specified. 610 | * @function toObject 611 | * @memberof msg.UserRegister 612 | * @static 613 | * @param {msg.UserRegister} message UserRegister 614 | * @param {$protobuf.IConversionOptions} [options] Conversion options 615 | * @returns {Object.} Plain object 616 | */ 617 | UserRegister.toObject = function toObject(message, options) { 618 | if (!options) 619 | options = {}; 620 | var object = {}; 621 | if (options.defaults) { 622 | object.LoginName = ""; 623 | object.LoginPW = ""; 624 | } 625 | if (message.LoginName != null && message.hasOwnProperty("LoginName")) 626 | object.LoginName = message.LoginName; 627 | if (message.LoginPW != null && message.hasOwnProperty("LoginPW")) 628 | object.LoginPW = message.LoginPW; 629 | return object; 630 | }; 631 | 632 | /** 633 | * Converts this UserRegister to JSON. 634 | * @function toJSON 635 | * @memberof msg.UserRegister 636 | * @instance 637 | * @returns {Object.} JSON object 638 | */ 639 | UserRegister.prototype.toJSON = function toJSON() { 640 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions); 641 | }; 642 | 643 | return UserRegister; 644 | })(); 645 | 646 | msg.UserResult = (function() { 647 | 648 | /** 649 | * Properties of a UserResult. 650 | * @memberof msg 651 | * @interface IUserResult 652 | * @property {msg.Result|null} [RetResult] UserResult RetResult 653 | * @property {string|null} [ErrorInfo] UserResult ErrorInfo 654 | */ 655 | 656 | /** 657 | * Constructs a new UserResult. 658 | * @memberof msg 659 | * @classdesc Represents a UserResult. 660 | * @implements IUserResult 661 | * @constructor 662 | * @param {msg.IUserResult=} [properties] Properties to set 663 | */ 664 | function UserResult(properties) { 665 | if (properties) 666 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) 667 | if (properties[keys[i]] != null) 668 | this[keys[i]] = properties[keys[i]]; 669 | } 670 | 671 | /** 672 | * UserResult RetResult. 673 | * @member {msg.Result} RetResult 674 | * @memberof msg.UserResult 675 | * @instance 676 | */ 677 | UserResult.prototype.RetResult = 0; 678 | 679 | /** 680 | * UserResult ErrorInfo. 681 | * @member {string} ErrorInfo 682 | * @memberof msg.UserResult 683 | * @instance 684 | */ 685 | UserResult.prototype.ErrorInfo = ""; 686 | 687 | /** 688 | * Creates a new UserResult instance using the specified properties. 689 | * @function create 690 | * @memberof msg.UserResult 691 | * @static 692 | * @param {msg.IUserResult=} [properties] Properties to set 693 | * @returns {msg.UserResult} UserResult instance 694 | */ 695 | UserResult.create = function create(properties) { 696 | return new UserResult(properties); 697 | }; 698 | 699 | /** 700 | * Encodes the specified UserResult message. Does not implicitly {@link msg.UserResult.verify|verify} messages. 701 | * @function encode 702 | * @memberof msg.UserResult 703 | * @static 704 | * @param {msg.IUserResult} message UserResult message or plain object to encode 705 | * @param {$protobuf.Writer} [writer] Writer to encode to 706 | * @returns {$protobuf.Writer} Writer 707 | */ 708 | UserResult.encode = function encode(message, writer) { 709 | if (!writer) 710 | writer = $Writer.create(); 711 | if (message.RetResult != null && message.hasOwnProperty("RetResult")) 712 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.RetResult); 713 | if (message.ErrorInfo != null && message.hasOwnProperty("ErrorInfo")) 714 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.ErrorInfo); 715 | return writer; 716 | }; 717 | 718 | /** 719 | * Encodes the specified UserResult message, length delimited. Does not implicitly {@link msg.UserResult.verify|verify} messages. 720 | * @function encodeDelimited 721 | * @memberof msg.UserResult 722 | * @static 723 | * @param {msg.IUserResult} message UserResult message or plain object to encode 724 | * @param {$protobuf.Writer} [writer] Writer to encode to 725 | * @returns {$protobuf.Writer} Writer 726 | */ 727 | UserResult.encodeDelimited = function encodeDelimited(message, writer) { 728 | return this.encode(message, writer).ldelim(); 729 | }; 730 | 731 | /** 732 | * Decodes a UserResult message from the specified reader or buffer. 733 | * @function decode 734 | * @memberof msg.UserResult 735 | * @static 736 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 737 | * @param {number} [length] Message length if known beforehand 738 | * @returns {msg.UserResult} UserResult 739 | * @throws {Error} If the payload is not a reader or valid buffer 740 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 741 | */ 742 | UserResult.decode = function decode(reader, length) { 743 | if (!(reader instanceof $Reader)) 744 | reader = $Reader.create(reader); 745 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserResult(); 746 | while (reader.pos < end) { 747 | var tag = reader.uint32(); 748 | switch (tag >>> 3) { 749 | case 1: 750 | message.RetResult = reader.int32(); 751 | break; 752 | case 2: 753 | message.ErrorInfo = reader.string(); 754 | break; 755 | default: 756 | reader.skipType(tag & 7); 757 | break; 758 | } 759 | } 760 | return message; 761 | }; 762 | 763 | /** 764 | * Decodes a UserResult message from the specified reader or buffer, length delimited. 765 | * @function decodeDelimited 766 | * @memberof msg.UserResult 767 | * @static 768 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 769 | * @returns {msg.UserResult} UserResult 770 | * @throws {Error} If the payload is not a reader or valid buffer 771 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 772 | */ 773 | UserResult.decodeDelimited = function decodeDelimited(reader) { 774 | if (!(reader instanceof $Reader)) 775 | reader = new $Reader(reader); 776 | return this.decode(reader, reader.uint32()); 777 | }; 778 | 779 | /** 780 | * Verifies a UserResult message. 781 | * @function verify 782 | * @memberof msg.UserResult 783 | * @static 784 | * @param {Object.} message Plain object to verify 785 | * @returns {string|null} `null` if valid, otherwise the reason why it is not 786 | */ 787 | UserResult.verify = function verify(message) { 788 | if (typeof message !== "object" || message === null) 789 | return "object expected"; 790 | if (message.RetResult != null && message.hasOwnProperty("RetResult")) 791 | switch (message.RetResult) { 792 | default: 793 | return "RetResult: enum value expected"; 794 | case 0: 795 | case 1: 796 | case 2: 797 | case 3: 798 | break; 799 | } 800 | if (message.ErrorInfo != null && message.hasOwnProperty("ErrorInfo")) 801 | if (!$util.isString(message.ErrorInfo)) 802 | return "ErrorInfo: string expected"; 803 | return null; 804 | }; 805 | 806 | /** 807 | * Creates a UserResult message from a plain object. Also converts values to their respective internal types. 808 | * @function fromObject 809 | * @memberof msg.UserResult 810 | * @static 811 | * @param {Object.} object Plain object 812 | * @returns {msg.UserResult} UserResult 813 | */ 814 | UserResult.fromObject = function fromObject(object) { 815 | if (object instanceof $root.msg.UserResult) 816 | return object; 817 | var message = new $root.msg.UserResult(); 818 | switch (object.RetResult) { 819 | case "REGISTER_SUCCESS": 820 | case 0: 821 | message.RetResult = 0; 822 | break; 823 | case "REGISTER_FAIL": 824 | case 1: 825 | message.RetResult = 1; 826 | break; 827 | case "LOGIN_SUCCESS": 828 | case 2: 829 | message.RetResult = 2; 830 | break; 831 | case "LOGIN_FAIL": 832 | case 3: 833 | message.RetResult = 3; 834 | break; 835 | } 836 | if (object.ErrorInfo != null) 837 | message.ErrorInfo = String(object.ErrorInfo); 838 | return message; 839 | }; 840 | 841 | /** 842 | * Creates a plain object from a UserResult message. Also converts values to other types if specified. 843 | * @function toObject 844 | * @memberof msg.UserResult 845 | * @static 846 | * @param {msg.UserResult} message UserResult 847 | * @param {$protobuf.IConversionOptions} [options] Conversion options 848 | * @returns {Object.} Plain object 849 | */ 850 | UserResult.toObject = function toObject(message, options) { 851 | if (!options) 852 | options = {}; 853 | var object = {}; 854 | if (options.defaults) { 855 | object.RetResult = options.enums === String ? "REGISTER_SUCCESS" : 0; 856 | object.ErrorInfo = ""; 857 | } 858 | if (message.RetResult != null && message.hasOwnProperty("RetResult")) 859 | object.RetResult = options.enums === String ? $root.msg.Result[message.RetResult] : message.RetResult; 860 | if (message.ErrorInfo != null && message.hasOwnProperty("ErrorInfo")) 861 | object.ErrorInfo = message.ErrorInfo; 862 | return object; 863 | }; 864 | 865 | /** 866 | * Converts this UserResult to JSON. 867 | * @function toJSON 868 | * @memberof msg.UserResult 869 | * @instance 870 | * @returns {Object.} JSON object 871 | */ 872 | UserResult.prototype.toJSON = function toJSON() { 873 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions); 874 | }; 875 | 876 | return UserResult; 877 | })(); 878 | 879 | msg.UserST = (function() { 880 | 881 | /** 882 | * Properties of a UserST. 883 | * @memberof msg 884 | * @interface IUserST 885 | * @property {string|null} [UID] UserST UID 886 | * @property {string|null} [ServerID] UserST ServerID 887 | * @property {string|null} [RoleUID] UserST RoleUID 888 | * @property {string|null} [RoleName] UserST RoleName 889 | * @property {string|null} [RoleLev] UserST RoleLev 890 | * @property {string|null} [Coin] UserST Coin 891 | */ 892 | 893 | /** 894 | * Constructs a new UserST. 895 | * @memberof msg 896 | * @classdesc Represents a UserST. 897 | * @implements IUserST 898 | * @constructor 899 | * @param {msg.IUserST=} [properties] Properties to set 900 | */ 901 | function UserST(properties) { 902 | if (properties) 903 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) 904 | if (properties[keys[i]] != null) 905 | this[keys[i]] = properties[keys[i]]; 906 | } 907 | 908 | /** 909 | * UserST UID. 910 | * @member {string} UID 911 | * @memberof msg.UserST 912 | * @instance 913 | */ 914 | UserST.prototype.UID = ""; 915 | 916 | /** 917 | * UserST ServerID. 918 | * @member {string} ServerID 919 | * @memberof msg.UserST 920 | * @instance 921 | */ 922 | UserST.prototype.ServerID = ""; 923 | 924 | /** 925 | * UserST RoleUID. 926 | * @member {string} RoleUID 927 | * @memberof msg.UserST 928 | * @instance 929 | */ 930 | UserST.prototype.RoleUID = ""; 931 | 932 | /** 933 | * UserST RoleName. 934 | * @member {string} RoleName 935 | * @memberof msg.UserST 936 | * @instance 937 | */ 938 | UserST.prototype.RoleName = ""; 939 | 940 | /** 941 | * UserST RoleLev. 942 | * @member {string} RoleLev 943 | * @memberof msg.UserST 944 | * @instance 945 | */ 946 | UserST.prototype.RoleLev = ""; 947 | 948 | /** 949 | * UserST Coin. 950 | * @member {string} Coin 951 | * @memberof msg.UserST 952 | * @instance 953 | */ 954 | UserST.prototype.Coin = ""; 955 | 956 | /** 957 | * Creates a new UserST instance using the specified properties. 958 | * @function create 959 | * @memberof msg.UserST 960 | * @static 961 | * @param {msg.IUserST=} [properties] Properties to set 962 | * @returns {msg.UserST} UserST instance 963 | */ 964 | UserST.create = function create(properties) { 965 | return new UserST(properties); 966 | }; 967 | 968 | /** 969 | * Encodes the specified UserST message. Does not implicitly {@link msg.UserST.verify|verify} messages. 970 | * @function encode 971 | * @memberof msg.UserST 972 | * @static 973 | * @param {msg.IUserST} message UserST message or plain object to encode 974 | * @param {$protobuf.Writer} [writer] Writer to encode to 975 | * @returns {$protobuf.Writer} Writer 976 | */ 977 | UserST.encode = function encode(message, writer) { 978 | if (!writer) 979 | writer = $Writer.create(); 980 | if (message.UID != null && message.hasOwnProperty("UID")) 981 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.UID); 982 | if (message.ServerID != null && message.hasOwnProperty("ServerID")) 983 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.ServerID); 984 | if (message.RoleUID != null && message.hasOwnProperty("RoleUID")) 985 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.RoleUID); 986 | if (message.RoleName != null && message.hasOwnProperty("RoleName")) 987 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.RoleName); 988 | if (message.RoleLev != null && message.hasOwnProperty("RoleLev")) 989 | writer.uint32(/* id 5, wireType 2 =*/42).string(message.RoleLev); 990 | if (message.Coin != null && message.hasOwnProperty("Coin")) 991 | writer.uint32(/* id 6, wireType 2 =*/50).string(message.Coin); 992 | return writer; 993 | }; 994 | 995 | /** 996 | * Encodes the specified UserST message, length delimited. Does not implicitly {@link msg.UserST.verify|verify} messages. 997 | * @function encodeDelimited 998 | * @memberof msg.UserST 999 | * @static 1000 | * @param {msg.IUserST} message UserST message or plain object to encode 1001 | * @param {$protobuf.Writer} [writer] Writer to encode to 1002 | * @returns {$protobuf.Writer} Writer 1003 | */ 1004 | UserST.encodeDelimited = function encodeDelimited(message, writer) { 1005 | return this.encode(message, writer).ldelim(); 1006 | }; 1007 | 1008 | /** 1009 | * Decodes a UserST message from the specified reader or buffer. 1010 | * @function decode 1011 | * @memberof msg.UserST 1012 | * @static 1013 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 1014 | * @param {number} [length] Message length if known beforehand 1015 | * @returns {msg.UserST} UserST 1016 | * @throws {Error} If the payload is not a reader or valid buffer 1017 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 1018 | */ 1019 | UserST.decode = function decode(reader, length) { 1020 | if (!(reader instanceof $Reader)) 1021 | reader = $Reader.create(reader); 1022 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.msg.UserST(); 1023 | while (reader.pos < end) { 1024 | var tag = reader.uint32(); 1025 | switch (tag >>> 3) { 1026 | case 1: 1027 | message.UID = reader.string(); 1028 | break; 1029 | case 2: 1030 | message.ServerID = reader.string(); 1031 | break; 1032 | case 3: 1033 | message.RoleUID = reader.string(); 1034 | break; 1035 | case 4: 1036 | message.RoleName = reader.string(); 1037 | break; 1038 | case 5: 1039 | message.RoleLev = reader.string(); 1040 | break; 1041 | case 6: 1042 | message.Coin = reader.string(); 1043 | break; 1044 | default: 1045 | reader.skipType(tag & 7); 1046 | break; 1047 | } 1048 | } 1049 | return message; 1050 | }; 1051 | 1052 | /** 1053 | * Decodes a UserST message from the specified reader or buffer, length delimited. 1054 | * @function decodeDelimited 1055 | * @memberof msg.UserST 1056 | * @static 1057 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from 1058 | * @returns {msg.UserST} UserST 1059 | * @throws {Error} If the payload is not a reader or valid buffer 1060 | * @throws {$protobuf.util.ProtocolError} If required fields are missing 1061 | */ 1062 | UserST.decodeDelimited = function decodeDelimited(reader) { 1063 | if (!(reader instanceof $Reader)) 1064 | reader = new $Reader(reader); 1065 | return this.decode(reader, reader.uint32()); 1066 | }; 1067 | 1068 | /** 1069 | * Verifies a UserST message. 1070 | * @function verify 1071 | * @memberof msg.UserST 1072 | * @static 1073 | * @param {Object.} message Plain object to verify 1074 | * @returns {string|null} `null` if valid, otherwise the reason why it is not 1075 | */ 1076 | UserST.verify = function verify(message) { 1077 | if (typeof message !== "object" || message === null) 1078 | return "object expected"; 1079 | if (message.UID != null && message.hasOwnProperty("UID")) 1080 | if (!$util.isString(message.UID)) 1081 | return "UID: string expected"; 1082 | if (message.ServerID != null && message.hasOwnProperty("ServerID")) 1083 | if (!$util.isString(message.ServerID)) 1084 | return "ServerID: string expected"; 1085 | if (message.RoleUID != null && message.hasOwnProperty("RoleUID")) 1086 | if (!$util.isString(message.RoleUID)) 1087 | return "RoleUID: string expected"; 1088 | if (message.RoleName != null && message.hasOwnProperty("RoleName")) 1089 | if (!$util.isString(message.RoleName)) 1090 | return "RoleName: string expected"; 1091 | if (message.RoleLev != null && message.hasOwnProperty("RoleLev")) 1092 | if (!$util.isString(message.RoleLev)) 1093 | return "RoleLev: string expected"; 1094 | if (message.Coin != null && message.hasOwnProperty("Coin")) 1095 | if (!$util.isString(message.Coin)) 1096 | return "Coin: string expected"; 1097 | return null; 1098 | }; 1099 | 1100 | /** 1101 | * Creates a UserST message from a plain object. Also converts values to their respective internal types. 1102 | * @function fromObject 1103 | * @memberof msg.UserST 1104 | * @static 1105 | * @param {Object.} object Plain object 1106 | * @returns {msg.UserST} UserST 1107 | */ 1108 | UserST.fromObject = function fromObject(object) { 1109 | if (object instanceof $root.msg.UserST) 1110 | return object; 1111 | var message = new $root.msg.UserST(); 1112 | if (object.UID != null) 1113 | message.UID = String(object.UID); 1114 | if (object.ServerID != null) 1115 | message.ServerID = String(object.ServerID); 1116 | if (object.RoleUID != null) 1117 | message.RoleUID = String(object.RoleUID); 1118 | if (object.RoleName != null) 1119 | message.RoleName = String(object.RoleName); 1120 | if (object.RoleLev != null) 1121 | message.RoleLev = String(object.RoleLev); 1122 | if (object.Coin != null) 1123 | message.Coin = String(object.Coin); 1124 | return message; 1125 | }; 1126 | 1127 | /** 1128 | * Creates a plain object from a UserST message. Also converts values to other types if specified. 1129 | * @function toObject 1130 | * @memberof msg.UserST 1131 | * @static 1132 | * @param {msg.UserST} message UserST 1133 | * @param {$protobuf.IConversionOptions} [options] Conversion options 1134 | * @returns {Object.} Plain object 1135 | */ 1136 | UserST.toObject = function toObject(message, options) { 1137 | if (!options) 1138 | options = {}; 1139 | var object = {}; 1140 | if (options.defaults) { 1141 | object.UID = ""; 1142 | object.ServerID = ""; 1143 | object.RoleUID = ""; 1144 | object.RoleName = ""; 1145 | object.RoleLev = ""; 1146 | object.Coin = ""; 1147 | } 1148 | if (message.UID != null && message.hasOwnProperty("UID")) 1149 | object.UID = message.UID; 1150 | if (message.ServerID != null && message.hasOwnProperty("ServerID")) 1151 | object.ServerID = message.ServerID; 1152 | if (message.RoleUID != null && message.hasOwnProperty("RoleUID")) 1153 | object.RoleUID = message.RoleUID; 1154 | if (message.RoleName != null && message.hasOwnProperty("RoleName")) 1155 | object.RoleName = message.RoleName; 1156 | if (message.RoleLev != null && message.hasOwnProperty("RoleLev")) 1157 | object.RoleLev = message.RoleLev; 1158 | if (message.Coin != null && message.hasOwnProperty("Coin")) 1159 | object.Coin = message.Coin; 1160 | return object; 1161 | }; 1162 | 1163 | /** 1164 | * Converts this UserST to JSON. 1165 | * @function toJSON 1166 | * @memberof msg.UserST 1167 | * @instance 1168 | * @returns {Object.} JSON object 1169 | */ 1170 | UserST.prototype.toJSON = function toJSON() { 1171 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions); 1172 | }; 1173 | 1174 | return UserST; 1175 | })(); 1176 | 1177 | return msg; 1178 | })(); 1179 | 1180 | module.exports = $root; 1181 | -------------------------------------------------------------------------------- /assets/script/protocol/protocol.js.meta: -------------------------------------------------------------------------------- 1 | { 2 | "ver": "1.0.5", 3 | "uuid": "3c410fff-6557-49f6-9dac-50b51d603add", 4 | "isPlugin": false, 5 | "loadPluginInWeb": true, 6 | "loadPluginInNative": true, 7 | "loadPluginInEditor": false, 8 | "subMetas": {} 9 | } -------------------------------------------------------------------------------- /global.d.ts: -------------------------------------------------------------------------------- 1 | declare let wx: any; -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "@protobufjs/aspromise": { 6 | "version": "1.1.2", 7 | "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", 8 | "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" 9 | }, 10 | "@protobufjs/base64": { 11 | "version": "1.1.2", 12 | "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", 13 | "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" 14 | }, 15 | "@protobufjs/codegen": { 16 | "version": "2.0.4", 17 | "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", 18 | "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" 19 | }, 20 | "@protobufjs/eventemitter": { 21 | "version": "1.1.0", 22 | "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", 23 | "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" 24 | }, 25 | "@protobufjs/fetch": { 26 | "version": "1.1.0", 27 | "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", 28 | "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", 29 | "requires": { 30 | "@protobufjs/aspromise": "1.1.2", 31 | "@protobufjs/inquire": "1.1.0" 32 | } 33 | }, 34 | "@protobufjs/float": { 35 | "version": "1.0.2", 36 | "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", 37 | "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" 38 | }, 39 | "@protobufjs/inquire": { 40 | "version": "1.1.0", 41 | "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", 42 | "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" 43 | }, 44 | "@protobufjs/path": { 45 | "version": "1.1.2", 46 | "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", 47 | "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" 48 | }, 49 | "@protobufjs/pool": { 50 | "version": "1.1.0", 51 | "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", 52 | "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" 53 | }, 54 | "@protobufjs/utf8": { 55 | "version": "1.1.0", 56 | "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", 57 | "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" 58 | }, 59 | "@types/long": { 60 | "version": "3.0.32", 61 | "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", 62 | "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" 63 | }, 64 | "@types/node": { 65 | "version": "8.10.21", 66 | "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.21.tgz", 67 | "integrity": "sha512-87XkD9qDXm8fIax+5y7drx84cXsu34ZZqfB7Cial3Q/2lxSoJ/+DRaWckkCbxP41wFSIrrb939VhzaNxj4eY1w==" 68 | }, 69 | "crypto-js": { 70 | "version": "3.1.9-1", 71 | "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", 72 | "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" 73 | }, 74 | "crypto-ts": { 75 | "version": "1.0.2", 76 | "resolved": "https://registry.npmjs.org/crypto-ts/-/crypto-ts-1.0.2.tgz", 77 | "integrity": "sha1-wq5HtC8aiv/PM73b4yg5gxUMigU=", 78 | "requires": { 79 | "tslib": "1.9.3" 80 | } 81 | }, 82 | "long": { 83 | "version": "4.0.0", 84 | "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", 85 | "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" 86 | }, 87 | "protobufjs": { 88 | "version": "6.8.6", 89 | "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.6.tgz", 90 | "integrity": "sha512-eH2OTP9s55vojr3b7NBaF9i4WhWPkv/nq55nznWNp/FomKrLViprUcqnBjHph2tFQ+7KciGPTPsVWGz0SOhL0Q==", 91 | "requires": { 92 | "@protobufjs/aspromise": "1.1.2", 93 | "@protobufjs/base64": "1.1.2", 94 | "@protobufjs/codegen": "2.0.4", 95 | "@protobufjs/eventemitter": "1.1.0", 96 | "@protobufjs/fetch": "1.1.0", 97 | "@protobufjs/float": "1.0.2", 98 | "@protobufjs/inquire": "1.1.0", 99 | "@protobufjs/path": "1.1.2", 100 | "@protobufjs/pool": "1.1.0", 101 | "@protobufjs/utf8": "1.1.0", 102 | "@types/long": "3.0.32", 103 | "@types/node": "8.10.21", 104 | "long": "4.0.0" 105 | } 106 | }, 107 | "tslib": { 108 | "version": "1.9.3", 109 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", 110 | "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /project.json: -------------------------------------------------------------------------------- 1 | { 2 | "engine": "cocos2d-html5", 3 | "packages": "packages" 4 | } -------------------------------------------------------------------------------- /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": "hello_world", 31 | "webOrientation": "auto", 32 | "wechatgame": { 33 | "REMOTE_SERVER_ROOT": "", 34 | "appid": "wx6ac3f5090a6b99c5", 35 | "isSubdomain": false, 36 | "orientation": "landscape", 37 | "subContext": "" 38 | }, 39 | "xxteaKey": "f141aa59-6baa-4c", 40 | "zipCompressJs": true 41 | } -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /template-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ddkgo/LeafServerCocosClient/5459cf03a47148473d7abade841a53d6dd983410/template-banner.png -------------------------------------------------------------------------------- /template.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TEMPLATES.helloworld-ts.name", 3 | "desc": "TEMPLATES.helloworld-ts.desc", 4 | "banner": "template-banner.png" 5 | } -------------------------------------------------------------------------------- /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 | } --------------------------------------------------------------------------------