This commit is contained in:
puxuan 2025-08-21 21:43:22 +08:00
parent 466c8543f1
commit 2feb1b76e2
3 changed files with 9 additions and 3 deletions

View File

@ -294,7 +294,7 @@ function MainComp:refreshRedPoint()
end end
if DataManager.ArenaData:hasEntranceRedDot() then if DataManager.ArenaData:hasEntranceRedDot() then
self.arenaBtn:addRedPoint(70, 20, 0.5) self.arenaBtn:addRedPoint(70, 26, 0.5)
else else
self.arenaBtn:removeRedPoint() self.arenaBtn:removeRedPoint()
end end

View File

@ -3,17 +3,23 @@ local TalentCell = class("TalentCell", BaseCell)
function TalentCell:init() function TalentCell:init()
local uiMap = self:getUIMap() local uiMap = self:getUIMap()
self.animator = self.baseObject:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR)
self.bg = uiMap["talent_cell.bg"] self.bg = uiMap["talent_cell.bg"]
self.descTx1 = uiMap["talent_cell.desc_tx_1"] self.descTx1 = uiMap["talent_cell.desc_tx_1"]
self.descTx2 = uiMap["talent_cell.desc_tx_2"] self.descTx2 = uiMap["talent_cell.desc_tx_2"]
self.animator.enabled = false
end end
function TalentCell:refresh(idx, cfg) function TalentCell:refresh(idx, cfg, showAni)
self.bg:setSprite(GConst.ATLAS_PATH.UI_TALENT, "talent_" .. idx) self.bg:setSprite(GConst.ATLAS_PATH.UI_TALENT, "talent_" .. idx)
self.descTx1:setText(I18N:getText("talent", idx, "name")) self.descTx1:setText(I18N:getText("talent", idx, "name"))
local lv = DataManager.TalentData:getLevels(idx) local lv = DataManager.TalentData:getLevels(idx)
self.descTx2:setText("Lv." .. lv) self.descTx2:setText("Lv." .. lv)
self.bg:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_" .. idx) self.bg:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_" .. idx)
if showAni then
self.animator.enabled = true
self.animator:SetTrigger("t_open")
end
end end
function TalentCell:setActive(active) function TalentCell:setActive(active)

View File

@ -99,7 +99,7 @@ function TalentMainUI:onUpgrade()
return return
end end
self.upNode:setActive(true) self.upNode:setActive(true)
self.upTalentCell:refresh(upData.id, self.list[upData.id]) self.upTalentCell:refresh(upData.id, self.list[upData.id], true)
self.upDescTx:setText(I18N:getText("talent", upData.id, "desc")) self.upDescTx:setText(I18N:getText("talent", upData.id, "desc"))
end end