Skip to content

LedScoreDataSource

ClassLEDStudioLEDStudio
[AddComponentMenu("LED Studio/Data Sources/Score Source")]
public sealed class LedScoreDataSource : LedTextBasedDataSource, ILedSource, ITextBlinkSource

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

public void SetLabels(string homeLabel, string awayLabel)

Updates both team labels and invalidates the owning board for immediate recomposition.

Parameters

Name Type
homeLabel System.String
awayLabel System.String

Remarks

Null labels fall back to HOME and AWAY.

public void SetScore(string home, string away, string period, string clock)

Updates the displayed scores, period, and clock as one board refresh.

Parameters

Name Type
home System.String
away System.String
period System.String
clock System.String

Remarks

Null scores become 0; null period and clock values become empty text.

protected override void CreateSource(Vector2Int targetResolution)

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

Parameters

Name Type
targetResolution UnityEngine.Vector2Int
protected override void UpdateSubclassProperties()

Push subclass-specific inspector changes during LEDStudio.LedTextBasedDataSource.UpdateSource(ImpossibleRobert.Common.Timing.TimeStep%40).

protected override void PushSubclassProperties()

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

protected override void ReleaseSource()

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

public LedScoreDataSource()

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