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

53 lines
1.2 KiB
Lua

---@class BP_RotatorAttach_C:AActor
---@field DefaultSceneRoot USceneComponent
---@field YawRotatorSpeed float
---@field RotatorStartTime float
---@field bCanRotator bool
--Edit Below--
local BP_RotatorAttach = {};
--[[
function BP_RotatorAttach:ReceiveBeginPlay()
self.SuperClass.ReceiveBeginPlay(self);
end
--]]
function BP_RotatorAttach:StartRotator()
self.RotatorStartTime = UGCGameSystem.GameState:GetServerGameTime()
self.bCanRotator = true
end
function BP_RotatorAttach:StopRotator()
self.bCanRotator = false
end
function BP_RotatorAttach:ReceiveTick(DeltaTime)
self.SuperClass.ReceiveTick(self, DeltaTime);
if self.bCanRotator then
self:K2_SetActorRotation({Roll = 0., Pitch = 0., Yaw = self:GetYaw()})
end
end
function BP_RotatorAttach:GetYaw()
return (UGCGameSystem.GameState:GetServerGameTime() - self.RotatorStartTime) * self.YawRotatorSpeed
end
--[[
function BP_RotatorAttach:ReceiveEndPlay()
self.SuperClass.ReceiveEndPlay(self);
end
--]]
--[[
function BP_RotatorAttach:GetReplicatedProperties()
return
end
--]]
--[[
function BP_RotatorAttach:GetAvailableServerRPCs()
return
end
--]]
return BP_RotatorAttach;