fix(ui): 修复英雄卡牌池面板收起逻辑
1. 新增hideCardsPanel私有方法封装卡牌面板收起逻辑 2. 召唤英雄成功后自动收起卡牌池面板 3. 关闭面板按钮调用统一的收起逻辑 4. 调整初始角色控制器面板默认激活状态为关闭
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user