69 lines
1.9 KiB
Lua
69 lines
1.9 KiB
Lua
|
----- 通用恭喜弹窗 -----
|
||
|
require("Base/BasePanel")
|
||
|
ArenaNewTheOnePopup = Inherit(BasePanel)
|
||
|
local this = ArenaNewTheOnePopup
|
||
|
local sorting = 0
|
||
|
|
||
|
|
||
|
|
||
|
--子模块预设
|
||
|
local contentPrefabs={}
|
||
|
|
||
|
--初始化组件(用于子类重写)
|
||
|
function ArenaNewTheOnePopup: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.title=Util.GetGameObject(this.gameObject,"Contents/Pages/Shows/titleBg/Text"):GetComponent("Text")
|
||
|
this.title.text="天下第一"
|
||
|
this.info=Util.GetGameObject(this.gameObject,"Contents/Pages/CongratulationPopup_Practice/Text1"):GetComponent("Text")
|
||
|
--子模块脚本初始化
|
||
|
end
|
||
|
|
||
|
--绑定事件(用于子类重写)
|
||
|
function ArenaNewTheOnePopup:BindEvent()
|
||
|
-- for key, value in pairs(contentScripts) do
|
||
|
-- value.view:BindEvent()
|
||
|
-- end
|
||
|
--返回按钮
|
||
|
Util.AddClick(this.mask,function()
|
||
|
self:ClosePanel()
|
||
|
end)
|
||
|
end
|
||
|
|
||
|
function ArenaNewTheOnePopup:AddListener()
|
||
|
-- for key, value in pairs(contentScripts) do
|
||
|
-- value.view:AddListener()
|
||
|
-- end
|
||
|
end
|
||
|
|
||
|
function ArenaNewTheOnePopup:RemoveListener()
|
||
|
-- for key, value in pairs(contentScripts) do
|
||
|
-- value.view:RemoveListener()
|
||
|
-- end
|
||
|
end
|
||
|
|
||
|
function ArenaNewTheOnePopup:OnSortingOrderChange()
|
||
|
Util.AddParticleSortLayer(this.effect,self.sortingOrder - sorting)
|
||
|
sorting = self.sortingOrder
|
||
|
end
|
||
|
function ArenaNewTheOnePopup:OnOpen(msg)
|
||
|
this.info.text=string.format("恭喜%s%s在竞技场中获得全服第一名的好成绩",msg.servername,msg.name)
|
||
|
this.effect:SetActive(true)
|
||
|
|
||
|
|
||
|
end
|
||
|
|
||
|
function ArenaNewTheOnePopup:OnShow()
|
||
|
end
|
||
|
|
||
|
function ArenaNewTheOnePopup:OnClose()
|
||
|
PlayerManager.arenaTheOne=nil
|
||
|
end
|
||
|
|
||
|
function ArenaNewTheOnePopup:OnDestroy()
|
||
|
|
||
|
end
|
||
|
|
||
|
return ArenaNewTheOnePopup
|