PGRData/Script/matrix/xui/xuiescape/settle/XUiEscapeSettle.lua

34 lines
No EOL
1.3 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local XUiPanelSelfWinInfo = require("XUi/XUiEscape/Settle/XUiPanelSelfWinInfo")
local XUiPanelAllWinInfo = require("XUi/XUiEscape/Settle/XUiPanelAllWinInfo")
--大逃杀结算界面
local XUiEscapeSettle = XLuaUiManager.Register(XLuaUi, "UiEscapeSettle")
function XUiEscapeSettle:OnAwake()
self:InitButtonCallBack()
local leftClickCb = handler(self, self.Close)
self.SelfWinInfoPanel = XUiPanelSelfWinInfo.New(self.PanelSelfWinInfo, leftClickCb)
self.AllWinInfoPanel = XUiPanelAllWinInfo.New(self.PanelAllWinInfo, leftClickCb)
end
--isWin阶段结算面板用
function XUiEscapeSettle:OnStart(showPanel, isWin, winData)
local isShowSelfWinInfo = showPanel == XEscapeConfigs.ShowSettlePanel.SelfWinInfo
local isShowAllWinInfo = showPanel == XEscapeConfigs.ShowSettlePanel.AllWinInfo
self.SelfWinInfoPanel.GameObject:SetActiveEx(isShowSelfWinInfo)
self.AllWinInfoPanel.GameObject:SetActiveEx(isShowAllWinInfo)
if isShowSelfWinInfo then
self.SelfWinInfoPanel:Refresh(winData)
elseif isShowAllWinInfo then
self.AllWinInfoPanel:Refresh(isWin)
end
end
function XUiEscapeSettle:OnDestroy()
self.SelfWinInfoPanel:RemoveEventListener()
end
function XUiEscapeSettle:InitButtonCallBack()
self:RegisterClickEvent(self.BtnLeft, self.Close)
end