2025-01-04 23:00:19 +08:00

51 lines
1.3 KiB
Lua

---@class BP_ShootingTargetController_C:DetourCrowdAIController
--Edit Below--
local BP_ShootingTargetController = {
IsForward = true;
};
function BP_ShootingTargetController:ReceiveBeginPlay()
self.SuperClass.ReceiveBeginPlay(self);
if UGCGameSystem.IsServer() then
---@field SimpleMoveToLocation fun(Controller:AController,Goal:FVector)
UGCEventSystem.SetTimer(self, self.AutoMove, 20.)
end
end
function BP_ShootingTargetController:AutoMove()
UGCLogSystem.Log("[BP_ShootingTargetController_AutoMove]")
UGCEventSystem.SetTimerLoop(self, function()
local TargetPos = self.IsForward and self.Pawn.BeginTFPos or self.Pawn.EndTFPos
UGCLogSystem.Log("[BP_ShootingTargetController_AutoMove] TargetPos:%s", VectorHelper.ToString(TargetPos))
self.IsForward = not self.IsForward
self:MoveToLocation(TargetPos)
end, 3.
)
end
--[[
function BP_ShootingTargetController:ReceiveTick(DeltaTime)
self.SuperClass.ReceiveTick(self, DeltaTime);
end
--]]
--[[
function BP_ShootingTargetController:ReceiveEndPlay()
self.SuperClass.ReceiveEndPlay(self);
end
--]]
--[[
function BP_ShootingTargetController:GetReplicatedProperties()
return
end
--]]
--[[
function BP_ShootingTargetController:GetAvailableServerRPCs()
return
end
--]]
return BP_ShootingTargetController;