UGCProjects/SoloKing/Script/gamemode/Action_GameEnd.lua
2025-01-04 23:00:19 +08:00

36 lines
1.0 KiB
Lua
Raw Permalink 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 Action_GameEnd = {
-- 可配置参数定义参数将显示在Action配置面板
-- 例:
-- MyIntParameter = 0
}
-- 自动结束之后执行的
function Action_GameEnd:Execute(...)
-- 显示结算
if IsServer then
UGCLogSystem.Log("[Action_GameEnd:Execute] 执行结束")
else
local Winner = GameState.MiniInfo.GameWinner;
local RoundWinners = GameState.MiniInfo.RoundWinners;
if not WidgetManager:IsVisiblePanel(WidgetConfig.EUIType.GameEnd) then
UGCLogSystem.Log("[Action_GameEnd:Execute] 显示 GameEnd 界面")
WidgetManager:ShowPanel(WidgetConfig.EUIType.GameEnd, false, Winner, RoundWinners);
WidgetManager:ClosePanel(WidgetConfig.EUIType.Main);
end
end
GameState:OnGameEnded();
-- 给定一个时间自动关闭服务器
return true
end
--[[
-- 需要勾选Action的EnableTick才会执行Update
-- 触发器激活后将在每个tick执行Action的Update直到self.bEnableActionTick为false
function Action_GameEnd:Update(DeltaSeconds)
end
]]
return Action_GameEnd