fix(map): 调整信息组件等级节点显示逻辑
根据卡片类型区分显示等级节点:技能卡隐藏等级,英雄卡正常显示等级
This commit is contained in:
@@ -156,10 +156,16 @@ export class HInfoComp extends CCComp {
|
|||||||
const heroUuid = this.previewUuid;
|
const heroUuid = this.previewUuid;
|
||||||
const heroLv = Math.max(1, this.previewLv);
|
const heroLv = Math.max(1, this.previewLv);
|
||||||
|
|
||||||
|
// 技能卡无等级概念,隐藏等级节点;英雄卡显示等级
|
||||||
if (this.lv_node) {
|
if (this.lv_node) {
|
||||||
|
if (this.isSkillCard) {
|
||||||
|
this.lv_node.node.active = false;
|
||||||
|
} else {
|
||||||
|
this.lv_node.node.active = true;
|
||||||
this.lv_node.string = `Lv.${heroLv}`;
|
this.lv_node.string = `Lv.${heroLv}`;
|
||||||
this.lv_node.color = getLvColor(heroLv);
|
this.lv_node.color = getLvColor(heroLv);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const kindName = this.isSkillCard ? CKind[CKind.Skill] : CKind[CKind.Hero];
|
const kindName = this.isSkillCard ? CKind[CKind.Skill] : CKind[CKind.Hero];
|
||||||
if (this.BG_node) {
|
if (this.BG_node) {
|
||||||
|
|||||||
Reference in New Issue
Block a user