fix(ui): 修复英雄卡牌池面板收起逻辑

1. 新增hideCardsPanel私有方法封装卡牌面板收起逻辑
2. 召唤英雄成功后自动收起卡牌池面板
3. 关闭面板按钮调用统一的收起逻辑
4. 调整初始角色控制器面板默认激活状态为关闭
This commit is contained in:
panFD
2026-07-28 23:13:27 +08:00
parent cfb93b6f42
commit 14fdb0efa9
2 changed files with 8 additions and 1 deletions

View File

@@ -1454,7 +1454,7 @@
"__id__": 330
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 379

View File

@@ -797,6 +797,8 @@ export class MissionCardComp extends CCComp {
if (heroIdx >= 0) {
const cards = this.buildDrawCards();
this.dispatchCardsToSlots(cards);
// 召唤成功后收起英雄卡池面板
this.hideCardsPanel();
mLogger.log(this.debugMode, "MissionCardComp", "refresh hero pool after buy", {
triggerSlot: heroIdx
});
@@ -1043,6 +1045,11 @@ export class MissionCardComp extends CCComp {
*/
private onCloseCardsClick() {
oops.audio.playEffect("music/button");
this.hideCardsPanel();
}
/** 隐藏卡牌面板:向下滑出到 Y=-700不含按钮音效供系统逻辑复用 */
private hideCardsPanel() {
if (!this.cardPanNode || !this.cardPanNode.isValid) return;
Tween.stopAllByTarget(this.cardPanNode);
tween(this.cardPanNode)