Table of Contents

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
SyncScript
RaceController
Implements
IIdentifiable
ICollectorHolder
Inherited Members

Properties

Checkpoints

Gets or sets the list of checkpoints for the race.

public List<CheckpointTrigger> Checkpoints { get; set; }

Property Value

List<CheckpointTrigger>

CountdownBeats

Gets the rounded number of countdown beats remaining.

public int CountdownBeats { get; }

Property Value

int

CountdownDuration

Gets or sets the duration of the pre-race countdown in seconds.

public float CountdownDuration { get; set; }

Property Value

float

CountdownRemaining

Gets the remaining countdown time in seconds.

public float CountdownRemaining { get; }

Property Value

float

IsRacing

Gets a value indicating whether the race is currently in progress.

public bool IsRacing { get; }

Property Value

bool

SplitTimes

Gets the split times recorded at each checkpoint.

public List<double> SplitTimes { get; }

Property Value

List<double>

Timer

Gets or sets the associated race timer.

public RaceTimer? Timer { get; set; }

Property Value

RaceTimer

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

Action

RaceStarted

Occurs when the race starts after the countdown finishes.

public event Action? RaceStarted

Event Type

Action