miduo_client/Assets/ManagedResources/~Lua/Modules/Guild/Skill/HeroPotencyOpenPopup.lua

71 lines
1.8 KiB
Lua

----- 通用恭喜弹窗 -----
require("Base/BasePanel")
HeroPotencyOpenPopup = Inherit(BasePanel)
local this = HeroPotencyOpenPopup
local sorting = 0
--子模块预设
local contentPrefabs = {}
--初始化组件(用于子类重写)
function HeroPotencyOpenPopup:InitComponent()
sorting = 0
this.mask = Util.GetGameObject(this.gameObject, "Mask")
this.contents = Util.GetGameObject(this.gameObject, "Contents/Pages")
this.effect = Util.GetGameObject(this.gameObject, "Contents/Pages/Shows/UI_effect_FightEndLvUp")
this.info = Util.GetGameObject(this.gameObject, "Contents/Pages/CongratulationPopup_Practice/Text1"):GetComponent(
"Text")
--子模块脚本初始化
end
--绑定事件(用于子类重写)
function HeroPotencyOpenPopup:BindEvent()
-- for key, value in pairs(contentScripts) do
-- value.view:BindEvent()
-- end
--返回按钮
Util.AddClick(this.mask, function()
self:ClosePanel()
end)
end
function HeroPotencyOpenPopup:AddListener()
-- for key, value in pairs(contentScripts) do
-- value.view:AddListener()
-- end
end
function HeroPotencyOpenPopup:RemoveListener()
-- for key, value in pairs(contentScripts) do
-- value.view:RemoveListener()
-- end
end
function HeroPotencyOpenPopup:OnSortingOrderChange()
Util.AddParticleSortLayer(this.effect, self.sortingOrder - sorting)
sorting = self.sortingOrder
end
function HeroPotencyOpenPopup:OnOpen(...)
local args = { ... }
this.effect:SetActive(true)
local config = ConfigManager.GetConfigDataByKey(ConfigName.PotentialNewConfig, "Type", args[1])
this.info.text = GetLanguageStrById(config.Name) .." ".. Language[11504]
end
function HeroPotencyOpenPopup:OnShow()
end
function HeroPotencyOpenPopup:OnClose()
end
function HeroPotencyOpenPopup:OnDestroy()
end
return HeroPotencyOpenPopup