From 501a1e0703e8e6e74bf68d1b148a75b66b7e2d90 Mon Sep 17 00:00:00 2001 From: pan Date: Tue, 28 Jul 2026 16:45:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(hero=20box):=20=E6=B7=BB=E5=8A=A0=E8=8B=B1?= =?UTF-8?q?=E9=9B=84=E9=9D=A2=E6=9D=BF=E7=A9=BA=E6=A7=BD=E4=BD=8D=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增GameEvent.HeroBoxEmptyClick事件用于空槽位点击通知 2. 为HeroBoxComp添加空槽位节点和点击回调,播放点击动画并派发事件 3. 在MissionCardComp中注册该事件,点击时打开英雄卡池选择界面 4. 完善空槽位的显示/隐藏逻辑 --- assets/resources/gui/element/herobox.prefab | 841 +++++++++++------- assets/script/game/common/config/GameEvent.ts | 1 + assets/script/game/map/HeroBoxComp.ts | 39 +- assets/script/game/map/MissionCardComp.ts | 7 + 4 files changed, 559 insertions(+), 329 deletions(-) diff --git a/assets/resources/gui/element/herobox.prefab b/assets/resources/gui/element/herobox.prefab index 21280676..54b72568 100644 --- a/assets/resources/gui/element/herobox.prefab +++ b/assets/resources/gui/element/herobox.prefab @@ -40,23 +40,23 @@ "__id__": 165 }, { - "__id__": 417 + "__id__": 433 } ], "_active": true, "_components": [ { - "__id__": 448 + "__id__": 466 }, { - "__id__": 450 + "__id__": 468 }, { - "__id__": 452 + "__id__": 470 } ], "_prefab": { - "__id__": 608 + "__id__": 626 }, "_lpos": { "__type__": "cc.Vec3", @@ -3039,23 +3039,23 @@ "_active": true, "_components": [ { - "__id__": 406 + "__id__": 422 }, { - "__id__": 408 + "__id__": 424 }, { - "__id__": 410 + "__id__": 426 }, { - "__id__": 412 + "__id__": 428 }, { - "__id__": 414 + "__id__": 430 } ], "_prefab": { - "__id__": 416 + "__id__": 432 }, "_lpos": { "__type__": "cc.Vec3", @@ -8414,17 +8414,17 @@ "_active": true, "_components": [ { - "__id__": 399 + "__id__": 415 }, { - "__id__": 401 + "__id__": 417 }, { - "__id__": 403 + "__id__": 419 } ], "_prefab": { - "__id__": 405 + "__id__": 421 }, "_lpos": { "__type__": "cc.Vec3", @@ -8505,6 +8505,30 @@ }, { "__id__": 398 + }, + { + "__id__": 399 + }, + { + "__id__": 401 + }, + { + "__id__": 403 + }, + { + "__id__": 405 + }, + { + "__id__": 407 + }, + { + "__id__": 409 + }, + { + "__id__": 411 + }, + { + "__id__": 413 } ], "removedComponents": [] @@ -8539,7 +8563,7 @@ "__id__": 383 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 389 @@ -8553,7 +8577,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": 0, + "x": -33.301, "y": 0, "z": 0 }, @@ -8594,8 +8618,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 42.255859375, - "height": 50.4 + "width": 40.85043216805802, + "height": 52.4 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -8630,11 +8654,11 @@ "b": 255, "a": 255 }, - "_string": "label", + "_string": "Lv.1", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 20, - "_fontSize": 20, + "_actualFontSize": 18, + "_fontSize": 18, "_fontFamily": "Arial", "_lineHeight": 40, "_overflow": 0, @@ -8642,12 +8666,12 @@ "_font": null, "_isSystemFontUsed": true, "_spacingX": 0, - "_isItalic": false, - "_isBold": false, + "_isItalic": true, + "_isBold": true, "_isUnderline": false, "_underlineHeight": 2, "_cacheMode": 0, - "_enableOutline": false, + "_enableOutline": true, "_outlineColor": { "__type__": "cc.Color", "r": 0, @@ -8655,7 +8679,7 @@ "b": 0, "a": 255 }, - "_outlineWidth": 2, + "_outlineWidth": 1, "_enableShadow": false, "_shadowColor": { "__type__": "cc.Color", @@ -8751,6 +8775,143 @@ "z": 0 } }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 400 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "a7NewBPJZFfYJJGXS6bc5V" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 402 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "809Fde6TRKg5cIVi8Ex+Ls" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 404 + }, + "propertyPath": [ + "_active" + ], + "value": true + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "c4TcyZK4hC/Iw1wsFwSs4B" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 406 + }, + "propertyPath": [ + "_active" + ], + "value": false + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "87ufdc6N5KFZXxw59uUgi3" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 408 + }, + "propertyPath": [ + "_string" + ], + "value": "天赋" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "59l0nV9VVLCI2/EidvW4Me" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 410 + }, + "propertyPath": [ + "_contentSize" + ], + "value": { + "__type__": "cc.Size", + "width": 30, + "height": 26.46 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "26ylZ0Y/VPv6KMBavr69rs" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 412 + }, + "propertyPath": [ + "_left" + ], + "value": 10 + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "7d40o213FNOa8/1Sug6CZL" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 414 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": -75, + "y": 0, + "z": 0 + } + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "1866cg+2xFI5dnowlaw71s" + ] + }, { "__type__": "cc.UITransform", "_name": "", @@ -8761,7 +8922,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 400 + "__id__": 416 }, "_contentSize": { "__type__": "cc.Size", @@ -8789,7 +8950,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 402 + "__id__": 418 }, "_alignFlags": 40, "_target": null, @@ -8825,7 +8986,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 404 + "__id__": 420 }, "_resizeMode": 1, "_layoutType": 2, @@ -8876,7 +9037,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 407 + "__id__": 423 }, "_contentSize": { "__type__": "cc.Size", @@ -8904,7 +9065,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 409 + "__id__": 425 }, "_type": 0, "_inverted": false, @@ -8926,7 +9087,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 411 + "__id__": 427 }, "_alignFlags": 45, "_target": null, @@ -8962,7 +9123,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 413 + "__id__": 429 }, "_resizeMode": 0, "_layoutType": 2, @@ -9000,7 +9161,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 415 + "__id__": 431 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -9059,23 +9220,26 @@ }, "_children": [ { - "__id__": 418 + "__id__": 434 }, { - "__id__": 437 + "__id__": 453 } ], "_active": false, "_components": [ { - "__id__": 443 + "__id__": 459 }, { - "__id__": 445 + "__id__": 461 + }, + { + "__id__": 463 } ], "_prefab": { - "__id__": 447 + "__id__": 465 }, "_lpos": { "__type__": "cc.Vec3", @@ -9110,17 +9274,17 @@ "__type__": "cc.Node", "_objFlags": 0, "_parent": { - "__id__": 417 + "__id__": 433 }, "_prefab": { - "__id__": 419 + "__id__": 435 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 418 + "__id__": 434 }, "asset": { "__uuid__": "b8282f33-ab04-44c5-b349-4bdc291374e6", @@ -9128,7 +9292,7 @@ }, "fileId": "53+ryxPCZCH4lnXIdDcAFq", "instance": { - "__id__": 420 + "__id__": 436 }, "targetOverrides": null }, @@ -9142,37 +9306,37 @@ "mountedComponents": [], "propertyOverrides": [ { - "__id__": 421 + "__id__": 437 }, { - "__id__": 423 + "__id__": 439 }, { - "__id__": 424 + "__id__": 440 }, { - "__id__": 425 + "__id__": 441 }, { - "__id__": 426 + "__id__": 442 }, { - "__id__": 428 + "__id__": 444 }, { - "__id__": 430 + "__id__": 446 }, { - "__id__": 432 + "__id__": 448 }, { - "__id__": 434 + "__id__": 450 }, { - "__id__": 435 + "__id__": 451 }, { - "__id__": 436 + "__id__": 452 } ], "removedComponents": [] @@ -9180,7 +9344,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 422 + "__id__": 438 }, "propertyPath": [ "_name" @@ -9196,7 +9360,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 422 + "__id__": 438 }, "propertyPath": [ "_lpos" @@ -9211,7 +9375,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 422 + "__id__": 438 }, "propertyPath": [ "_lrot" @@ -9227,7 +9391,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 422 + "__id__": 438 }, "propertyPath": [ "_euler" @@ -9242,7 +9406,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 427 + "__id__": 443 }, "propertyPath": [ "_contentSize" @@ -9262,7 +9426,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 429 + "__id__": 445 }, "propertyPath": [ "_contentSize" @@ -9282,7 +9446,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 431 + "__id__": 447 }, "propertyPath": [ "_contentSize" @@ -9302,7 +9466,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 433 + "__id__": 449 }, "propertyPath": [ "_left" @@ -9318,7 +9482,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 433 + "__id__": 449 }, "propertyPath": [ "_right" @@ -9328,7 +9492,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 433 + "__id__": 449 }, "propertyPath": [ "_top" @@ -9338,7 +9502,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 433 + "__id__": 449 }, "propertyPath": [ "_bottom" @@ -9351,20 +9515,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 417 + "__id__": 433 }, "_children": [], "_active": true, "_components": [ { - "__id__": 438 + "__id__": 454 }, { - "__id__": 440 + "__id__": 456 } ], "_prefab": { - "__id__": 442 + "__id__": 458 }, "_lpos": { "__type__": "cc.Vec3", @@ -9401,11 +9565,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 437 + "__id__": 453 }, "_enabled": true, "__prefab": { - "__id__": 439 + "__id__": 455 }, "_contentSize": { "__type__": "cc.Size", @@ -9429,11 +9593,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 437 + "__id__": 453 }, "_enabled": true, "__prefab": { - "__id__": 441 + "__id__": 457 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -9487,11 +9651,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 417 + "__id__": 433 }, "_enabled": true, "__prefab": { - "__id__": 444 + "__id__": 460 }, "_contentSize": { "__type__": "cc.Size", @@ -9515,11 +9679,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 417 + "__id__": 433 }, "_enabled": true, "__prefab": { - "__id__": 446 + "__id__": 462 }, "_alignFlags": 45, "_target": null, @@ -9545,6 +9709,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "4d45xbc1tBBoKruF7gEz8P" }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 433 + }, + "_enabled": true, + "__prefab": { + "__id__": 464 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "dcSNN9KkpMrpSjXjK86+dV" + }, { "__type__": "cc.PrefabInfo", "root": { @@ -9568,7 +9750,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 449 + "__id__": 467 }, "_contentSize": { "__type__": "cc.Size", @@ -9596,7 +9778,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 451 + "__id__": 469 }, "_alignFlags": 0, "_target": null, @@ -9632,13 +9814,13 @@ }, "_enabled": true, "__prefab": { - "__id__": 453 + "__id__": 471 }, "icon_node": { - "__id__": 454 + "__id__": 472 }, "bg_node": { - "__id__": 494 + "__id__": 512 }, "name_label": { "__id__": 88 @@ -9646,6 +9828,9 @@ "level_label": { "__id__": 391 }, + "noHero": { + "__id__": 433 + }, "ap_all_label": { "__id__": 109 }, @@ -9739,20 +9924,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 455 + "__id__": 473 }, "_children": [], "_active": true, "_components": [ { - "__id__": 489 + "__id__": 507 }, { - "__id__": 491 + "__id__": 509 } ], "_prefab": { - "__id__": 493 + "__id__": 511 }, "_lpos": { "__type__": "cc.Vec3", @@ -9792,39 +9977,39 @@ "__id__": 27 }, "_children": [ - { - "__id__": 456 - }, - { - "__id__": 454 - }, - { - "__id__": 462 - }, - { - "__id__": 468 - }, { "__id__": 474 + }, + { + "__id__": 472 + }, + { + "__id__": 480 + }, + { + "__id__": 486 + }, + { + "__id__": 492 } ], "_active": true, "_components": [ { - "__id__": 480 + "__id__": 498 }, { - "__id__": 482 + "__id__": 500 }, { - "__id__": 484 + "__id__": 502 }, { - "__id__": 486 + "__id__": 504 } ], "_prefab": { - "__id__": 488 + "__id__": 506 }, "_lpos": { "__type__": "cc.Vec3", @@ -9861,20 +10046,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 455 + "__id__": 473 }, "_children": [], "_active": true, "_components": [ { - "__id__": 457 + "__id__": 475 }, { - "__id__": 459 + "__id__": 477 } ], "_prefab": { - "__id__": 461 + "__id__": 479 }, "_lpos": { "__type__": "cc.Vec3", @@ -9911,11 +10096,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 456 + "__id__": 474 }, "_enabled": true, "__prefab": { - "__id__": 458 + "__id__": 476 }, "_contentSize": { "__type__": "cc.Size", @@ -9939,11 +10124,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 456 + "__id__": 474 }, "_enabled": true, "__prefab": { - "__id__": 460 + "__id__": 478 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -9997,20 +10182,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 455 + "__id__": 473 }, "_children": [], "_active": false, "_components": [ { - "__id__": 463 + "__id__": 481 }, { - "__id__": 465 + "__id__": 483 } ], "_prefab": { - "__id__": 467 + "__id__": 485 }, "_lpos": { "__type__": "cc.Vec3", @@ -10047,11 +10232,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 462 + "__id__": 480 }, "_enabled": true, "__prefab": { - "__id__": 464 + "__id__": 482 }, "_contentSize": { "__type__": "cc.Size", @@ -10075,11 +10260,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 462 + "__id__": 480 }, "_enabled": true, "__prefab": { - "__id__": 466 + "__id__": 484 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10133,20 +10318,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 455 + "__id__": 473 }, "_children": [], "_active": false, "_components": [ { - "__id__": 469 + "__id__": 487 }, { - "__id__": 471 + "__id__": 489 } ], "_prefab": { - "__id__": 473 + "__id__": 491 }, "_lpos": { "__type__": "cc.Vec3", @@ -10183,11 +10368,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 468 + "__id__": 486 }, "_enabled": true, "__prefab": { - "__id__": 470 + "__id__": 488 }, "_contentSize": { "__type__": "cc.Size", @@ -10211,11 +10396,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 468 + "__id__": 486 }, "_enabled": true, "__prefab": { - "__id__": 472 + "__id__": 490 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10269,20 +10454,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 455 + "__id__": 473 }, "_children": [], "_active": false, "_components": [ { - "__id__": 475 + "__id__": 493 }, { - "__id__": 477 + "__id__": 495 } ], "_prefab": { - "__id__": 479 + "__id__": 497 }, "_lpos": { "__type__": "cc.Vec3", @@ -10319,11 +10504,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 474 + "__id__": 492 }, "_enabled": true, "__prefab": { - "__id__": 476 + "__id__": 494 }, "_contentSize": { "__type__": "cc.Size", @@ -10347,11 +10532,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 474 + "__id__": 492 }, "_enabled": true, "__prefab": { - "__id__": 478 + "__id__": 496 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10405,11 +10590,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 455 + "__id__": 473 }, "_enabled": true, "__prefab": { - "__id__": 481 + "__id__": 499 }, "_contentSize": { "__type__": "cc.Size", @@ -10433,11 +10618,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 455 + "__id__": 473 }, "_enabled": true, "__prefab": { - "__id__": 483 + "__id__": 501 }, "_type": 0, "_inverted": false, @@ -10455,11 +10640,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 455 + "__id__": 473 }, "_enabled": true, "__prefab": { - "__id__": 485 + "__id__": 503 }, "_alignFlags": 45, "_target": null, @@ -10491,11 +10676,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 455 + "__id__": 473 }, "_enabled": true, "__prefab": { - "__id__": 487 + "__id__": 505 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10550,11 +10735,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 454 + "__id__": 472 }, "_enabled": true, "__prefab": { - "__id__": 490 + "__id__": 508 }, "_contentSize": { "__type__": "cc.Size", @@ -10578,11 +10763,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 454 + "__id__": 472 }, "_enabled": true, "__prefab": { - "__id__": 492 + "__id__": 510 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10637,35 +10822,35 @@ }, "_children": [ { - "__id__": 495 + "__id__": 513 }, { - "__id__": 511 + "__id__": 529 }, { - "__id__": 527 + "__id__": 545 }, { - "__id__": 543 + "__id__": 561 }, { - "__id__": 559 + "__id__": 577 }, { - "__id__": 575 + "__id__": 593 } ], "_active": true, "_components": [ { - "__id__": 603 + "__id__": 621 }, { - "__id__": 605 + "__id__": 623 } ], "_prefab": { - "__id__": 607 + "__id__": 625 }, "_lpos": { "__type__": "cc.Vec3", @@ -10702,27 +10887,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 494 + "__id__": 512 }, "_children": [ { - "__id__": 496 + "__id__": 514 } ], "_active": true, "_components": [ { - "__id__": 504 + "__id__": 522 }, { - "__id__": 506 + "__id__": 524 }, { - "__id__": 508 + "__id__": 526 } ], "_prefab": { - "__id__": 510 + "__id__": 528 }, "_lpos": { "__type__": "cc.Vec3", @@ -10759,23 +10944,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 495 + "__id__": 513 }, "_children": [], "_active": true, "_components": [ { - "__id__": 497 + "__id__": 515 }, { - "__id__": 499 + "__id__": 517 }, { - "__id__": 501 + "__id__": 519 } ], "_prefab": { - "__id__": 503 + "__id__": 521 }, "_lpos": { "__type__": "cc.Vec3", @@ -10812,11 +10997,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 496 + "__id__": 514 }, "_enabled": true, "__prefab": { - "__id__": 498 + "__id__": 516 }, "_contentSize": { "__type__": "cc.Size", @@ -10840,11 +11025,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 496 + "__id__": 514 }, "_enabled": true, "__prefab": { - "__id__": 500 + "__id__": 518 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -10888,11 +11073,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 496 + "__id__": 514 }, "_enabled": true, "__prefab": { - "__id__": 502 + "__id__": 520 }, "_alignFlags": 45, "_target": null, @@ -10937,11 +11122,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 495 + "__id__": 513 }, "_enabled": true, "__prefab": { - "__id__": 505 + "__id__": 523 }, "_contentSize": { "__type__": "cc.Size", @@ -10965,11 +11150,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 495 + "__id__": 513 }, "_enabled": true, "__prefab": { - "__id__": 507 + "__id__": 525 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11013,11 +11198,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 495 + "__id__": 513 }, "_enabled": true, "__prefab": { - "__id__": 509 + "__id__": 527 }, "_alignFlags": 45, "_target": null, @@ -11062,27 +11247,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 494 + "__id__": 512 }, "_children": [ { - "__id__": 512 + "__id__": 530 } ], "_active": true, "_components": [ { - "__id__": 520 + "__id__": 538 }, { - "__id__": 522 + "__id__": 540 }, { - "__id__": 524 + "__id__": 542 } ], "_prefab": { - "__id__": 526 + "__id__": 544 }, "_lpos": { "__type__": "cc.Vec3", @@ -11119,23 +11304,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 511 + "__id__": 529 }, "_children": [], "_active": true, "_components": [ { - "__id__": 513 + "__id__": 531 }, { - "__id__": 515 + "__id__": 533 }, { - "__id__": 517 + "__id__": 535 } ], "_prefab": { - "__id__": 519 + "__id__": 537 }, "_lpos": { "__type__": "cc.Vec3", @@ -11172,11 +11357,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 512 + "__id__": 530 }, "_enabled": true, "__prefab": { - "__id__": 514 + "__id__": 532 }, "_contentSize": { "__type__": "cc.Size", @@ -11200,11 +11385,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 512 + "__id__": 530 }, "_enabled": true, "__prefab": { - "__id__": 516 + "__id__": 534 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11245,11 +11430,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 512 + "__id__": 530 }, "_enabled": true, "__prefab": { - "__id__": 518 + "__id__": 536 }, "_alignFlags": 45, "_target": null, @@ -11294,11 +11479,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 511 + "__id__": 529 }, "_enabled": true, "__prefab": { - "__id__": 521 + "__id__": 539 }, "_contentSize": { "__type__": "cc.Size", @@ -11322,11 +11507,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 511 + "__id__": 529 }, "_enabled": true, "__prefab": { - "__id__": 523 + "__id__": 541 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11370,11 +11555,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 511 + "__id__": 529 }, "_enabled": true, "__prefab": { - "__id__": 525 + "__id__": 543 }, "_alignFlags": 45, "_target": null, @@ -11419,27 +11604,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 494 + "__id__": 512 }, "_children": [ { - "__id__": 528 + "__id__": 546 } ], "_active": true, "_components": [ { - "__id__": 536 + "__id__": 554 }, { - "__id__": 538 + "__id__": 556 }, { - "__id__": 540 + "__id__": 558 } ], "_prefab": { - "__id__": 542 + "__id__": 560 }, "_lpos": { "__type__": "cc.Vec3", @@ -11476,23 +11661,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 527 + "__id__": 545 }, "_children": [], "_active": true, "_components": [ { - "__id__": 529 + "__id__": 547 }, { - "__id__": 531 + "__id__": 549 }, { - "__id__": 533 + "__id__": 551 } ], "_prefab": { - "__id__": 535 + "__id__": 553 }, "_lpos": { "__type__": "cc.Vec3", @@ -11529,11 +11714,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 528 + "__id__": 546 }, "_enabled": true, "__prefab": { - "__id__": 530 + "__id__": 548 }, "_contentSize": { "__type__": "cc.Size", @@ -11557,11 +11742,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 528 + "__id__": 546 }, "_enabled": true, "__prefab": { - "__id__": 532 + "__id__": 550 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11605,11 +11790,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 528 + "__id__": 546 }, "_enabled": true, "__prefab": { - "__id__": 534 + "__id__": 552 }, "_alignFlags": 45, "_target": null, @@ -11654,11 +11839,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 527 + "__id__": 545 }, "_enabled": true, "__prefab": { - "__id__": 537 + "__id__": 555 }, "_contentSize": { "__type__": "cc.Size", @@ -11682,11 +11867,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 527 + "__id__": 545 }, "_enabled": true, "__prefab": { - "__id__": 539 + "__id__": 557 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11730,11 +11915,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 527 + "__id__": 545 }, "_enabled": true, "__prefab": { - "__id__": 541 + "__id__": 559 }, "_alignFlags": 45, "_target": null, @@ -11779,27 +11964,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 494 + "__id__": 512 }, "_children": [ { - "__id__": 544 + "__id__": 562 } ], "_active": true, "_components": [ { - "__id__": 552 + "__id__": 570 }, { - "__id__": 554 + "__id__": 572 }, { - "__id__": 556 + "__id__": 574 } ], "_prefab": { - "__id__": 558 + "__id__": 576 }, "_lpos": { "__type__": "cc.Vec3", @@ -11836,23 +12021,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 543 + "__id__": 561 }, "_children": [], "_active": true, "_components": [ { - "__id__": 545 + "__id__": 563 }, { - "__id__": 547 + "__id__": 565 }, { - "__id__": 549 + "__id__": 567 } ], "_prefab": { - "__id__": 551 + "__id__": 569 }, "_lpos": { "__type__": "cc.Vec3", @@ -11889,11 +12074,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 544 + "__id__": 562 }, "_enabled": true, "__prefab": { - "__id__": 546 + "__id__": 564 }, "_contentSize": { "__type__": "cc.Size", @@ -11917,11 +12102,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 544 + "__id__": 562 }, "_enabled": true, "__prefab": { - "__id__": 548 + "__id__": 566 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -11965,11 +12150,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 544 + "__id__": 562 }, "_enabled": true, "__prefab": { - "__id__": 550 + "__id__": 568 }, "_alignFlags": 45, "_target": null, @@ -12014,11 +12199,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 543 + "__id__": 561 }, "_enabled": true, "__prefab": { - "__id__": 553 + "__id__": 571 }, "_contentSize": { "__type__": "cc.Size", @@ -12042,11 +12227,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 543 + "__id__": 561 }, "_enabled": true, "__prefab": { - "__id__": 555 + "__id__": 573 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12090,11 +12275,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 543 + "__id__": 561 }, "_enabled": true, "__prefab": { - "__id__": 557 + "__id__": 575 }, "_alignFlags": 45, "_target": null, @@ -12139,27 +12324,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 494 + "__id__": 512 }, "_children": [ { - "__id__": 560 + "__id__": 578 } ], "_active": true, "_components": [ { - "__id__": 568 + "__id__": 586 }, { - "__id__": 570 + "__id__": 588 }, { - "__id__": 572 + "__id__": 590 } ], "_prefab": { - "__id__": 574 + "__id__": 592 }, "_lpos": { "__type__": "cc.Vec3", @@ -12196,23 +12381,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 559 + "__id__": 577 }, "_children": [], "_active": true, "_components": [ { - "__id__": 561 + "__id__": 579 }, { - "__id__": 563 + "__id__": 581 }, { - "__id__": 565 + "__id__": 583 } ], "_prefab": { - "__id__": 567 + "__id__": 585 }, "_lpos": { "__type__": "cc.Vec3", @@ -12249,11 +12434,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 560 + "__id__": 578 }, "_enabled": true, "__prefab": { - "__id__": 562 + "__id__": 580 }, "_contentSize": { "__type__": "cc.Size", @@ -12277,11 +12462,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 560 + "__id__": 578 }, "_enabled": true, "__prefab": { - "__id__": 564 + "__id__": 582 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12325,11 +12510,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 560 + "__id__": 578 }, "_enabled": true, "__prefab": { - "__id__": 566 + "__id__": 584 }, "_alignFlags": 45, "_target": null, @@ -12374,11 +12559,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 559 + "__id__": 577 }, "_enabled": true, "__prefab": { - "__id__": 569 + "__id__": 587 }, "_contentSize": { "__type__": "cc.Size", @@ -12402,11 +12587,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 559 + "__id__": 577 }, "_enabled": true, "__prefab": { - "__id__": 571 + "__id__": 589 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12450,11 +12635,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 559 + "__id__": 577 }, "_enabled": true, "__prefab": { - "__id__": 573 + "__id__": 591 }, "_alignFlags": 45, "_target": null, @@ -12499,27 +12684,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 494 + "__id__": 512 }, "_children": [ { - "__id__": 576 + "__id__": 594 }, { - "__id__": 584 + "__id__": 602 }, { - "__id__": 592 + "__id__": 610 } ], "_active": false, "_components": [ { - "__id__": 600 + "__id__": 618 } ], "_prefab": { - "__id__": 602 + "__id__": 620 }, "_lpos": { "__type__": "cc.Vec3", @@ -12556,23 +12741,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 575 + "__id__": 593 }, "_children": [], "_active": true, "_components": [ { - "__id__": 577 + "__id__": 595 }, { - "__id__": 579 + "__id__": 597 }, { - "__id__": 581 + "__id__": 599 } ], "_prefab": { - "__id__": 583 + "__id__": 601 }, "_lpos": { "__type__": "cc.Vec3", @@ -12609,11 +12794,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 576 + "__id__": 594 }, "_enabled": true, "__prefab": { - "__id__": 578 + "__id__": 596 }, "_contentSize": { "__type__": "cc.Size", @@ -12637,11 +12822,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 576 + "__id__": 594 }, "_enabled": true, "__prefab": { - "__id__": 580 + "__id__": 598 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12682,11 +12867,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 576 + "__id__": 594 }, "_enabled": true, "__prefab": { - "__id__": 582 + "__id__": 600 }, "_alignFlags": 45, "_target": null, @@ -12731,23 +12916,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 575 + "__id__": 593 }, "_children": [], "_active": true, "_components": [ { - "__id__": 585 + "__id__": 603 }, { - "__id__": 587 + "__id__": 605 }, { - "__id__": 589 + "__id__": 607 } ], "_prefab": { - "__id__": 591 + "__id__": 609 }, "_lpos": { "__type__": "cc.Vec3", @@ -12784,11 +12969,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 584 + "__id__": 602 }, "_enabled": true, "__prefab": { - "__id__": 586 + "__id__": 604 }, "_contentSize": { "__type__": "cc.Size", @@ -12812,11 +12997,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 584 + "__id__": 602 }, "_enabled": true, "__prefab": { - "__id__": 588 + "__id__": 606 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -12857,11 +13042,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 584 + "__id__": 602 }, "_enabled": true, "__prefab": { - "__id__": 590 + "__id__": 608 }, "_alignFlags": 45, "_target": null, @@ -12906,23 +13091,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 575 + "__id__": 593 }, "_children": [], "_active": true, "_components": [ { - "__id__": 593 + "__id__": 611 }, { - "__id__": 595 + "__id__": 613 }, { - "__id__": 597 + "__id__": 615 } ], "_prefab": { - "__id__": 599 + "__id__": 617 }, "_lpos": { "__type__": "cc.Vec3", @@ -12959,11 +13144,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 592 + "__id__": 610 }, "_enabled": true, "__prefab": { - "__id__": 594 + "__id__": 612 }, "_contentSize": { "__type__": "cc.Size", @@ -12987,11 +13172,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 592 + "__id__": 610 }, "_enabled": true, "__prefab": { - "__id__": 596 + "__id__": 614 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -13032,11 +13217,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 592 + "__id__": 610 }, "_enabled": true, "__prefab": { - "__id__": 598 + "__id__": 616 }, "_alignFlags": 45, "_target": null, @@ -13081,11 +13266,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 575 + "__id__": 593 }, "_enabled": true, "__prefab": { - "__id__": 601 + "__id__": 619 }, "_contentSize": { "__type__": "cc.Size", @@ -13122,11 +13307,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 494 + "__id__": 512 }, "_enabled": true, "__prefab": { - "__id__": 604 + "__id__": 622 }, "_contentSize": { "__type__": "cc.Size", @@ -13150,11 +13335,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 494 + "__id__": 512 }, "_enabled": true, "__prefab": { - "__id__": 606 + "__id__": 624 }, "_alignFlags": 45, "_target": null, @@ -13205,21 +13390,21 @@ "instance": null, "targetOverrides": [ { - "__id__": 609 + "__id__": 627 }, { - "__id__": 611 + "__id__": 629 }, { - "__id__": 613 + "__id__": 631 }, { - "__id__": 615 + "__id__": 633 } ], "nestedPrefabInstanceRoots": [ { - "__id__": 418 + "__id__": 434 }, { "__id__": 383 @@ -13246,7 +13431,7 @@ "__id__": 27 }, "targetInfo": { - "__id__": 610 + "__id__": 628 } }, { @@ -13258,7 +13443,7 @@ { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 452 + "__id__": 470 }, "sourceInfo": null, "propertyPath": [ @@ -13268,7 +13453,7 @@ "__id__": 27 }, "targetInfo": { - "__id__": 612 + "__id__": 630 } }, { @@ -13280,7 +13465,7 @@ { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 452 + "__id__": 470 }, "sourceInfo": null, "propertyPath": [ @@ -13290,7 +13475,7 @@ "__id__": 27 }, "targetInfo": { - "__id__": 614 + "__id__": 632 } }, { @@ -13302,7 +13487,7 @@ { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 452 + "__id__": 470 }, "sourceInfo": null, "propertyPath": [ @@ -13312,7 +13497,7 @@ "__id__": 383 }, "targetInfo": { - "__id__": 616 + "__id__": 634 } }, { diff --git a/assets/script/game/common/config/GameEvent.ts b/assets/script/game/common/config/GameEvent.ts index 364da71f..316a58d8 100644 --- a/assets/script/game/common/config/GameEvent.ts +++ b/assets/script/game/common/config/GameEvent.ts @@ -84,5 +84,6 @@ export enum GameEvent { RemoveSkillBox = "RemoveSkillBox", // 技能盒销毁事件 UseEquipCard = "UseEquipCard", // 装备卡购买使用事件 RemoveEquipBox = "RemoveEquipBox", // 装备盒销毁事件 + HeroBoxEmptyClick = "HeroBoxEmptyClick", // 英雄面板空槽位点击事件(展示英雄卡池) } diff --git a/assets/script/game/map/HeroBoxComp.ts b/assets/script/game/map/HeroBoxComp.ts index f467d967..bad0090b 100644 --- a/assets/script/game/map/HeroBoxComp.ts +++ b/assets/script/game/map/HeroBoxComp.ts @@ -12,10 +12,11 @@ * - HeroInfo(heroSet)—— 英雄静态配置 */ import { mLogger } from "../common/Logger"; -import { _decorator, Node, Sprite, Label, resources, AnimationClip, SpriteFrame, NodeEventType, UITransform } from "cc"; +import { _decorator, Node, Sprite, Label, resources, AnimationClip, SpriteFrame, NodeEventType, UITransform, Tween, tween, Vec3 } 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 { oops } from "db://oops-framework/core/Oops"; +import { GameEvent } from "../common/config/GameEvent"; import { HeroInfo } from "../common/config/heroSet"; import { HeroAttrsComp } from "../hero/HeroAttrsComp"; import { getLvColor } from "../common/config/GameSet"; @@ -47,6 +48,10 @@ export class HeroBoxComp extends CCComp { @property(Label) private level_label: Label = null; + /** 空槽位标识节点(未绑定英雄时激活,点击打开英雄卡池) */ + @property(Node) + private noHero: Node = null; + // ======================== 战斗信息标签(总值 + 附加值) ======================== /** 攻击总值 */ @@ -159,12 +164,37 @@ export class HeroBoxComp extends CCComp { // 次级属性栏默认收起 this.setMoreRowsVisible(false); this.more_btn?.on(NodeEventType.TOUCH_END, this.onMoreBtnClick, this); + // 空槽位点击 → 打开英雄卡池 + this.noHero?.on(NodeEventType.TOUCH_END, this.onNoHeroClick, this); } onDestroy() { if (this.more_btn && this.more_btn.isValid) { this.more_btn.off(NodeEventType.TOUCH_END, this.onMoreBtnClick, this); } + if (this.noHero && this.noHero.isValid) { + this.noHero.off(NodeEventType.TOUCH_END, this.onNoHeroClick, this); + } + } + + /** + * 空槽位点击:播放主节点点击动画,并派发事件通知 MissionCardComp 展示英雄卡池。 + */ + private onNoHeroClick() { + oops.audio.playEffect("music/button"); + this.playClickAnim(); + oops.message.dispatchEvent(GameEvent.HeroBoxEmptyClick); + } + + /** 主节点点击动画:缩放按下 → 回弹 */ + private playClickAnim() { + if (!this.node || !this.node.isValid) return; + Tween.stopAllByTarget(this.node); + this.node.setScale(1, 1, 1); + tween(this.node) + .to(0.06, { scale: new Vec3(0.94, 0.94, 1) }) + .to(0.1, { scale: new Vec3(1, 1, 1) }) + .start(); } /** 刷新计时累计(降频刷新实时属性) */ @@ -254,6 +284,9 @@ export class HeroBoxComp extends CCComp { this.eid = eid; this.model = model; this.node.active = true; + if (this.noHero && this.noHero.isValid) { + this.noHero.active = false; + } this.refresh(); } @@ -264,6 +297,10 @@ export class HeroBoxComp extends CCComp { this.iconHeroUuid = 0; this.iconVisualToken += 1; + if (this.noHero && this.noHero.isValid) { + this.noHero.active = true; + } + if (this.name_label && this.name_label.isValid) { this.name_label.string = ""; } diff --git a/assets/script/game/map/MissionCardComp.ts b/assets/script/game/map/MissionCardComp.ts index 6c503db8..800d1e54 100644 --- a/assets/script/game/map/MissionCardComp.ts +++ b/assets/script/game/map/MissionCardComp.ts @@ -388,6 +388,7 @@ export class MissionCardComp extends CCComp { oops.message.on(GameEvent.UseSpecialCard, this.onUseSpecialCard, this); oops.message.on(GameEvent.ShowSmallTip, this.onShowSmallTip, this); oops.message.on(GameEvent.CardUsed, this.onCardUsed, this); + oops.message.on(GameEvent.HeroBoxEmptyClick, this.onHeroBoxEmptyClick, this); /** 按钮触控事件:抽卡 */ this.cards_chou?.on(NodeEventType.TOUCH_START, this.onDrawTouchStart, this); @@ -629,6 +630,7 @@ export class MissionCardComp extends CCComp { oops.message.off(GameEvent.UseSpecialCard, this.onUseSpecialCard, this); oops.message.off(GameEvent.ShowSmallTip, this.onShowSmallTip, this); oops.message.off(GameEvent.CardUsed, this.onCardUsed, this); + oops.message.off(GameEvent.HeroBoxEmptyClick, this.onHeroBoxEmptyClick, this); if (this.cards_chou && this.cards_chou.isValid) { this.cards_chou.off(NodeEventType.TOUCH_START, this.onDrawTouchStart, this); this.cards_chou.off(NodeEventType.TOUCH_END, this.onDrawTouchEnd, this); @@ -716,6 +718,11 @@ export class MissionCardComp extends CCComp { this.refreshHeroBoxSlots(); } + /** 英雄面板空槽位点击回调:展示英雄卡池选择界面 */ + private onHeroBoxEmptyClick() { + this.onShowCardsClick(); + } + /** * 使用英雄卡的 guard 校验(由 CHeroComp 通过 UseHeroCard 事件调用): * - 当前英雄数 < 上限 → 允许使用。