This commit is contained in:
puxuan 2025-09-12 10:24:50 +08:00
parent d758c405db
commit 0a5cedcf76

View File

@ -19,15 +19,18 @@ end
function TalentCell:refresh(idx, cfg, showAni)
self.idx = idx
self.bg:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_b_" .. cfg.qlt)
self.bg1:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_" .. idx)
self.descTx1:setText(I18N:getText("talent", idx, "name"))
local lv = DataManager.TalentData:getLevels(idx)
self.descTx2:setText("Lv." .. lv)
if showAni then
self.bg:setActive(true)
self.bg:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_b_" .. cfg.qlt)
self.animator.enabled = true
self.animator:SetTrigger("t_open")
elseif lv <= 0 then
self.bg:setActive(true)
self.bg:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_b_0")
else
self.bg:setActive(false)
end