37 lines
917 B
Lua
37 lines
917 B
Lua
---@class WB_RoundFinish_C:UUserWidget
|
|
---@field WidgetSwitcher_IsWin UWidgetSwitcher
|
|
---@field WiningSound UAkAudioEvent
|
|
--Edit Below--
|
|
local WB_RoundFinish = {
|
|
bInitDoOnce = false;
|
|
NowDefender = -1;
|
|
};
|
|
|
|
|
|
function WB_RoundFinish:Construct()
|
|
end
|
|
|
|
|
|
function WB_RoundFinish:OnShowPanel(WiningTeam)
|
|
local LocalPlayerTeamID = UGCPlayerControllerSystem.GetTeamID(UGCSystemLibrary.GetLocalPlayerController())
|
|
if WiningTeam == LocalPlayerTeamID then
|
|
self.WidgetSwitcher_IsWin:SetActiveWidgetIndex(0)
|
|
UGCSoundManagerSystem.PlaySound2D(self.WiningSound)
|
|
else
|
|
self.WidgetSwitcher_IsWin:SetActiveWidgetIndex(1)
|
|
end
|
|
UGCEventSystem.SetTimer(self, function()
|
|
WidgetManager:ClosePanel(WidgetConfig.EUIType.RoundFinish)
|
|
end, 5)
|
|
end
|
|
|
|
|
|
-- function WB_RoundFinish:Tick(MyGeometry, InDeltaTime)
|
|
|
|
-- end
|
|
|
|
-- function WB_RoundFinish:Destruct()
|
|
|
|
-- end
|
|
|
|
return WB_RoundFinish; |