71 lines
2.0 KiB
Lua
71 lines
2.0 KiB
Lua
require("Base/BasePanel")
|
|
MapAwardPanel = Inherit(BasePanel)
|
|
local this=MapAwardPanel
|
|
local nameText--名字
|
|
local nameInfoText--名字詳情
|
|
local awardText1--
|
|
local awardText2--
|
|
local itemUpGrid--父级
|
|
local heroGrid--父级
|
|
local sureBtn
|
|
local closeBtn
|
|
local itemListUp
|
|
local AwardItemData=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
|
--初始化组件(用于子类重写)
|
|
function MapAwardPanel:InitComponent()
|
|
this.spLoader = SpriteLoader.New()
|
|
|
|
this.nameText=Util.GetGameObject (self.transform, "title/nameText")
|
|
this.nameInfoText=Util.GetGameObject (self.transform, "title/nameInfoText")
|
|
this.awardText1=Util.GetGameObject (self.transform, "middle/awardText")
|
|
this.itemUpGrid=Util.GetGameObject (self.transform,"middle/awardGrid")
|
|
this.itemDownGrid=Util.GetGameObject (self.transform,"middle/bagGrid")
|
|
this.heroGrid=Util.GetGameObject (self.transform,"heroRect/heroGrid")
|
|
this.item = Util.GetGameObject(self.gameObject, "item")
|
|
this.sureBtn=Util.GetGameObject (self.transform,"sureBtn")
|
|
this.closeBtn=Util.GetGameObject (self.transform,"bg")
|
|
--背包实例化
|
|
|
|
end
|
|
|
|
--绑定事件(用于子类重写)
|
|
function MapAwardPanel:BindEvent()
|
|
|
|
Util.AddClick(this.sureBtn, function ()
|
|
self:ClosePanel()
|
|
end)
|
|
Util.AddClick(this.closeBtn, function ()
|
|
--self:ClosePanel()
|
|
end)
|
|
end
|
|
|
|
--添加事件监听(用于子类重写)
|
|
function MapAwardPanel:AddListener()
|
|
|
|
end
|
|
|
|
--移除事件监听(用于子类重写)
|
|
function MapAwardPanel:RemoveListener()
|
|
|
|
end
|
|
--界面打开时调用(用于子类重写)
|
|
function MapAwardPanel:OnOpen(...)
|
|
local arg={...}
|
|
this.nameText:GetComponent("Text").text=Language[11227]
|
|
this.nameInfoText:GetComponent("Text").text=Language[11228]
|
|
end
|
|
|
|
--界面关闭时调用(用于子类重写)
|
|
function MapAwardPanel:OnClose()
|
|
|
|
end
|
|
|
|
--界面销毁时调用(用于子类重写)
|
|
function MapAwardPanel:OnDestroy()
|
|
this.spLoader:Destroy()
|
|
|
|
end
|
|
|
|
return MapAwardPanel
|
|
|