41 lines
1.3 KiB
Lua
41 lines
1.3 KiB
Lua
require("Base/BasePanel")
|
|
GodWeaponSkillInfoPopup = Inherit(BasePanel)
|
|
local this=GodWeaponSkillInfoPopup
|
|
--初始化组件(用于子类重写)
|
|
function this:InitComponent()
|
|
this.closeBtn=Util.GetGameObject(self.gameObject, "closeBtn")
|
|
this.content=Util.GetGameObject(self.gameObject, "Content")
|
|
this.title=Util.GetGameObject(self.gameObject, "Content/Title/Text"):GetComponent("Text")
|
|
end
|
|
--绑定事件(用于子类重写)
|
|
function this:BindEvent()
|
|
Util.AddClick(this.closeBtn, function()
|
|
self:ClosePanel()
|
|
end)
|
|
end
|
|
|
|
--界面打开时调用(用于子类重写)--技能名称、技能信息
|
|
function this:OnOpen(skillName,skillDatas)--data 未获得的时候为灵兽静态ID 获得的时候为本地数据
|
|
this.title.text=skillName
|
|
LogError("#skillDatas==================="..#skillDatas)
|
|
for i=1,#skillDatas do
|
|
local desObj= this.content.transform:GetChild(i).gameObject
|
|
Util.GetGameObject(desObj,"star"):GetComponent("Text").text=string.format("名刀%s星激活",skillDatas[i].StarMatch)
|
|
Util.GetGameObject(desObj,"infoTxt"):GetComponent("Text").text=skillDatas[i].Desc
|
|
desObj:SetActive(true)
|
|
end
|
|
end
|
|
|
|
--界面关闭时调用(用于子类重写)
|
|
function this:OnClose()
|
|
|
|
end
|
|
|
|
--界面销毁时调用(用于子类重写)
|
|
function this:OnDestroy()
|
|
|
|
end
|
|
|
|
return this
|
|
|