---@class BP_PlayerSelectMapOverlap_C:AActor ---@field ShowNameWidget UWidgetComponent ---@field MapInfoWidget UWidgetComponent ---@field MiniMapWidget UWidgetComponent ---@field ShowMapWidget UWidgetComponent ---@field RotatorCenter USceneComponent ---@field Box UBoxComponent ---@field P_SelectOverlap UParticleSystemComponent ---@field DefaultSceneRoot USceneComponent ---@field MapType int32 ---@field SelectColor FLinearColor ---@field DefaultColor FLinearColor ---@field bEnableOverlapSelect bool --Edit Below-- local BP_PlayerSelectMapOverlap = {}; function BP_PlayerSelectMapOverlap:ReceiveBeginPlay() self.SuperClass.ReceiveBeginPlay(self); if UGCGameSystem.IsServer() then if self.bEnableOverlapSelect then UGCSystemLibrary.BindBeginOverlapFunc(self.Box, self.OverlapPlayer, self) end else UGCEventSystem.AddListener(EventEnum.SelectMapCallBack, self.SelectMapCallBack, self) self:InitClientShow() end end function BP_PlayerSelectMapOverlap:InitClientShow() self.ShowNameWidget:GetUserWidgetObject():InitName(self.MapType) self.ShowNameWidget:RequestRedraw() local MapInfo = MapConfig.MapInfo[self.MapType] if MapInfo and MapConfig.MapType.Random ~= self.MapType then self.ShowMapWidget:GetUserWidgetObject():SetImage(MapInfo.Icon) self.MiniMapWidget:GetUserWidgetObject():SetImage(MapInfo.MiniMapInfo.MapPath) self.MapInfoWidget:GetUserWidgetObject():UpdateMapInfo(MapInfo) self.ShowMapWidget:RequestRedraw() self.MiniMapWidget:RequestRedraw() self.MapInfoWidget:RequestRedraw() end end function BP_PlayerSelectMapOverlap:ReceiveTick(DeltaTime) self.SuperClass.ReceiveTick(self, DeltaTime); if UGCGameSystem.IsServer() then else local CameraManager = UGCSystemLibrary.GetLocalPlayerController().PlayerCameraManager local Dir = VectorHelper.Sub(CameraManager:K2_GetActorLocation(), self:K2_GetActorLocation()) Dir.Z = 0. local TargetRot = KismetMathLibrary.MakeRotFromX(Dir) self.RotatorCenter:K2_SetWorldRotation(TargetRot) end end function BP_PlayerSelectMapOverlap:OverlapPlayer(OverlappedComponent, OtherActor, OtherComp, OtherBodyIndex, bFromSweep, SweepResult) if OtherActor.PlayerKey then UGCGameSystem.GameState:PlayerOverlapSelectMap(OtherActor.PlayerKey, self.MapType) end end function BP_PlayerSelectMapOverlap:SelectMapCallBack(bSucceed, InMapType) if InMapType == self.MapType then self.P_SelectOverlap:SetVectorParameter("PColor", KismetMathLibrary.Conv_LinearColorToVector(self.SelectColor)) else self.P_SelectOverlap:SetVectorParameter("PColor", KismetMathLibrary.Conv_LinearColorToVector(self.DefaultColor)) end end --[[ function BP_PlayerSelectMapOverlap:ReceiveEndPlay() self.SuperClass.ReceiveEndPlay(self); end --]] --[[ function BP_PlayerSelectMapOverlap:GetReplicatedProperties() return end --]] --[[ function BP_PlayerSelectMapOverlap:GetAvailableServerRPCs() return end --]] return BP_PlayerSelectMapOverlap;