Class Timer
Runs a timer and outputs elapsed and remaining measurements.
Syntax
[UnitCategory("Time", 21)]
public sealed class Timer : EventUnit, ISerializationCallbackReceiver, IEventUnit, IBehaviourUnit, IUnit, IGraphElementWithDebugData, IBehaviourGraphElement, IGraphElementWithData, IGraphElement, IGraphChild, IObservableDisposable, IDisposable, INotifiedCollectionChild<IGraph>, ICollectionChild<IGraph>, IPrewarmable, IIdentifiable, INotifyPropertyChanged
Properties
completed
Called when the timer completes.
Declaration
[DoNotSerialize]
public ControlOutput completed { get; }
Property Value
duration
The total duration of the timer.
Declaration
[DoNotSerialize]
public ValueInput duration { get; }
Property Value
elapsedRatio
The proportion of the duration that has elapsed (0-1).
Declaration
[DoNotSerialize]
[UnitPortDisplay("Elapsed %")]
public ValueOutput elapsedRatio { get; }
Property Value
elapsedSeconds
The number of seconds elapsed since the timer started.
Declaration
[DoNotSerialize]
[UnitPortDisplay("Elapsed")]
public ValueOutput elapsedSeconds { get; }
Property Value
pause
Trigger to pause the timer.
Declaration
[DoNotSerialize]
public ControlInput pause { get; }
Property Value
remainingRatio
The proportion of the duration remaining until the timer is elapsed (0-1).
Declaration
[DoNotSerialize]
[UnitPortDisplay("Remaining %")]
public ValueOutput remainingRatio { get; }
Property Value
remainingSeconds
The number of seconds remaining until the timer is elapsed.
Declaration
[DoNotSerialize]
[UnitPortDisplay("Remaining")]
public ValueOutput remainingSeconds { get; }
Property Value
resume
Trigger to resume the timer.
Declaration
[DoNotSerialize]
public ControlInput resume { get; }
Property Value
start
The moment at which to start the timer.
If the timer is already started, this will reset it.
If the timer is paused, this will resume it.
Declaration
[DoNotSerialize]
public ControlInput start { get; }
Property Value
started
Called when the timer is started.co
Declaration
[DoNotSerialize]
public ControlOutput started { get; }
Property Value
tick
Called each frame while the timer is active.
Declaration
[DoNotSerialize]
public ControlOutput tick { get; }
Property Value
toggle
Trigger to toggle the timer.
If it is idle, it will start.
If it is active, it will pause.
If it is paused, it will resume.
Declaration
[DoNotSerialize]
public ControlInput toggle { get; }
Property Value
unscaledTime
Whether to ignore the time scale.
Declaration
[DoNotSerialize]
[UnitPortDisplay("Unscaled")]
public ValueInput unscaledTime { get; }
Property Value
Methods
CreateData()
Declaration
protected override IEventUnitData CreateData()
Returns
Overrides
Definition()
Declaration
protected override void Definition()
Overrides
Ludiq.Bolt.Unit<Ludiq.Bolt.FlowGraph>.Definition()
OnActivating(GraphReference)
Declaration
protected override void OnActivating(GraphReference instance)
Parameters
Overrides
OnStartListening(GraphReference)
Declaration
protected override void OnStartListening(GraphReference instance)
Parameters
Overrides
OnStopListening(GraphReference)
Declaration
protected override void OnStopListening(GraphReference instance)
Parameters
Overrides
Update(Flow)
Declaration
public void Update(Flow flow)
Parameters
Type |
Name |
Description |
Flow |
flow |
|
Extension Methods