82 lines
2.3 KiB
Lua
82 lines
2.3 KiB
Lua
require("Base/BasePanel")
|
|
IncarnationUpHelpPopup = Inherit(BasePanel)
|
|
local this=IncarnationUpHelpPopup
|
|
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")
|
|
end
|
|
|
|
function this:BindEvent()
|
|
Util.AddClick(this.btnBack, function()
|
|
self:ClosePanel()
|
|
end)
|
|
Util.AddClick(this.back, function()
|
|
self:ClosePanel()
|
|
end)
|
|
end
|
|
|
|
--添加事件监听(用于子类重写)
|
|
function this:AddListener()
|
|
|
|
end
|
|
|
|
--移除事件监听(用于子类重写)
|
|
function this:RemoveListener()
|
|
|
|
end
|
|
|
|
function this:OnSortingOrderChange()
|
|
|
|
end
|
|
|
|
function this:OnOpen(_cardId)
|
|
local cardData= IncarnationManager.itemDataList[_cardId]
|
|
local cardConfig=ConfigManager.GetConfigData(ConfigName.ChangingCard,_cardId)
|
|
local maxStarProp=cardConfig.Star3UpProps
|
|
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,3)
|
|
local propList={}
|
|
for k,v in pairs(maxStarProp) do
|
|
if propList[v[1]] then
|
|
propList[v[1]]=propList[v[1]]+v[2]
|
|
else
|
|
propList[v[1]]=v[2]
|
|
end
|
|
end
|
|
for k,v in pairs(maxLevelProp) do
|
|
if propList[v[1]] then
|
|
propList[v[1]]=propList[v[1]]+v[2]
|
|
else
|
|
propList[v[1]]=v[2]
|
|
end
|
|
end
|
|
local index=0
|
|
for k,v in pairs(propList) do
|
|
local propText=this.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
|
|
|
|
|
|
|
|
function this:OnClose()
|
|
|
|
end
|
|
|
|
--界面销毁时调用(用于子类重写)
|
|
function this:OnDestroy()
|
|
|
|
end
|
|
return this |