fix(map): 修复卡池等级标识显示逻辑

新增卡池等级节点的显示控制逻辑,根据当前池等级激活对应标识节点
This commit is contained in:
panw
2026-05-25 09:11:07 +08:00
parent 350b107d2a
commit 09e9308021

View File

@@ -167,6 +167,20 @@ export class HInfoComp extends CCComp {
this.lv_node.string = `Lv.${currentLv}`;
}
// ---- 卡池等级标识 ----
if (this.pool_lv_node) {
const poolLvStr = `lv${this.model.pool_lv ?? 1}`;
this.pool_lv_node.children.forEach(child => {
if (child.name === "light") {
child.active = false;
} else if (child.name === "bg") {
child.active = true;
} else {
child.active = (child.name === poolLvStr);
}
});
}
// ---- 图标动画(仅在 UUID 变化时重新加载) ----
const heroUuid = this.model.hero_uuid ?? 0;
if (heroUuid !== this.iconHeroUuid) {