49 lines
1.9 KiB
Lua
49 lines
1.9 KiB
Lua
----- --七界试炼单个遗物 -----
|
|
local QiJieSingleTreasure = {}
|
|
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
|
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
|
local QijieHolyConfig=ConfigManager.GetConfig(ConfigName.QijieHolyConfig)
|
|
|
|
|
|
function QiJieSingleTreasure:InitComponent(gameObject)
|
|
self.spLoader = SpriteLoader.New()
|
|
self.attriText = Util.GetGameObject(gameObject,"AttriText"):GetComponent("Text")
|
|
self.title = Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
|
|
self.Img = Util.GetGameObject(gameObject,"Image"):GetComponent("Image")
|
|
self.costIcon = Util.GetGameObject(gameObject,"cost/Icon"):GetComponent("Image")
|
|
self.costNum = Util.GetGameObject(gameObject,"cost/Num"):GetComponent("Text")
|
|
self.activeBtn = Util.GetGameObject(gameObject,"activeBtn")
|
|
self.activeText = Util.GetGameObject(self.activeBtn,"Text")
|
|
end
|
|
|
|
function QiJieSingleTreasure:BindEvent()
|
|
Util.AddClick(self.activeBtn,function()
|
|
PopupTipPanel.ShowTip("我知道了")
|
|
end)
|
|
end
|
|
|
|
function QiJieSingleTreasure:AddListener()
|
|
end
|
|
|
|
function QiJieSingleTreasure:RemoveListener()
|
|
end
|
|
|
|
function QiJieSingleTreasure:OnShow(_parent,...)
|
|
self.parent =_parent
|
|
self.data = ...
|
|
self.sortingOrder =_parent.sortingOrder
|
|
self.title.text = self.data.Name
|
|
self.Img.sprite = self.spLoader:LoadSprite(artResourcesConfig[self.data.Icon].Name)
|
|
self.costIcon.sprite = self.spLoader:LoadSprite(GetSpriteNameByItemId(self.data.Cost[1]))
|
|
self.costNum.text = string.format( "%s/%s",BagManager.GetTotalItemNum(self.data.Cost[1]),self.data.Cost[2])
|
|
self.attriText.text = string.format( "挑战获得界灵数量<color=#4ab47a>+%s<color>,/n",self.data.Addition[2]/100)
|
|
end
|
|
|
|
function QiJieSingleTreasure:OnClose()
|
|
end
|
|
|
|
function QiJieSingleTreasure:OnDestroy()
|
|
self.spLoader:Destroy()
|
|
end
|
|
|
|
return QiJieSingleTreasure |