---@class BP_StarPoint_C:AActor ---@field CheckRound USphereComponent ---@field Sphere USphereComponent ---@field DefaultSceneRoot USceneComponent --Edit Below-- local BP_StarPoint = {}; --[[ function BP_StarPoint:ReceiveBeginPlay() self.SuperClass.ReceiveBeginPlay(self); end --]] --[[ function BP_StarPoint:ReceiveTick(DeltaTime) self.SuperClass.ReceiveTick(self, DeltaTime); end --]] --[[ function BP_StarPoint:ReceiveEndPlay() self.SuperClass.ReceiveEndPlay(self); end --]] --[[ function BP_StarPoint:GetReplicatedProperties() return end --]] --[[ function BP_StarPoint:GetAvailableServerRPCs() return end --]] function BP_StarPoint:CanUse() local AllPawn = UGCGameSystem.GetAllPlayerPawn() local PointPos = self:K2_GetActorLocation() local RoundDis = self.CheckRound:GetScaledSphereRadius() for i, v in pairs(AllPawn) do if VectorHelper.GetDistance(v:K2_GetActorLocation(), PointPos) < RoundDis then return false end end local EnableStars = self:GetAllEnableStars() for i, v in pairs(EnableStars) do if VectorHelper.GetDistance(v:K2_GetActorLocation(), PointPos) < RoundDis then return false end end return true end function BP_StarPoint:GetAllEnableStars() local Res = {} if self.AllStars == nil then local StarClass = UE.LoadClass(UGCGameSystem.GetUGCResourcesFullPath('Asset/Blueprint/SceneActor/Star/BP_Star.BP_Star_C')) self.AllStars = GameplayStatics.GetAllActorsOfClass(self, StarClass, {}) end for i, v in pairs(self.AllStars) do if v:GetEnableStar() then Res[#Res + 1] = v end end return Res end return BP_StarPoint;