refactor: 使用标签组件简化卡牌池等级显示逻辑

- 将多个子节点激活控制替换为直接设置 Label 组件的文本
- 移除冗余的节点引用和条件判断
- 添加节点弹出动画以增强视觉反馈
This commit is contained in:
walkpan
2026-04-05 19:37:28 +08:00
parent 80f0992fce
commit e1b6c9e654
2 changed files with 4887 additions and 4407 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -547,18 +547,9 @@ export class MissionCardComp extends CCComp {
if (this.pool_lv_node) {
this.pool_lv_node.active = true;
const lv = Math.max(CARD_POOL_INIT_LEVEL, Math.min(CARD_POOL_MAX_LEVEL, Math.floor(this.poolLv)));
const lv1 = this.pool_lv_node.getChildByName("lv1");
const lv2 = this.pool_lv_node.getChildByName("lv2");
const lv3 = this.pool_lv_node.getChildByName("lv3");
const lv4 = this.pool_lv_node.getChildByName("lv4");
const lv5 = this.pool_lv_node.getChildByName("lv5");
const lv6 = this.pool_lv_node.getChildByName("lv6");
if (lv1) lv1.active = lv >= 1;
if (lv2) lv2.active = lv >= 2;
if (lv3) lv3.active = lv >= 3;
if (lv4) lv4.active = lv >= 4;
if (lv5) lv5.active = lv >= 5;
if (lv6) lv6.active = lv >= 6;
this.pool_lv_node.getComponent(Label).string = `${lv}`;
const peak = 1.2
this.playHeroNumNodePop( this.pool_lv_node, peak);
}
mLogger.log(this.debugMode, "MissionCardComp", "pool lv ui update", {
poolLv: this.poolLv,