From 77a168628ace48db7bb67d97ffe6fab89a9252fc Mon Sep 17 00:00:00 2001 From: "pan@work" Date: Tue, 10 Sep 2024 17:52:32 +0800 Subject: [PATCH] dd --- assets/resources/gui/role_controller.prefab | 1064 +++++++++-------- assets/script/game/gui/InfoBox.ts | 50 - assets/script/game/gui/InfoBoxCom.ts | 43 - assets/script/game/gui/InfoBoxCom.ts.meta | 9 - assets/script/game/gui/ShowInfoCom.ts | 70 ++ .../{InfoBox.ts.meta => ShowInfoCom.ts.meta} | 2 +- assets/script/game/map/CardController.ts | 186 ++- .../script/game/monster/HeroCardViewComp.ts | 1 - 8 files changed, 818 insertions(+), 607 deletions(-) delete mode 100644 assets/script/game/gui/InfoBox.ts delete mode 100644 assets/script/game/gui/InfoBoxCom.ts delete mode 100644 assets/script/game/gui/InfoBoxCom.ts.meta create mode 100644 assets/script/game/gui/ShowInfoCom.ts rename assets/script/game/gui/{InfoBox.ts.meta => ShowInfoCom.ts.meta} (70%) diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index bebdf30e..435edf2d 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -42,33 +42,33 @@ { "__id__": 377 }, - { - "__id__": 647 - }, { "__id__": 653 }, { - "__id__": 710 + "__id__": 659 }, { - "__id__": 662 + "__id__": 716 + }, + { + "__id__": 668 } ], "_active": true, "_components": [ { - "__id__": 724 + "__id__": 730 }, { - "__id__": 726 + "__id__": 732 }, { - "__id__": 728 + "__id__": 734 } ], "_prefab": { - "__id__": 730 + "__id__": 736 }, "_lpos": { "__type__": "cc.Vec3", @@ -8613,32 +8613,32 @@ "__id__": 378 }, { - "__id__": 422 + "__id__": 423 }, { - "__id__": 466 + "__id__": 468 }, { - "__id__": 510 + "__id__": 513 }, { - "__id__": 554 + "__id__": 558 }, { - "__id__": 598 + "__id__": 603 } ], "_active": true, "_components": [ { - "__id__": 642 + "__id__": 648 }, { - "__id__": 644 + "__id__": 650 } ], "_prefab": { - "__id__": 646 + "__id__": 652 }, "_lpos": { "__type__": "cc.Vec3", @@ -8707,7 +8707,7 @@ } ], "_prefab": { - "__id__": 421 + "__id__": 422 }, "_lpos": { "__type__": "cc.Vec3", @@ -9712,7 +9712,11 @@ "__prefab": { "__id__": 420 }, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 421 + } + ], "_interactable": true, "_transition": 3, "_normalColor": { @@ -9756,6 +9760,16 @@ "__type__": "cc.CompPrefabInfo", "fileId": "82Ye6Ztt9BP4fEpnhEj3Mb" }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "ee99bEQ89lEtavAHQsY2sba", + "handler": "use_card", + "customEventData": "1" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -9779,35 +9793,35 @@ }, "_children": [ { - "__id__": 423 + "__id__": 424 }, { - "__id__": 429 + "__id__": 430 }, { - "__id__": 441 + "__id__": 442 }, { - "__id__": 447 + "__id__": 448 }, { - "__id__": 453 + "__id__": 454 } ], "_active": true, "_components": [ { - "__id__": 459 + "__id__": 460 }, { - "__id__": 461 + "__id__": 462 }, { - "__id__": 463 + "__id__": 464 } ], "_prefab": { - "__id__": 465 + "__id__": 467 }, "_lpos": { "__type__": "cc.Vec3", @@ -9844,20 +9858,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 422 + "__id__": 423 }, "_children": [], "_active": true, "_components": [ { - "__id__": 424 + "__id__": 425 }, { - "__id__": 426 + "__id__": 427 } ], "_prefab": { - "__id__": 428 + "__id__": 429 }, "_lpos": { "__type__": "cc.Vec3", @@ -9894,11 +9908,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 423 + "__id__": 424 }, "_enabled": true, "__prefab": { - "__id__": 425 + "__id__": 426 }, "_contentSize": { "__type__": "cc.Size", @@ -9922,11 +9936,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 423 + "__id__": 424 }, "_enabled": true, "__prefab": { - "__id__": 427 + "__id__": 428 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -9980,24 +9994,24 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 422 + "__id__": 423 }, "_children": [ { - "__id__": 430 + "__id__": 431 } ], "_active": true, "_components": [ { - "__id__": 436 + "__id__": 437 }, { - "__id__": 438 + "__id__": 439 } ], "_prefab": { - "__id__": 440 + "__id__": 441 }, "_lpos": { "__type__": "cc.Vec3", @@ -10034,20 +10048,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 429 + "__id__": 430 }, "_children": [], "_active": true, "_components": [ { - "__id__": 431 + "__id__": 432 }, { - "__id__": 433 + "__id__": 434 } ], "_prefab": { - "__id__": 435 + "__id__": 436 }, "_lpos": { "__type__": "cc.Vec3", @@ -10084,11 +10098,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 430 + "__id__": 431 }, "_enabled": true, "__prefab": { - "__id__": 432 + "__id__": 433 }, "_contentSize": { "__type__": "cc.Size", @@ -10112,11 +10126,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 430 + "__id__": 431 }, "_enabled": true, "__prefab": { - "__id__": 434 + "__id__": 435 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10193,11 +10207,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 429 + "__id__": 430 }, "_enabled": true, "__prefab": { - "__id__": 437 + "__id__": 438 }, "_contentSize": { "__type__": "cc.Size", @@ -10221,11 +10235,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 429 + "__id__": 430 }, "_enabled": true, "__prefab": { - "__id__": 439 + "__id__": 440 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10279,20 +10293,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 422 + "__id__": 423 }, "_children": [], "_active": true, "_components": [ { - "__id__": 442 + "__id__": 443 }, { - "__id__": 444 + "__id__": 445 } ], "_prefab": { - "__id__": 446 + "__id__": 447 }, "_lpos": { "__type__": "cc.Vec3", @@ -10329,11 +10343,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 441 + "__id__": 442 }, "_enabled": true, "__prefab": { - "__id__": 443 + "__id__": 444 }, "_contentSize": { "__type__": "cc.Size", @@ -10357,11 +10371,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 441 + "__id__": 442 }, "_enabled": true, "__prefab": { - "__id__": 445 + "__id__": 446 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10438,20 +10452,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 422 + "__id__": 423 }, "_children": [], "_active": true, "_components": [ { - "__id__": 448 + "__id__": 449 }, { - "__id__": 450 + "__id__": 451 } ], "_prefab": { - "__id__": 452 + "__id__": 453 }, "_lpos": { "__type__": "cc.Vec3", @@ -10488,11 +10502,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 447 + "__id__": 448 }, "_enabled": true, "__prefab": { - "__id__": 449 + "__id__": 450 }, "_contentSize": { "__type__": "cc.Size", @@ -10516,11 +10530,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 447 + "__id__": 448 }, "_enabled": true, "__prefab": { - "__id__": 451 + "__id__": 452 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10574,20 +10588,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 422 + "__id__": 423 }, "_children": [], "_active": true, "_components": [ { - "__id__": 454 + "__id__": 455 }, { - "__id__": 456 + "__id__": 457 } ], "_prefab": { - "__id__": 458 + "__id__": 459 }, "_lpos": { "__type__": "cc.Vec3", @@ -10624,11 +10638,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 453 + "__id__": 454 }, "_enabled": true, "__prefab": { - "__id__": 455 + "__id__": 456 }, "_contentSize": { "__type__": "cc.Size", @@ -10652,11 +10666,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 453 + "__id__": 454 }, "_enabled": true, "__prefab": { - "__id__": 457 + "__id__": 458 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10733,11 +10747,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 422 + "__id__": 423 }, "_enabled": true, "__prefab": { - "__id__": 460 + "__id__": 461 }, "_contentSize": { "__type__": "cc.Size", @@ -10761,11 +10775,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 422 + "__id__": 423 }, "_enabled": true, "__prefab": { - "__id__": 462 + "__id__": 463 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10806,13 +10820,17 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 422 + "__id__": 423 }, "_enabled": true, "__prefab": { - "__id__": 464 + "__id__": 465 }, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 466 + } + ], "_interactable": true, "_transition": 3, "_normalColor": { @@ -10856,6 +10874,16 @@ "__type__": "cc.CompPrefabInfo", "fileId": "7a1fbrJoFH3ooB/ObOZvgh" }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "ee99bEQ89lEtavAHQsY2sba", + "handler": "use_card", + "customEventData": "2" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -10879,35 +10907,35 @@ }, "_children": [ { - "__id__": 467 + "__id__": 469 }, { - "__id__": 473 + "__id__": 475 }, { - "__id__": 485 + "__id__": 487 }, { - "__id__": 491 + "__id__": 493 }, { - "__id__": 497 + "__id__": 499 } ], "_active": true, "_components": [ - { - "__id__": 503 - }, { "__id__": 505 }, { "__id__": 507 + }, + { + "__id__": 509 } ], "_prefab": { - "__id__": 509 + "__id__": 512 }, "_lpos": { "__type__": "cc.Vec3", @@ -10944,20 +10972,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 466 + "__id__": 468 }, "_children": [], "_active": true, "_components": [ { - "__id__": 468 + "__id__": 470 }, { - "__id__": 470 + "__id__": 472 } ], "_prefab": { - "__id__": 472 + "__id__": 474 }, "_lpos": { "__type__": "cc.Vec3", @@ -10994,11 +11022,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 467 + "__id__": 469 }, "_enabled": true, "__prefab": { - "__id__": 469 + "__id__": 471 }, "_contentSize": { "__type__": "cc.Size", @@ -11022,11 +11050,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 467 + "__id__": 469 }, "_enabled": true, "__prefab": { - "__id__": 471 + "__id__": 473 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11080,24 +11108,24 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 466 + "__id__": 468 }, "_children": [ { - "__id__": 474 + "__id__": 476 } ], "_active": true, "_components": [ { - "__id__": 480 + "__id__": 482 }, { - "__id__": 482 + "__id__": 484 } ], "_prefab": { - "__id__": 484 + "__id__": 486 }, "_lpos": { "__type__": "cc.Vec3", @@ -11134,20 +11162,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 473 + "__id__": 475 }, "_children": [], "_active": true, "_components": [ { - "__id__": 475 + "__id__": 477 }, { - "__id__": 477 + "__id__": 479 } ], "_prefab": { - "__id__": 479 + "__id__": 481 }, "_lpos": { "__type__": "cc.Vec3", @@ -11184,11 +11212,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 474 + "__id__": 476 }, "_enabled": true, "__prefab": { - "__id__": 476 + "__id__": 478 }, "_contentSize": { "__type__": "cc.Size", @@ -11212,11 +11240,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 474 + "__id__": 476 }, "_enabled": true, "__prefab": { - "__id__": 478 + "__id__": 480 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11293,11 +11321,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 473 + "__id__": 475 }, "_enabled": true, "__prefab": { - "__id__": 481 + "__id__": 483 }, "_contentSize": { "__type__": "cc.Size", @@ -11321,11 +11349,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 473 + "__id__": 475 }, "_enabled": true, "__prefab": { - "__id__": 483 + "__id__": 485 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11379,20 +11407,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 466 + "__id__": 468 }, "_children": [], "_active": true, "_components": [ { - "__id__": 486 + "__id__": 488 }, { - "__id__": 488 + "__id__": 490 } ], "_prefab": { - "__id__": 490 + "__id__": 492 }, "_lpos": { "__type__": "cc.Vec3", @@ -11429,11 +11457,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 485 + "__id__": 487 }, "_enabled": true, "__prefab": { - "__id__": 487 + "__id__": 489 }, "_contentSize": { "__type__": "cc.Size", @@ -11457,11 +11485,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 485 + "__id__": 487 }, "_enabled": true, "__prefab": { - "__id__": 489 + "__id__": 491 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11538,20 +11566,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 466 + "__id__": 468 }, "_children": [], "_active": true, "_components": [ { - "__id__": 492 + "__id__": 494 }, { - "__id__": 494 + "__id__": 496 } ], "_prefab": { - "__id__": 496 + "__id__": 498 }, "_lpos": { "__type__": "cc.Vec3", @@ -11588,11 +11616,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 491 + "__id__": 493 }, "_enabled": true, "__prefab": { - "__id__": 493 + "__id__": 495 }, "_contentSize": { "__type__": "cc.Size", @@ -11616,11 +11644,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 491 + "__id__": 493 }, "_enabled": true, "__prefab": { - "__id__": 495 + "__id__": 497 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11674,20 +11702,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 466 + "__id__": 468 }, "_children": [], "_active": true, "_components": [ { - "__id__": 498 + "__id__": 500 }, { - "__id__": 500 + "__id__": 502 } ], "_prefab": { - "__id__": 502 + "__id__": 504 }, "_lpos": { "__type__": "cc.Vec3", @@ -11724,11 +11752,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 497 + "__id__": 499 }, "_enabled": true, "__prefab": { - "__id__": 499 + "__id__": 501 }, "_contentSize": { "__type__": "cc.Size", @@ -11752,11 +11780,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 497 + "__id__": 499 }, "_enabled": true, "__prefab": { - "__id__": 501 + "__id__": 503 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11833,11 +11861,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 466 + "__id__": 468 }, "_enabled": true, "__prefab": { - "__id__": 504 + "__id__": 506 }, "_contentSize": { "__type__": "cc.Size", @@ -11861,11 +11889,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 466 + "__id__": 468 }, "_enabled": true, "__prefab": { - "__id__": 506 + "__id__": 508 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11906,13 +11934,17 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 466 + "__id__": 468 }, "_enabled": true, "__prefab": { - "__id__": 508 + "__id__": 510 }, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 511 + } + ], "_interactable": true, "_transition": 3, "_normalColor": { @@ -11956,6 +11988,16 @@ "__type__": "cc.CompPrefabInfo", "fileId": "2aRnUszPdIgJeEvvqs2hBk" }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "ee99bEQ89lEtavAHQsY2sba", + "handler": "use_card", + "customEventData": "3" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -11979,35 +12021,35 @@ }, "_children": [ { - "__id__": 511 + "__id__": 514 }, { - "__id__": 517 + "__id__": 520 }, { - "__id__": 529 + "__id__": 532 }, { - "__id__": 535 + "__id__": 538 }, { - "__id__": 541 + "__id__": 544 } ], "_active": true, "_components": [ { - "__id__": 547 + "__id__": 550 }, { - "__id__": 549 + "__id__": 552 }, { - "__id__": 551 + "__id__": 554 } ], "_prefab": { - "__id__": 553 + "__id__": 557 }, "_lpos": { "__type__": "cc.Vec3", @@ -12044,20 +12086,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 510 + "__id__": 513 }, "_children": [], "_active": true, "_components": [ { - "__id__": 512 + "__id__": 515 }, { - "__id__": 514 + "__id__": 517 } ], "_prefab": { - "__id__": 516 + "__id__": 519 }, "_lpos": { "__type__": "cc.Vec3", @@ -12094,11 +12136,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 511 + "__id__": 514 }, "_enabled": true, "__prefab": { - "__id__": 513 + "__id__": 516 }, "_contentSize": { "__type__": "cc.Size", @@ -12122,11 +12164,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 511 + "__id__": 514 }, "_enabled": true, "__prefab": { - "__id__": 515 + "__id__": 518 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12177,24 +12219,24 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 510 + "__id__": 513 }, "_children": [ { - "__id__": 518 + "__id__": 521 } ], "_active": true, "_components": [ { - "__id__": 524 + "__id__": 527 }, { - "__id__": 526 + "__id__": 529 } ], "_prefab": { - "__id__": 528 + "__id__": 531 }, "_lpos": { "__type__": "cc.Vec3", @@ -12231,20 +12273,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 517 + "__id__": 520 }, "_children": [], "_active": true, "_components": [ { - "__id__": 519 + "__id__": 522 }, { - "__id__": 521 + "__id__": 524 } ], "_prefab": { - "__id__": 523 + "__id__": 526 }, "_lpos": { "__type__": "cc.Vec3", @@ -12281,11 +12323,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 518 + "__id__": 521 }, "_enabled": true, "__prefab": { - "__id__": 520 + "__id__": 523 }, "_contentSize": { "__type__": "cc.Size", @@ -12309,11 +12351,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 518 + "__id__": 521 }, "_enabled": true, "__prefab": { - "__id__": 522 + "__id__": 525 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12390,11 +12432,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 517 + "__id__": 520 }, "_enabled": true, "__prefab": { - "__id__": 525 + "__id__": 528 }, "_contentSize": { "__type__": "cc.Size", @@ -12418,11 +12460,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 517 + "__id__": 520 }, "_enabled": true, "__prefab": { - "__id__": 527 + "__id__": 530 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12476,20 +12518,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 510 + "__id__": 513 }, "_children": [], "_active": true, "_components": [ { - "__id__": 530 + "__id__": 533 }, { - "__id__": 532 + "__id__": 535 } ], "_prefab": { - "__id__": 534 + "__id__": 537 }, "_lpos": { "__type__": "cc.Vec3", @@ -12526,11 +12568,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 529 + "__id__": 532 }, "_enabled": true, "__prefab": { - "__id__": 531 + "__id__": 534 }, "_contentSize": { "__type__": "cc.Size", @@ -12554,11 +12596,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 529 + "__id__": 532 }, "_enabled": true, "__prefab": { - "__id__": 533 + "__id__": 536 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12635,20 +12677,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 510 + "__id__": 513 }, "_children": [], "_active": true, "_components": [ { - "__id__": 536 + "__id__": 539 }, { - "__id__": 538 + "__id__": 541 } ], "_prefab": { - "__id__": 540 + "__id__": 543 }, "_lpos": { "__type__": "cc.Vec3", @@ -12685,11 +12727,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 535 + "__id__": 538 }, "_enabled": true, "__prefab": { - "__id__": 537 + "__id__": 540 }, "_contentSize": { "__type__": "cc.Size", @@ -12713,11 +12755,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 535 + "__id__": 538 }, "_enabled": true, "__prefab": { - "__id__": 539 + "__id__": 542 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12771,20 +12813,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 510 + "__id__": 513 }, "_children": [], "_active": true, "_components": [ { - "__id__": 542 + "__id__": 545 }, { - "__id__": 544 + "__id__": 547 } ], "_prefab": { - "__id__": 546 + "__id__": 549 }, "_lpos": { "__type__": "cc.Vec3", @@ -12821,11 +12863,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 541 + "__id__": 544 }, "_enabled": true, "__prefab": { - "__id__": 543 + "__id__": 546 }, "_contentSize": { "__type__": "cc.Size", @@ -12849,11 +12891,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 541 + "__id__": 544 }, "_enabled": true, "__prefab": { - "__id__": 545 + "__id__": 548 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12930,11 +12972,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 510 + "__id__": 513 }, "_enabled": true, "__prefab": { - "__id__": 548 + "__id__": 551 }, "_contentSize": { "__type__": "cc.Size", @@ -12958,11 +13000,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 510 + "__id__": 513 }, "_enabled": true, "__prefab": { - "__id__": 550 + "__id__": 553 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13003,13 +13045,17 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 510 + "__id__": 513 }, "_enabled": true, "__prefab": { - "__id__": 552 + "__id__": 555 }, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 556 + } + ], "_interactable": true, "_transition": 3, "_normalColor": { @@ -13053,6 +13099,16 @@ "__type__": "cc.CompPrefabInfo", "fileId": "30mlK2r99JFJ3Pq64wMqoS" }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "ee99bEQ89lEtavAHQsY2sba", + "handler": "use_card", + "customEventData": "4" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -13076,35 +13132,35 @@ }, "_children": [ { - "__id__": 555 + "__id__": 559 }, { - "__id__": 561 + "__id__": 565 }, { - "__id__": 573 + "__id__": 577 }, { - "__id__": 579 + "__id__": 583 }, { - "__id__": 585 + "__id__": 589 } ], "_active": true, "_components": [ - { - "__id__": 591 - }, - { - "__id__": 593 - }, { "__id__": 595 + }, + { + "__id__": 597 + }, + { + "__id__": 599 } ], "_prefab": { - "__id__": 597 + "__id__": 602 }, "_lpos": { "__type__": "cc.Vec3", @@ -13141,20 +13197,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 554 + "__id__": 558 }, "_children": [], "_active": true, "_components": [ { - "__id__": 556 + "__id__": 560 }, { - "__id__": 558 + "__id__": 562 } ], "_prefab": { - "__id__": 560 + "__id__": 564 }, "_lpos": { "__type__": "cc.Vec3", @@ -13191,11 +13247,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 555 + "__id__": 559 }, "_enabled": true, "__prefab": { - "__id__": 557 + "__id__": 561 }, "_contentSize": { "__type__": "cc.Size", @@ -13219,11 +13275,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 555 + "__id__": 559 }, "_enabled": true, "__prefab": { - "__id__": 559 + "__id__": 563 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13274,24 +13330,24 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 554 + "__id__": 558 }, "_children": [ { - "__id__": 562 + "__id__": 566 } ], "_active": true, "_components": [ { - "__id__": 568 + "__id__": 572 }, { - "__id__": 570 + "__id__": 574 } ], "_prefab": { - "__id__": 572 + "__id__": 576 }, "_lpos": { "__type__": "cc.Vec3", @@ -13328,20 +13384,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 561 + "__id__": 565 }, "_children": [], "_active": true, "_components": [ { - "__id__": 563 + "__id__": 567 }, { - "__id__": 565 + "__id__": 569 } ], "_prefab": { - "__id__": 567 + "__id__": 571 }, "_lpos": { "__type__": "cc.Vec3", @@ -13378,11 +13434,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 562 + "__id__": 566 }, "_enabled": true, "__prefab": { - "__id__": 564 + "__id__": 568 }, "_contentSize": { "__type__": "cc.Size", @@ -13406,11 +13462,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 562 + "__id__": 566 }, "_enabled": true, "__prefab": { - "__id__": 566 + "__id__": 570 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13487,11 +13543,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 561 + "__id__": 565 }, "_enabled": true, "__prefab": { - "__id__": 569 + "__id__": 573 }, "_contentSize": { "__type__": "cc.Size", @@ -13515,11 +13571,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 561 + "__id__": 565 }, "_enabled": true, "__prefab": { - "__id__": 571 + "__id__": 575 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13573,20 +13629,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 554 + "__id__": 558 }, "_children": [], "_active": true, "_components": [ { - "__id__": 574 + "__id__": 578 }, { - "__id__": 576 + "__id__": 580 } ], "_prefab": { - "__id__": 578 + "__id__": 582 }, "_lpos": { "__type__": "cc.Vec3", @@ -13623,11 +13679,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 573 + "__id__": 577 }, "_enabled": true, "__prefab": { - "__id__": 575 + "__id__": 579 }, "_contentSize": { "__type__": "cc.Size", @@ -13651,11 +13707,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 573 + "__id__": 577 }, "_enabled": true, "__prefab": { - "__id__": 577 + "__id__": 581 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13732,20 +13788,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 554 + "__id__": 558 }, "_children": [], "_active": true, "_components": [ { - "__id__": 580 + "__id__": 584 }, { - "__id__": 582 + "__id__": 586 } ], "_prefab": { - "__id__": 584 + "__id__": 588 }, "_lpos": { "__type__": "cc.Vec3", @@ -13782,11 +13838,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 579 + "__id__": 583 }, "_enabled": true, "__prefab": { - "__id__": 581 + "__id__": 585 }, "_contentSize": { "__type__": "cc.Size", @@ -13810,11 +13866,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 579 + "__id__": 583 }, "_enabled": true, "__prefab": { - "__id__": 583 + "__id__": 587 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13868,20 +13924,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 554 + "__id__": 558 }, "_children": [], "_active": true, "_components": [ { - "__id__": 586 + "__id__": 590 }, { - "__id__": 588 + "__id__": 592 } ], "_prefab": { - "__id__": 590 + "__id__": 594 }, "_lpos": { "__type__": "cc.Vec3", @@ -13918,11 +13974,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 585 + "__id__": 589 }, "_enabled": true, "__prefab": { - "__id__": 587 + "__id__": 591 }, "_contentSize": { "__type__": "cc.Size", @@ -13946,11 +14002,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 585 + "__id__": 589 }, "_enabled": true, "__prefab": { - "__id__": 589 + "__id__": 593 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14027,11 +14083,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 554 + "__id__": 558 }, "_enabled": true, "__prefab": { - "__id__": 592 + "__id__": 596 }, "_contentSize": { "__type__": "cc.Size", @@ -14055,11 +14111,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 554 + "__id__": 558 }, "_enabled": true, "__prefab": { - "__id__": 594 + "__id__": 598 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14100,13 +14156,17 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 554 + "__id__": 558 }, "_enabled": true, "__prefab": { - "__id__": 596 + "__id__": 600 }, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 601 + } + ], "_interactable": true, "_transition": 3, "_normalColor": { @@ -14150,6 +14210,16 @@ "__type__": "cc.CompPrefabInfo", "fileId": "0f1O3ptsBKdJlUykl1d1W/" }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "ee99bEQ89lEtavAHQsY2sba", + "handler": "use_card", + "customEventData": "5" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -14173,35 +14243,35 @@ }, "_children": [ { - "__id__": 599 + "__id__": 604 }, { - "__id__": 605 + "__id__": 610 }, { - "__id__": 617 + "__id__": 622 }, { - "__id__": 623 + "__id__": 628 }, { - "__id__": 629 + "__id__": 634 } ], "_active": true, "_components": [ { - "__id__": 635 + "__id__": 640 }, { - "__id__": 637 + "__id__": 642 }, { - "__id__": 639 + "__id__": 644 } ], "_prefab": { - "__id__": 641 + "__id__": 647 }, "_lpos": { "__type__": "cc.Vec3", @@ -14238,20 +14308,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 598 + "__id__": 603 }, "_children": [], "_active": true, "_components": [ { - "__id__": 600 + "__id__": 605 }, { - "__id__": 602 + "__id__": 607 } ], "_prefab": { - "__id__": 604 + "__id__": 609 }, "_lpos": { "__type__": "cc.Vec3", @@ -14288,11 +14358,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 599 + "__id__": 604 }, "_enabled": true, "__prefab": { - "__id__": 601 + "__id__": 606 }, "_contentSize": { "__type__": "cc.Size", @@ -14316,11 +14386,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 599 + "__id__": 604 }, "_enabled": true, "__prefab": { - "__id__": 603 + "__id__": 608 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14371,24 +14441,24 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 598 + "__id__": 603 }, "_children": [ { - "__id__": 606 + "__id__": 611 } ], "_active": true, "_components": [ { - "__id__": 612 + "__id__": 617 }, { - "__id__": 614 + "__id__": 619 } ], "_prefab": { - "__id__": 616 + "__id__": 621 }, "_lpos": { "__type__": "cc.Vec3", @@ -14425,20 +14495,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 605 + "__id__": 610 }, "_children": [], "_active": true, "_components": [ { - "__id__": 607 + "__id__": 612 }, { - "__id__": 609 + "__id__": 614 } ], "_prefab": { - "__id__": 611 + "__id__": 616 }, "_lpos": { "__type__": "cc.Vec3", @@ -14475,11 +14545,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 606 + "__id__": 611 }, "_enabled": true, "__prefab": { - "__id__": 608 + "__id__": 613 }, "_contentSize": { "__type__": "cc.Size", @@ -14503,11 +14573,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 606 + "__id__": 611 }, "_enabled": true, "__prefab": { - "__id__": 610 + "__id__": 615 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14584,11 +14654,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 605 + "__id__": 610 }, "_enabled": true, "__prefab": { - "__id__": 613 + "__id__": 618 }, "_contentSize": { "__type__": "cc.Size", @@ -14612,11 +14682,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 605 + "__id__": 610 }, "_enabled": true, "__prefab": { - "__id__": 615 + "__id__": 620 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14670,20 +14740,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 598 + "__id__": 603 }, "_children": [], "_active": true, "_components": [ { - "__id__": 618 + "__id__": 623 }, { - "__id__": 620 + "__id__": 625 } ], "_prefab": { - "__id__": 622 + "__id__": 627 }, "_lpos": { "__type__": "cc.Vec3", @@ -14720,11 +14790,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 617 + "__id__": 622 }, "_enabled": true, "__prefab": { - "__id__": 619 + "__id__": 624 }, "_contentSize": { "__type__": "cc.Size", @@ -14748,11 +14818,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 617 + "__id__": 622 }, "_enabled": true, "__prefab": { - "__id__": 621 + "__id__": 626 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14829,20 +14899,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 598 + "__id__": 603 }, "_children": [], "_active": true, "_components": [ { - "__id__": 624 + "__id__": 629 }, { - "__id__": 626 + "__id__": 631 } ], "_prefab": { - "__id__": 628 + "__id__": 633 }, "_lpos": { "__type__": "cc.Vec3", @@ -14879,11 +14949,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 623 + "__id__": 628 }, "_enabled": true, "__prefab": { - "__id__": 625 + "__id__": 630 }, "_contentSize": { "__type__": "cc.Size", @@ -14907,11 +14977,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 623 + "__id__": 628 }, "_enabled": true, "__prefab": { - "__id__": 627 + "__id__": 632 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -14965,20 +15035,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 598 + "__id__": 603 }, "_children": [], "_active": true, "_components": [ { - "__id__": 630 + "__id__": 635 }, { - "__id__": 632 + "__id__": 637 } ], "_prefab": { - "__id__": 634 + "__id__": 639 }, "_lpos": { "__type__": "cc.Vec3", @@ -15015,11 +15085,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 629 + "__id__": 634 }, "_enabled": true, "__prefab": { - "__id__": 631 + "__id__": 636 }, "_contentSize": { "__type__": "cc.Size", @@ -15043,11 +15113,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 629 + "__id__": 634 }, "_enabled": true, "__prefab": { - "__id__": 633 + "__id__": 638 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -15124,11 +15194,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 598 + "__id__": 603 }, "_enabled": true, "__prefab": { - "__id__": 636 + "__id__": 641 }, "_contentSize": { "__type__": "cc.Size", @@ -15152,11 +15222,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 598 + "__id__": 603 }, "_enabled": true, "__prefab": { - "__id__": 638 + "__id__": 643 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -15197,13 +15267,17 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 598 + "__id__": 603 }, "_enabled": true, "__prefab": { - "__id__": 640 + "__id__": 645 }, - "clickEvents": [], + "clickEvents": [ + { + "__id__": 646 + } + ], "_interactable": true, "_transition": 3, "_normalColor": { @@ -15247,6 +15321,16 @@ "__type__": "cc.CompPrefabInfo", "fileId": "9a2Ds4K+JOxKy6X9F2lMKd" }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "ee99bEQ89lEtavAHQsY2sba", + "handler": "use_card", + "customEventData": "6" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -15270,11 +15354,11 @@ }, "_enabled": true, "__prefab": { - "__id__": 643 + "__id__": 649 }, "_contentSize": { "__type__": "cc.Size", - "width": 710, + "width": 720, "height": 120 }, "_anchorPoint": { @@ -15298,12 +15382,12 @@ }, "_enabled": true, "__prefab": { - "__id__": 645 + "__id__": 651 }, "_alignFlags": 44, "_target": null, - "_left": 5, - "_right": 5, + "_left": 0, + "_right": 0, "_top": 0, "_bottom": 15, "_horizontalCenter": 0, @@ -15349,14 +15433,14 @@ "_active": true, "_components": [ { - "__id__": 648 + "__id__": 654 }, { - "__id__": 650 + "__id__": 656 } ], "_prefab": { - "__id__": 652 + "__id__": 658 }, "_lpos": { "__type__": "cc.Vec3", @@ -15393,11 +15477,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 647 + "__id__": 653 }, "_enabled": true, "__prefab": { - "__id__": 649 + "__id__": 655 }, "_contentSize": { "__type__": "cc.Size", @@ -15421,11 +15505,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 647 + "__id__": 653 }, "_enabled": true, "__prefab": { - "__id__": 651 + "__id__": 657 }, "_alignFlags": 12, "_target": null, @@ -15474,29 +15558,29 @@ }, "_children": [ { - "__id__": 654 + "__id__": 660 }, { - "__id__": 692 + "__id__": 698 } ], "_active": true, "_components": [ - { - "__id__": 701 - }, - { - "__id__": 703 - }, - { - "__id__": 705 - }, { "__id__": 707 + }, + { + "__id__": 709 + }, + { + "__id__": 711 + }, + { + "__id__": 713 } ], "_prefab": { - "__id__": 709 + "__id__": 715 }, "_lpos": { "__type__": "cc.Vec3", @@ -15533,23 +15617,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 653 + "__id__": 659 }, "_children": [], "_active": true, "_components": [ { - "__id__": 655 + "__id__": 661 }, { - "__id__": 657 + "__id__": 663 }, { - "__id__": 659 + "__id__": 665 } ], "_prefab": { - "__id__": 691 + "__id__": 697 }, "_lpos": { "__type__": "cc.Vec3", @@ -15586,11 +15670,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 654 + "__id__": 660 }, "_enabled": true, "__prefab": { - "__id__": 656 + "__id__": 662 }, "_contentSize": { "__type__": "cc.Size", @@ -15614,11 +15698,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 654 + "__id__": 660 }, "_enabled": true, "__prefab": { - "__id__": 658 + "__id__": 664 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -15659,15 +15743,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 654 + "__id__": 660 }, "_enabled": true, "__prefab": { - "__id__": 660 + "__id__": 666 }, "clickEvents": [ { - "__id__": 661 + "__id__": 667 } ], "_interactable": true, @@ -15707,7 +15791,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 654 + "__id__": 660 }, "_id": "" }, @@ -15718,7 +15802,7 @@ { "__type__": "cc.ClickEvent", "target": { - "__id__": 662 + "__id__": 668 }, "component": "", "_componentId": "3a67fnZjfNM/JVdGoscMLLo", @@ -15732,14 +15816,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 663 + "__id__": 669 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 662 + "__id__": 668 }, "asset": { "__uuid__": "b033123c-3b97-4d66-a18d-c584460cf02f", @@ -15747,7 +15831,7 @@ }, "fileId": "c7ZN3fr+hJoZmUZs2A0Ye0", "instance": { - "__id__": 664 + "__id__": 670 }, "targetOverrides": null }, @@ -15760,19 +15844,10 @@ "mountedChildren": [], "mountedComponents": [ { - "__id__": 665 + "__id__": 671 } ], "propertyOverrides": [ - { - "__id__": 669 - }, - { - "__id__": 671 - }, - { - "__id__": 673 - }, { "__id__": 675 }, @@ -15789,19 +15864,28 @@ "__id__": 683 }, { - "__id__": 684 - }, - { - "__id__": 686 + "__id__": 685 }, { "__id__": 687 }, { - "__id__": 688 + "__id__": 689 }, { - "__id__": 689 + "__id__": 690 + }, + { + "__id__": 692 + }, + { + "__id__": 693 + }, + { + "__id__": 694 + }, + { + "__id__": 695 } ], "removedComponents": [] @@ -15809,11 +15893,11 @@ { "__type__": "cc.MountedComponentsInfo", "targetInfo": { - "__id__": 666 + "__id__": 672 }, "components": [ { - "__id__": 667 + "__id__": 673 } ] }, @@ -15829,15 +15913,15 @@ "_objFlags": 0, "__editorExtras__": { "mountedRoot": { - "__id__": 662 + "__id__": 668 } }, "node": { - "__id__": 662 + "__id__": 668 }, "_enabled": true, "__prefab": { - "__id__": 668 + "__id__": 674 }, "_id": "" }, @@ -15848,7 +15932,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 670 + "__id__": 676 }, "propertyPath": [ "_name" @@ -15864,7 +15948,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 672 + "__id__": 678 }, "propertyPath": [ "_lpos" @@ -15885,7 +15969,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 674 + "__id__": 680 }, "propertyPath": [ "_lrot" @@ -15907,7 +15991,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 676 + "__id__": 682 }, "propertyPath": [ "_euler" @@ -15928,7 +16012,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 678 + "__id__": 684 }, "propertyPath": [ "_active" @@ -15944,7 +16028,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 680 + "__id__": 686 }, "propertyPath": [ "clickEvents", @@ -15952,7 +16036,7 @@ "target" ], "value": { - "__id__": 653 + "__id__": 659 } }, { @@ -15964,7 +16048,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 682 + "__id__": 688 }, "propertyPath": [ "clickEvents", @@ -15982,7 +16066,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 682 + "__id__": 688 }, "propertyPath": [ "clickEvents", @@ -15994,7 +16078,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 685 + "__id__": 691 }, "propertyPath": [ "clickEvents", @@ -16002,7 +16086,7 @@ "target" ], "value": { - "__id__": 662 + "__id__": 668 } }, { @@ -16014,7 +16098,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 685 + "__id__": 691 }, "propertyPath": [ "clickEvents", @@ -16026,7 +16110,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 685 + "__id__": 691 }, "propertyPath": [ "clickEvents", @@ -16038,7 +16122,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 682 + "__id__": 688 }, "propertyPath": [ "clickEvents", @@ -16049,20 +16133,20 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 682 + "__id__": 688 }, "propertyPath": [ "clickEvents", "1" ], "value": { - "__id__": 690 + "__id__": 696 } }, { "__type__": "cc.ClickEvent", "target": { - "__id__": 662 + "__id__": 668 }, "component": "", "_componentId": "3a67fnZjfNM/JVdGoscMLLo", @@ -16088,23 +16172,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 653 + "__id__": 659 }, "_children": [], "_active": true, "_components": [ { - "__id__": 693 + "__id__": 699 }, { - "__id__": 695 + "__id__": 701 }, { - "__id__": 697 + "__id__": 703 } ], "_prefab": { - "__id__": 700 + "__id__": 706 }, "_lpos": { "__type__": "cc.Vec3", @@ -16141,11 +16225,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 692 + "__id__": 698 }, "_enabled": true, "__prefab": { - "__id__": 694 + "__id__": 700 }, "_contentSize": { "__type__": "cc.Size", @@ -16169,11 +16253,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 692 + "__id__": 698 }, "_enabled": true, "__prefab": { - "__id__": 696 + "__id__": 702 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -16214,15 +16298,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 692 + "__id__": 698 }, "_enabled": true, "__prefab": { - "__id__": 698 + "__id__": 704 }, "clickEvents": [ { - "__id__": 699 + "__id__": 705 } ], "_interactable": true, @@ -16262,7 +16346,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 692 + "__id__": 698 }, "_id": "" }, @@ -16273,7 +16357,7 @@ { "__type__": "cc.ClickEvent", "target": { - "__id__": 662 + "__id__": 668 }, "component": "", "_componentId": "3a67fnZjfNM/JVdGoscMLLo", @@ -16299,11 +16383,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 653 + "__id__": 659 }, "_enabled": true, "__prefab": { - "__id__": 702 + "__id__": 708 }, "_contentSize": { "__type__": "cc.Size", @@ -16327,11 +16411,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 653 + "__id__": 659 }, "_enabled": true, "__prefab": { - "__id__": 704 + "__id__": 710 }, "_alignFlags": 4, "_target": null, @@ -16363,11 +16447,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 653 + "__id__": 659 }, "_enabled": true, "__prefab": { - "__id__": 706 + "__id__": 712 }, "_id": "" }, @@ -16381,11 +16465,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 653 + "__id__": 659 }, "_enabled": true, "__prefab": { - "__id__": 708 + "__id__": 714 }, "_id": "" }, @@ -16413,14 +16497,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 711 + "__id__": 717 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 710 + "__id__": 716 }, "asset": { "__uuid__": "e9d4aea4-d78a-40ff-9300-ad76fec45cfe", @@ -16428,7 +16512,7 @@ }, "fileId": "c46/YsCPVOJYA4mWEpNYRx", "instance": { - "__id__": 712 + "__id__": 718 }, "targetOverrides": null }, @@ -16442,28 +16526,28 @@ "mountedComponents": [], "propertyOverrides": [ { - "__id__": 713 - }, - { - "__id__": 715 - }, - { - "__id__": 716 - }, - { - "__id__": 717 - }, - { - "__id__": 718 - }, - { - "__id__": 720 + "__id__": 719 }, { "__id__": 721 }, + { + "__id__": 722 + }, { "__id__": 723 + }, + { + "__id__": 724 + }, + { + "__id__": 726 + }, + { + "__id__": 727 + }, + { + "__id__": 729 } ], "removedComponents": [] @@ -16471,7 +16555,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 714 + "__id__": 720 }, "propertyPath": [ "_name" @@ -16487,7 +16571,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 714 + "__id__": 720 }, "propertyPath": [ "_lpos" @@ -16502,7 +16586,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 714 + "__id__": 720 }, "propertyPath": [ "_lrot" @@ -16518,7 +16602,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 714 + "__id__": 720 }, "propertyPath": [ "_euler" @@ -16533,7 +16617,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 719 + "__id__": 725 }, "propertyPath": [ "_left" @@ -16549,7 +16633,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 719 + "__id__": 725 }, "propertyPath": [ "_right" @@ -16559,7 +16643,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 722 + "__id__": 728 }, "propertyPath": [ "_contentSize" @@ -16579,7 +16663,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 714 + "__id__": 720 }, "propertyPath": [ "_active" @@ -16596,7 +16680,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 725 + "__id__": 731 }, "_contentSize": { "__type__": "cc.Size", @@ -16624,7 +16708,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 727 + "__id__": 733 }, "_alignFlags": 45, "_target": null, @@ -16660,7 +16744,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 729 + "__id__": 735 }, "_id": "" }, @@ -16680,18 +16764,18 @@ "instance": null, "targetOverrides": [ { - "__id__": 731 + "__id__": 737 }, { - "__id__": 734 + "__id__": 740 } ], "nestedPrefabInstanceRoots": [ { - "__id__": 662 + "__id__": 668 }, { - "__id__": 710 + "__id__": 716 }, { "__id__": 304 @@ -16701,19 +16785,19 @@ { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 662 + "__id__": 668 }, "sourceInfo": { - "__id__": 732 + "__id__": 738 }, "propertyPath": [ "_target" ], "target": { - "__id__": 662 + "__id__": 668 }, "targetInfo": { - "__id__": 733 + "__id__": 739 } }, { @@ -16731,19 +16815,19 @@ { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 662 + "__id__": 668 }, "sourceInfo": { - "__id__": 735 + "__id__": 741 }, "propertyPath": [ "_target" ], "target": { - "__id__": 662 + "__id__": 668 }, "targetInfo": { - "__id__": 736 + "__id__": 742 } }, { diff --git a/assets/script/game/gui/InfoBox.ts b/assets/script/game/gui/InfoBox.ts deleted file mode 100644 index 26493dcf..00000000 --- a/assets/script/game/gui/InfoBox.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { instantiate, Prefab, Vec3 } from "cc"; -import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; -import { InfoBoxCom } from "./InfoBoxCom"; -import { smc } from "../common/SingletonModuleComp"; -import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; - -/** InfoBox 模块 */ -@ecs.register(`InfoBox`) -export class InfoBox extends ecs.Entity { - /** ---------- 数据层 ---------- */ - // InfoBoxModel!: InfoBoxModelComp; - - /** ---------- 业务层 ---------- */ - // InfoBoxBll!: InfoBoxBllComp; - - /** ---------- 视图层 ---------- */ - InfoBoxView!: InfoBoxCom - - /** 实始添加的数据层组件 */ - protected init() { - // this.addComponents(); - } - load(pos: Vec3 = Vec3.ZERO,uuid:number=101,prefab_path:string) { - var path = "game/gui/"+prefab_path; - var prefab: Prefab = oops.res.get(path, Prefab)!; - var node = instantiate(prefab); - var scene = smc.map.MapView.scene; - node.parent = scene.SkillLayer!.node!; - node.setPosition(pos) - // console.log(node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite)) - // const url = 'game/heros/player'; - // resources.load(url, SpriteAtlas, (err: any, atlas) => { - // const sprite = node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite); - - // sprite.spriteFrame = atlas.getSpriteFrame(RoleSet[uuid].path); - // }); - // var rv = node.getComponent(MonsterViewComp)!; - // this.add(rv); - var mv = node.getComponent(InfoBoxCom)!; - this.add(mv); - - } - /** 模块资源释放 */ - destroy() { - // 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放 - this.remove(InfoBoxCom); - super.destroy(); - } -} - diff --git a/assets/script/game/gui/InfoBoxCom.ts b/assets/script/game/gui/InfoBoxCom.ts deleted file mode 100644 index b6b2cdb3..00000000 --- a/assets/script/game/gui/InfoBoxCom.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { _decorator ,Node} from "cc"; -import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; -import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; - -const { ccclass, property } = _decorator; - -/** 视图层对象 */ -@ccclass('InfoBoxCom') -@ecs.register('InfoBox', false) -export class InfoBoxCom extends CCComp { - @property(Node) - n_name:Node =null! - @property(Node) - n_hp:Node =null! - @property(Node) - n_atk:Node =null! - @property(Node) - n_info:Node =null! - @property(Node) - n_atk_cd:Node =null! - @property(Node) - n_skillcd:Node =null! - - n_type:number=0; // 0:技能 1 精灵 - /** 视图层逻辑代码分离演示 */ - start() { - // var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象 - console.log("InfoBoxCom start"); - } - - /** 全局消息逻辑处理 */ - // private onHandler(event: string, args: any) { - // switch (event) { - // case ModuleEvent.Cmd: - // break; - // } - // } - - /** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */ - reset() { - this.node.destroy(); - } -} \ No newline at end of file diff --git a/assets/script/game/gui/InfoBoxCom.ts.meta b/assets/script/game/gui/InfoBoxCom.ts.meta deleted file mode 100644 index 6aba4aaa..00000000 --- a/assets/script/game/gui/InfoBoxCom.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.23", - "importer": "typescript", - "imported": true, - "uuid": "20c2c0dd-188e-41da-b74e-fdacae24b337", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/gui/ShowInfoCom.ts b/assets/script/game/gui/ShowInfoCom.ts new file mode 100644 index 00000000..531f5c20 --- /dev/null +++ b/assets/script/game/gui/ShowInfoCom.ts @@ -0,0 +1,70 @@ +import { _decorator, Component, EventTouch, Node, NodeEventType } from 'cc'; +const { ccclass, property } = _decorator; + +@ccclass('ShowInfoCom') +export class ShowInfoCom extends Component { + protected onLoad(): void { + this.node.on(NodeEventType.TOUCH_START, this.onTouchMove, this); + this.node.on(NodeEventType.TOUCH_MOVE, this.onTouchMove, this); + this.node.on(NodeEventType.TOUCH_END, this.onTouchEnd, this); + this.node.on(NodeEventType.TOUCH_CANCEL, this.onTouchEnd, this); + // oops.message.on("active_card_eid", this.do_active_card_eid, this); + } + start() { + + } + onTouchMove(event: EventTouch) { + let delta = event.getDelta(); + this.node.setPosition(this.node.position.x+delta.x,this.node.position.y+delta.y); + this.show_info() + } + show_info(uuid:number,card_type:number){ + console.log("show_info",this.card_uid) + let parent = this.node.parent.parent + let node =parent.getChildByName("item_box") + if(this.card_type == 2){ + smc.vm_data.item_box.info = SkillSet[this.card_uid].info + smc.vm_data.item_box.name = SkillSet[this.card_uid].name + smc.vm_data.item_box.skillcd = SkillSet[this.card_uid].cd + smc.vm_data.item_box.skillsd = SkillSet[this.card_uid].sd + smc.vm_data.item_box.atk = SkillSet[this.card_uid].atk + smc.vm_data.item_box.hp = SkillSet[this.card_uid].hp + node.active=true + } + if(this.card_type == 3){ + console.log(SkillSet[this.card_uid]) + smc.vm_data.item_box.info = SkillSet[this.card_uid].info + smc.vm_data.item_box.name = SkillSet[this.card_uid].name + smc.vm_data.item_box.skillcd = SkillSet[this.card_uid].cd + smc.vm_data.item_box.skillsd = SkillSet[this.card_uid].sd + smc.vm_data.item_box.atk = SkillSet[this.card_uid].atk + smc.vm_data.item_box.hp = SkillSet[this.card_uid].hp + smc.vm_data.item_box.shield = SkillSet[this.card_uid].shield + node.active=true + if(SkillSet[this.card_uid].shield > 0){ + node.getChildByName("data").getChildByName("shield").active=true + } + if(SkillSet[this.card_uid].hp > 0){ + node.getChildByName("data").getChildByName("hp").active=true + } + } + } + onTouchEnd(){ + if(this.node.position.y-this.pos_y > 150){ + this.use_card() + }else{ + this.node.setPosition(this.pos_x,this.pos_y); + } + let parent = this.node.parent.parent + let node = parent.getChildByName("item_box") + node.active=false + node.getChildByName("data").getChildByName("shield").active=false + node.getChildByName("data").getChildByName("hp").active=false + + } + update(deltaTime: number) { + + } +} + + diff --git a/assets/script/game/gui/InfoBox.ts.meta b/assets/script/game/gui/ShowInfoCom.ts.meta similarity index 70% rename from assets/script/game/gui/InfoBox.ts.meta rename to assets/script/game/gui/ShowInfoCom.ts.meta index b726dffc..84fc7c65 100644 --- a/assets/script/game/gui/InfoBox.ts.meta +++ b/assets/script/game/gui/ShowInfoCom.ts.meta @@ -2,7 +2,7 @@ "ver": "4.0.23", "importer": "typescript", "imported": true, - "uuid": "b64b5d93-6a68-402a-a7ab-bf89db4a153b", + "uuid": "d612b0f7-dcf2-499a-993f-8b42291faa18", "files": [], "subMetas": {}, "userData": {} diff --git a/assets/script/game/map/CardController.ts b/assets/script/game/map/CardController.ts index 4635ff37..8aba02a4 100644 --- a/assets/script/game/map/CardController.ts +++ b/assets/script/game/map/CardController.ts @@ -1,4 +1,4 @@ -import { _decorator,Label,resources,Sprite,SpriteAtlas,v3 } from "cc"; +import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources,Sprite,SpriteAtlas,v3 } from "cc"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { smc } from "../common/SingletonModuleComp"; @@ -7,20 +7,83 @@ import { HeroCard } from "../monster/HeroCard"; import { HeroCardViewComp } from "../monster/HeroCardViewComp"; import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager"; import { CardList } from "../common/config/CardSet"; +import { HeroModelComp } from "../monster/HeroModelComp"; +import { SkillSet } from "../common/config/SkillSet"; const { ccclass, property } = _decorator; /** 视图层对象 */ @ccclass('CardControllerComp') @ecs.register('CardController', false) export class CardControllerComp extends CCComp { + + + card_level:number = 1; in_load:boolean = false - card1:any ={x:0,y:0,uuid:1101,type:1,active:false} - card2:any ={x:0,y:0,uuid:1102,type:1,active:false} - card3:any ={x:0,y:0,uuid:1103,type:1,active:false} - card4:any ={x:0,y:0,uuid:1104,type:1,active:false} - card5:any ={x:0,y:0,uuid:1105,type:1,active:false} - card6:any ={x:0,y:0,uuid:1106,type:1,active:false} + + cards:any = { + 1:{uuid:1101,type:1,alive:false}, + 2:{uuid:1102,type:1,alive:false}, + 3:{uuid:1103,type:1,alive:false}, + 4:{uuid:1104,type:1,alive:false}, + 5:{uuid:1105,type:1,alive:false}, + 6:{uuid:1106,type:1,alive:false}, + } + protected onLoad(): void { + let card1 = this.node.getChildByName("cards").getChildByName("card1"); + let card2 = this.node.getChildByName("cards").getChildByName("card2"); + let card3 = this.node.getChildByName("cards").getChildByName("card3"); + let card4 = this.node.getChildByName("cards").getChildByName("card4"); + let card5 = this.node.getChildByName("cards").getChildByName("card5"); + let card6 = this.node.getChildByName("cards").getChildByName("card6"); + // info_button.on(NodeEventType.TOUCH_START, this.onTouchMove, this); + // info_button.on(NodeEventType.TOUCH_MOVE, this.onTouchMove, this); + card1.on(NodeEventType.TOUCH_START, this.touch1, this); + card1.on(NodeEventType.TOUCH_MOVE, this.touch1, this); + card2.on(NodeEventType.TOUCH_START, this.touch2, this); + card2.on(NodeEventType.TOUCH_MOVE, this.touch2, this); + card3.on(NodeEventType.TOUCH_START, this.touch3, this); + card3.on(NodeEventType.TOUCH_MOVE, this.touch3, this); + card4.on(NodeEventType.TOUCH_START, this.touch4, this); + card4.on(NodeEventType.TOUCH_MOVE, this.touch4, this); + card5.on(NodeEventType.TOUCH_START, this.touch5, this); + card5.on(NodeEventType.TOUCH_MOVE, this.touch5, this); + card6.on(NodeEventType.TOUCH_START, this.touch6, this); + card6.on(NodeEventType.TOUCH_MOVE, this.touch6, this); + + card1.on(NodeEventType.TOUCH_END, this.onTouchEnd, this); + card1.on(NodeEventType.TOUCH_CANCEL, this.onTouchEnd, this); + card2.on(NodeEventType.TOUCH_END, this.onTouchEnd, this); + card2.on(NodeEventType.TOUCH_CANCEL, this.onTouchEnd, this); + card3.on(NodeEventType.TOUCH_END, this.onTouchEnd, this); + card3.on(NodeEventType.TOUCH_CANCEL, this.onTouchEnd, this); + card4.on(NodeEventType.TOUCH_END, this.onTouchEnd, this); + card4.on(NodeEventType.TOUCH_CANCEL, this.onTouchEnd, this); + card5.on(NodeEventType.TOUCH_END, this.onTouchEnd, this); + card5.on(NodeEventType.TOUCH_CANCEL, this.onTouchEnd, this); + card6.on(NodeEventType.TOUCH_END, this.onTouchEnd, this); + card6.on(NodeEventType.TOUCH_CANCEL, this.onTouchEnd, this); + + const clickEventHandler = new EventHandler(); + clickEventHandler.target = this.node; // 这个 node 节点是你的事件处理代码组件所属的节点 + clickEventHandler.component = 'CardControllerComp';// 这个是脚本类名 + clickEventHandler.handler = 'user_card'; + clickEventHandler.customEventData = 'foobar'; + + const button1 = this.node.getChildByName('cards').getChildByName('card1').getComponent(Button); + const button2 = this.node.getChildByName('cards').getChildByName('card2').getComponent(Button); + const button3 = this.node.getChildByName('cards').getChildByName('card3').getComponent(Button); + const button4 = this.node.getChildByName('cards').getChildByName('card4').getComponent(Button); + const button5 = this.node.getChildByName('cards').getChildByName('card5').getComponent(Button); + const button6 = this.node.getChildByName('cards').getChildByName('card6').getComponent(Button); + button1.clickEvents.push(clickEventHandler); + button2.clickEvents.push(clickEventHandler); + button3.clickEvents.push(clickEventHandler); + button4.clickEvents.push(clickEventHandler); + button5.clickEvents.push(clickEventHandler); + button6.clickEvents.push(clickEventHandler); + + } start() { this.load_cards() // var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象 @@ -34,6 +97,65 @@ export class CardControllerComp extends CCComp { // break; // } // } + touch1(event: EventTouch) { + console.log("touch 1"); + } + + touch2(event: EventTouch) { + console.log("touch 2"); + } + + touch3(event: EventTouch) { + console.log("touch 3"); + } + + touch4(event: EventTouch) { + console.log("touch 4"); + } + + touch5(event: EventTouch) { + console.log("touch 5"); + } + + touch6(event: EventTouch) { + console.log("touch 6"); + } + show_info(uuid:number,type:number){ + console.log("show_info",uuid) + let node =this.node.getChildByName("item_box") + if(type == 2){ + smc.vm_data.item_box.info = SkillSet[uuid].info + smc.vm_data.item_box.name = SkillSet[uuid].name + smc.vm_data.item_box.skillcd = SkillSet[uuid].cd + smc.vm_data.item_box.skillsd = SkillSet[uuid].sd + smc.vm_data.item_box.atk = SkillSet[uuid].atk + smc.vm_data.item_box.hp = SkillSet[uuid].hp + node.active=true + } + if(type == 3){ + console.log(SkillSet[uuid]) + smc.vm_data.item_box.info = SkillSet[uuid].info + smc.vm_data.item_box.name = SkillSet[uuid].name + smc.vm_data.item_box.skillcd = SkillSet[uuid].cd + smc.vm_data.item_box.skillsd = SkillSet[uuid].sd + smc.vm_data.item_box.atk = SkillSet[uuid].atk + smc.vm_data.item_box.hp = SkillSet[uuid].hp + smc.vm_data.item_box.shield = SkillSet[uuid].shield + node.active=true + if(SkillSet[uuid].shield > 0){ + node.getChildByName("data").getChildByName("shield").active=true + } + if(SkillSet[uuid].hp > 0){ + node.getChildByName("data").getChildByName("hp").active=true + } + } + } + onTouchEnd(){ + let node = this.node.getChildByName("item_box") + node.active=false + node.getChildByName("data").getChildByName("shield").active=false + node.getChildByName("data").getChildByName("hp").active=false + } shuaxin(dt: number) { smc.vm_data.shuaxin.min += smc.vm_data.shuaxin.speed*dt; if (smc.vm_data.shuaxin.min >= smc.vm_data.shuaxin.max) { @@ -78,15 +200,14 @@ export class CardControllerComp extends CCComp { if(smc.vm_data.shuaxin.min <=0 ){ smc.vm_data.shuaxin.min = 0 } - } load_cards() { this.in_load = true let card:any=null for (let index = 1; index <= 6; index++) { card=RandomManager.instance.getRandomByObjectList(CardList, 1); - this['card'+index].uuid=card[0].uuid - this['card'+index].type=card[0].type + this.cards[index].uuid=card[0].uuid + this.cards[index].type=card[0].type let url: string = ""; let pathName: string = ""; let name: string = ""; @@ -115,13 +236,52 @@ export class CardControllerComp extends CCComp { const sprite = node.getChildByName("item").getComponent(Sprite); sprite.spriteFrame = atlas.getSpriteFrame(pathName); }); - this['card'+index].active=true + this.cards[index].alive=true } - - + // console.log("cards:",this.cards) + this.in_load = false } load_card(){ + } + + use_card(event:Event,index: number){ + this.cards[index].alive=false + this.check_card(index) + console.log("cards:",this.cards) + } + check_card(index:number){ + let heros = ecs.query(ecs.allOf(HeroModelComp)) + // let heross= ecs.query(ecs.allOf(MonsterViewComp)) + // console.log("heross",heross) + if(heros.length >= 4&&this.cards[index].type == 1){ + oops.gui.toast("英雄数量达到上限"); + return; + } + if(smc.vm_data.gold.min >= this.card_level){ + this.cards[index].alive=false + this.do_use_card(index) + smc.vm_data.gold.min -= this.card_level; + }else{ + oops.gui.toast("金币不够"); + + } + } + do_use_card(index:number){ + switch (this.cards[index].type) { + case 1: + oops.message.dispatchEvent("do_add_hero", { uuid: this.cards[index].uuid }); + break; + case 2: + oops.message.dispatchEvent("do_use_skill", { uuid: this.cards[index].uuid }); + break; + case 3: + oops.message.dispatchEvent("do_use_skill", { uuid: this.cards[index].uuid }); + break; + default: + break; + } + } protected update(dt: number): void { this.shuaxin(dt) diff --git a/assets/script/game/monster/HeroCardViewComp.ts b/assets/script/game/monster/HeroCardViewComp.ts index d04b7f1b..1dab8150 100644 --- a/assets/script/game/monster/HeroCardViewComp.ts +++ b/assets/script/game/monster/HeroCardViewComp.ts @@ -11,7 +11,6 @@ import { Hero } from "./Hero"; import { MonsterViewComp } from "./MonsterViewComp"; import { MapMonsterComp } from "../map/MapMonsterComp"; import { MapSkillComp } from "../map/MapSkillComp"; -import { InfoBox } from "../gui/InfoBox"; const { ccclass, property } = _decorator; /** 视图层对象 */