Skip to content

LedTimerDataSource

ClassLEDStudioLEDStudio
public sealed class LedTimerDataSource : LedTextBasedDataSource, ILedSource, ITextBlinkSource

Displays a countdown timer on the LED board. Place on the same GameObject as LedBoardController or a child — it will be auto-discovered.

public void SetTime(float seconds)

Sets the remaining countdown time, clamps it to zero or greater, and refreshes the owning board.

Parameters

NameTypeDescription
secondsSystem.SingleRemaining time in seconds.
public void StartCounting()

Starts or resumes the countdown and preserves automatic startup for a subsequently rebuilt source.

public void StopCounting()

Pauses the countdown and disables automatic startup for a subsequently rebuilt source.

protected override void CreateSource(Vector2Int targetResolution)

Create the concrete source. Called from LedTextBasedDataSource.Prepare(Vector2Int).

Parameters

NameType
targetResolutionUnityEngine.Vector2Int
protected override void UpdateSubclassProperties()

Push subclass-specific inspector changes during LedTextBasedDataSource.UpdateSource(in TimeStep).

protected override void PushSubclassProperties()

Push all subclass-specific fields to the source (called from LedTextBasedDataSource.OnValidate()).

protected override void ReleaseSource()

Null out the concrete source reference (called from LedTextBasedDataSource.Release()).

public LedTimerDataSource()

public override LedSourceType SourceType { get; }

Returns

LEDStudio.LedSourceType

protected override ITextStyledSource StyledSource { get; }

The underlying text-styled source created by the subclass.

Returns

LEDStudio.ITextStyledSource