fix bug
This commit is contained in:
parent
d758c405db
commit
0a5cedcf76
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user