This commit is contained in:
puxuan 2025-08-28 19:51:18 +08:00
parent be6283fd1c
commit edfc478e01

View File

@ -20,14 +20,20 @@ end
function TalentCell:refresh(idx, cfg, showAni) function TalentCell:refresh(idx, cfg, showAni)
self.idx = idx self.idx = idx
local cfg = DataManager.TalentData:getCfgList()[idx] local cfg = DataManager.TalentData:getCfgList()[idx]
self.bg1:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_b_" .. cfg.qlt) self.bg:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_b_" .. cfg.qlt)
self.bg:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_" .. idx) self.bg1:setSprite(GConst.ATLAS_PATH.ICON_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)
if showAni then if showAni then
self.bg:setActive(true)
self.animator.enabled = true self.animator.enabled = true
self.animator:SetTrigger("t_open") self.animator:SetTrigger("t_open")
self.baseObject:performWithDelayGlobal(function()
self.bg:setActive(false)
end, 0.5)
else
self.bg:setActive(false)
end end
end end