32 lines
680 B
Lua
32 lines
680 B
Lua
|
---@class WB_RoundFinish2_C:UUserWidget
|
||
|
---@field WidgetSwitcher_IsWin UWidgetSwitcher
|
||
|
--Edit Below--
|
||
|
local WB_RoundFinish = {
|
||
|
bInitDoOnce = false;
|
||
|
NowDefender = -1;
|
||
|
};
|
||
|
|
||
|
|
||
|
function WB_RoundFinish:Construct()
|
||
|
end
|
||
|
|
||
|
|
||
|
function WB_RoundFinish:OnShowPanel(IsAttackerWin)
|
||
|
local IsWin = (UGCGameSystem.GameState:PlayerIsAttacker(UGCSystemLibrary.GetLocalPlayerKey()) == IsAttackerWin)
|
||
|
if IsWin then
|
||
|
self.WidgetSwitcher_IsWin:SetActiveWidgetIndex(0)
|
||
|
else
|
||
|
self.WidgetSwitcher_IsWin:SetActiveWidgetIndex(1)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
|
||
|
-- function WB_RoundFinish:Tick(MyGeometry, InDeltaTime)
|
||
|
|
||
|
-- end
|
||
|
|
||
|
-- function WB_RoundFinish:Destruct()
|
||
|
|
||
|
-- end
|
||
|
|
||
|
return WB_RoundFinish;
|