52 lines
1.3 KiB
Lua
52 lines
1.3 KiB
Lua
---@class BP_TeamStartTip_C:AActor
|
|
---@field Team3DWidget UWidgetComponent
|
|
---@field DefaultSceneRoot USceneComponent
|
|
---@field TeamID int32
|
|
--Edit Below--
|
|
local BP_TeamStartTip = {};
|
|
|
|
|
|
function BP_TeamStartTip:ReceiveBeginPlay()
|
|
self.SuperClass.ReceiveBeginPlay(self);
|
|
if not UGCGameSystem.IsServer() then
|
|
UGCEventSystem.AddListener(EventEnum.PlayerTeamChange, self.UpdateTeam, self)
|
|
local LocalPC = UGCSystemLibrary.GetLocalPlayerController()
|
|
self:UpdateTeam(LocalPC, UGCPlayerControllerSystem.GetTeamID(LocalPC))
|
|
end
|
|
end
|
|
|
|
function BP_TeamStartTip:UpdateTeam(PC, TeamID)
|
|
if PC == UGCSystemLibrary.GetLocalPlayerController() then
|
|
local WidgetInst = self.Team3DWidget:GetUserWidgetObject()
|
|
if UE.IsValid(WidgetInst) then
|
|
WidgetInst:SetIsSelfTeam(TeamID == self.TeamID)
|
|
self.Team3DWidget:RequestRedraw()
|
|
end
|
|
end
|
|
end
|
|
|
|
--[[
|
|
function BP_TeamStartTip:ReceiveTick(DeltaTime)
|
|
self.SuperClass.ReceiveTick(self, DeltaTime);
|
|
end
|
|
--]]
|
|
|
|
--[[
|
|
function BP_TeamStartTip:ReceiveEndPlay()
|
|
self.SuperClass.ReceiveEndPlay(self);
|
|
end
|
|
--]]
|
|
|
|
--[[
|
|
function BP_TeamStartTip:GetReplicatedProperties()
|
|
return
|
|
end
|
|
--]]
|
|
|
|
--[[
|
|
function BP_TeamStartTip:GetAvailableServerRPCs()
|
|
return
|
|
end
|
|
--]]
|
|
|
|
return BP_TeamStartTip; |