31 lines
827 B
Lua
31 lines
827 B
Lua
|
---@class BP_Road_C:UGC_RacingCar_RoadSpline_C
|
||
|
--Edit Below--
|
||
|
---@type BP_Road_C
|
||
|
local BP_Road = {};
|
||
|
function BP_Road:ReceiveBeginPlay()
|
||
|
ugcprint("BP_Road_ReceiveBeginPlay");
|
||
|
-- RacingCarMode.BP_RoadSegment = self
|
||
|
end
|
||
|
|
||
|
function BP_Road:GetNextBP_RoadIndex(curIndex)
|
||
|
ugcprint("BP_Road:GetNextBP_RoadIndex curIndex"..curIndex);
|
||
|
|
||
|
if UGCGameSystem.GameState.IsSplineReverse then
|
||
|
local targetBP_RoadIndex = curIndex - 1;
|
||
|
if targetBP_RoadIndex < 0 then
|
||
|
targetBP_RoadIndex = targetBP_RoadIndex + self.Spline:GetNumberOfSplinePoints()
|
||
|
end
|
||
|
return targetBP_RoadIndex
|
||
|
else
|
||
|
return (curIndex + 1) % self.Spline:GetNumberOfSplinePoints()
|
||
|
end
|
||
|
end
|
||
|
|
||
|
-- function BP_Road:ReceiveTick(DeltaTime)
|
||
|
|
||
|
-- end
|
||
|
-- function BP_Road:ReceiveEndPlay()
|
||
|
|
||
|
-- end
|
||
|
|
||
|
return BP_Road;
|