talent
This commit is contained in:
parent
466c8543f1
commit
2feb1b76e2
@ -294,7 +294,7 @@ function MainComp:refreshRedPoint()
|
||||
end
|
||||
|
||||
if DataManager.ArenaData:hasEntranceRedDot() then
|
||||
self.arenaBtn:addRedPoint(70, 20, 0.5)
|
||||
self.arenaBtn:addRedPoint(70, 26, 0.5)
|
||||
else
|
||||
self.arenaBtn:removeRedPoint()
|
||||
end
|
||||
|
||||
@ -3,17 +3,23 @@ local TalentCell = class("TalentCell", BaseCell)
|
||||
function TalentCell:init()
|
||||
local uiMap = self:getUIMap()
|
||||
|
||||
self.animator = self.baseObject:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR)
|
||||
self.bg = uiMap["talent_cell.bg"]
|
||||
self.descTx1 = uiMap["talent_cell.desc_tx_1"]
|
||||
self.descTx2 = uiMap["talent_cell.desc_tx_2"]
|
||||
self.animator.enabled = false
|
||||
end
|
||||
|
||||
function TalentCell:refresh(idx, cfg)
|
||||
function TalentCell:refresh(idx, cfg, showAni)
|
||||
self.bg:setSprite(GConst.ATLAS_PATH.UI_TALENT, "talent_" .. idx)
|
||||
self.descTx1:setText(I18N:getText("talent", idx, "name"))
|
||||
local lv = DataManager.TalentData:getLevels(idx)
|
||||
self.descTx2:setText("Lv." .. lv)
|
||||
self.bg:setSprite(GConst.ATLAS_PATH.ICON_TALENT, "talent_" .. idx)
|
||||
if showAni then
|
||||
self.animator.enabled = true
|
||||
self.animator:SetTrigger("t_open")
|
||||
end
|
||||
end
|
||||
|
||||
function TalentCell:setActive(active)
|
||||
|
||||
@ -99,7 +99,7 @@ function TalentMainUI:onUpgrade()
|
||||
return
|
||||
end
|
||||
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"))
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user