Class RaceController
- Namespace
- LibreRally.Race
- Assembly
- LibreRally.dll
Controls the flow of a race, including countdown, timing, and checkpoints.
[ComponentCategory("LibreRally")]
public class RaceController : SyncScript, IIdentifiable, ICollectorHolder
- Inheritance
-
SyncScriptRaceController
- Implements
-
IIdentifiableICollectorHolder
- Inherited Members
Properties
Checkpoints
Gets or sets the list of checkpoints for the race.
public List<CheckpointTrigger> Checkpoints { get; set; }
Property Value
CountdownBeats
Gets the rounded number of countdown beats remaining.
public int CountdownBeats { get; }
Property Value
CountdownDuration
Gets or sets the duration of the pre-race countdown in seconds.
public float CountdownDuration { get; set; }
Property Value
CountdownRemaining
Gets the remaining countdown time in seconds.
public float CountdownRemaining { get; }
Property Value
IsRacing
Gets a value indicating whether the race is currently in progress.
public bool IsRacing { get; }
Property Value
SplitTimes
Gets the split times recorded at each checkpoint.
public List<double> SplitTimes { get; }
Property Value
Timer
Gets or sets the associated race timer.
public RaceTimer? Timer { get; set; }
Property Value
Methods
Start()
Starts the race countdown and subscribes to checkpoint events.
public override void Start()
Update()
Advances the race countdown and monitors checkpoint completion.
public override void Update()
Events
RaceFinished
Occurs when the race is finished after all checkpoints have been passed.
public event Action? RaceFinished
Event Type
RaceStarted
Occurs when the race starts after the countdown finishes.
public event Action? RaceStarted