feat(heroList): add fragment display and level text refresh
1. 新增英雄碎片数量文本与进度条UI组件绑定和显示逻辑 2. 新增refreshLv方法统一刷新英雄等级数字,移除Lv.前缀 3. 优化卡牌组件注释,补充碎片管理职责 4. 统一英雄列表面板刷新所有卡牌的可升级标识和等级、碎片状态
This commit is contained in:
@@ -175,11 +175,13 @@ export class HerosListComp extends CCComp {
|
||||
this.refreshAllCardsCanUp()
|
||||
}
|
||||
|
||||
/** 升级/碎片变动后统一刷新所有卡片的可升级标识(升级入口仅在本面板,无需卡片各自监听事件) */
|
||||
/** 升级/碎片变动后统一刷新所有卡片的可升级标识与等级数字(升级入口仅在本面板,无需卡片各自监听事件) */
|
||||
private refreshAllCardsCanUp() {
|
||||
if (!this.cards_node) return
|
||||
this.cards_node.children.forEach(cardNode => {
|
||||
cardNode.getComponent(CardLiteComp)?.refreshCanUp()
|
||||
const comp = cardNode.getComponent(CardLiteComp)
|
||||
comp?.refreshCanUp()
|
||||
comp?.refreshLv()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user