feat(map): 新增英雄图鉴技能分档描述渲染逻辑

1. 为技能图标组件新增所属英雄UUID字段,传递英雄上下文
2. 在英雄列表面板中为技能图标绑定所属英雄ID
3. 新增英雄技能分档渲染逻辑,根据英雄等级展示对应技能解锁状态和描述
4. 补充注释和类型定义,完善代码文档
This commit is contained in:
pan
2026-08-27 21:10:39 +08:00
parent 39cbb2eed4
commit 423653c4c8
3 changed files with 73 additions and 7 deletions

View File

@@ -513,6 +513,7 @@ export class HerosListComp extends CCComp {
this.skills_node.children[i].destroy()
}
// huuid 已在 onCardSelect 赋值,addSkillIcon 用它携带英雄语境
const lv = Math.max(1, smc.getHeroOuterLv(hero.uuid))
// ---- 大招:skills[1] 及以后(英雄出场即激活,与能量条同语义,恒不锁定) ----
@@ -547,7 +548,8 @@ export class HerosListComp extends CCComp {
const node = instantiate(this.skill_icon_prefab)
node.name = `skill_${s_uuid}`
const comp = node.getComponent(SSkillBoxComp) || node.addComponent(SSkillBoxComp)
comp.initHeroSkill(s_uuid, s_lv, locked, isField)
// 携带所属英雄,点击弹窗按英雄技能分档描述渲染
comp.initHeroSkill(s_uuid, s_lv, locked, isField, this.huuid)
this.skills_node.addChild(node)
}