feat(hero card): add upgrade reminder feature
1. 新增英雄升级配置判定模块,封装升级条件校验逻辑 2. 为卡牌组件添加可升级标识节点和刷新逻辑 3. 实现英雄列表面板统一刷新所有卡牌的升级标识 4. 监听英雄成长变更事件实时更新升级提示状态
This commit is contained in:
@@ -168,6 +168,15 @@ export class HerosListComp extends CCComp {
|
||||
if (this.huuid) {
|
||||
this.updateHeroDetail(this.huuid)
|
||||
}
|
||||
this.refreshAllCardsCanUp()
|
||||
}
|
||||
|
||||
/** 升级/碎片变动后统一刷新所有卡片的可升级标识(升级入口仅在本面板,无需卡片各自监听事件) */
|
||||
private refreshAllCardsCanUp() {
|
||||
if (!this.cards_node) return
|
||||
this.cards_node.children.forEach(cardNode => {
|
||||
cardNode.getComponent(CardLiteComp)?.refreshCanUp()
|
||||
})
|
||||
}
|
||||
|
||||
closeHeros() {
|
||||
|
||||
Reference in New Issue
Block a user