变身卡加成预览提交
parent
0543114a36
commit
fa54c65598
File diff suppressed because it is too large
Load Diff
|
|
@ -6,9 +6,11 @@ local PropertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
|||
function this:InitComponent()
|
||||
this.btnBack = Util.GetGameObject(self.gameObject, "BackMask")
|
||||
this.back = Util.GetGameObject(self.gameObject, "BG/BackBtn")
|
||||
this.maxLevel=Util.GetGameObject(self.gameObject, "maxLevel"):GetComponent("Text")
|
||||
this.propGrid=Util.GetGameObject(self.gameObject, "propLayout/grid")
|
||||
this.skillDes=Util.GetGameObject(self.gameObject, "skillDes"):GetComponent("Text")
|
||||
this.itemList={}
|
||||
for i=1,5 do
|
||||
local item=Util.GetGameObject(self.gameObject, "scroll/grid/item"..i)
|
||||
table.insert(this.itemList,item)
|
||||
end
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
|
|
@ -35,14 +37,34 @@ function this:OnSortingOrderChange()
|
|||
end
|
||||
|
||||
function this:OnOpen(_cardId)
|
||||
for i = 1, #this.itemList do
|
||||
this.UpdateItemInfo(this.itemList[i],_cardId,i)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function this.UpdateItemInfo(go,_cardId,star)
|
||||
local maxLevel=Util.GetGameObject(go, "maxLevel"):GetComponent("Text")
|
||||
local propGrid=Util.GetGameObject(go, "propLayout/grid")
|
||||
local skillDes=Util.GetGameObject(go, "skillDes"):GetComponent("Text")
|
||||
local starList={}
|
||||
for i=1,5 do
|
||||
local starObj=Util.GetGameObject(go, "maxStar/Image"..i)
|
||||
if i<=star then
|
||||
starObj:SetActive(true)
|
||||
else
|
||||
starObj:SetActive(false)
|
||||
end
|
||||
--table.insert(starList,star)
|
||||
end
|
||||
local cardData= IncarnationManager.itemDataList[_cardId]
|
||||
local cardConfig=ConfigManager.GetConfigData(ConfigName.ChangingCard,_cardId)
|
||||
local starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",cardConfig.Star,"Level",5)
|
||||
local starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",cardConfig.Star,"Level",star)
|
||||
local maxStarProp=starConfig.Exp
|
||||
local levelConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardLevel,"PoolId",cardConfig.LevelUpPool,"Level",cardConfig.LevelMax)
|
||||
local maxLevelProp=levelConfig.PropList
|
||||
this.maxLevel.text=cardConfig.LevelMax.."级"
|
||||
this.skillDes.text="技能:"..IncarnationManager.GetSkillDesStr(_cardId,5)
|
||||
maxLevel.text=cardConfig.LevelMax.."级"
|
||||
skillDes.text="技能:"..IncarnationManager.GetSkillDesStr(_cardId,star)
|
||||
local propList={}
|
||||
for k,v in pairs(maxStarProp) do
|
||||
if propList[v[1]] then
|
||||
|
|
@ -60,12 +82,14 @@ function this:OnOpen(_cardId)
|
|||
end
|
||||
local index=0
|
||||
for k,v in pairs(propList) do
|
||||
local propText=this.propGrid.transform:GetChild(index):GetComponent("Text")
|
||||
local propText=propGrid.transform:GetChild(index):GetComponent("Text")
|
||||
propText.text = PropertyConfig[k].Info.."+"..GetPropertyFormatStrOne(PropertyConfig[k].Style,v)
|
||||
index=index+1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
function this:OnShow()
|
||||
|
||||
end
|
||||
|
|
@ -78,6 +102,6 @@ end
|
|||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function this:OnDestroy()
|
||||
|
||||
this.itemList={}
|
||||
end
|
||||
return this
|
||||
Loading…
Reference in New Issue