fix(map): 修复卡池等级标识显示逻辑
新增卡池等级节点的显示控制逻辑,根据当前池等级激活对应标识节点
This commit is contained in:
@@ -167,6 +167,20 @@ export class HInfoComp extends CCComp {
|
|||||||
this.lv_node.string = `Lv.${currentLv}`;
|
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 变化时重新加载) ----
|
// ---- 图标动画(仅在 UUID 变化时重新加载) ----
|
||||||
const heroUuid = this.model.hero_uuid ?? 0;
|
const heroUuid = this.model.hero_uuid ?? 0;
|
||||||
if (heroUuid !== this.iconHeroUuid) {
|
if (heroUuid !== this.iconHeroUuid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user