Class Cooldown
Runs a cooldown timer to throttle flow and outputs remaining measurements.
Syntax
[UnitCategory("Time", 22)]
[TypeIcon(typeof(Timer))]
public sealed class Cooldown : EventUnit, ISerializationCallbackReceiver, IEventUnit, IBehaviourUnit, IUnit, IGraphElementWithDebugData, IBehaviourGraphElement, IGraphElementWithData, IGraphElement, IGraphChild, IObservableDisposable, IDisposable, INotifiedCollectionChild<IGraph>, ICollectionChild<IGraph>, IPrewarmable, IIdentifiable, INotifyPropertyChanged
Properties
becameReady
Called when the cooldown timer reaches zero.
Declaration
[DoNotSerialize]
[UnitPortDisplay("Completed")]
public ControlOutput becameReady { get; }
Property Value
duration
The total duration of the cooldown.
Declaration
[DoNotSerialize]
public ValueInput duration { get; }
Property Value
enter
The moment at which to try using the cooldown.
Declaration
[DoNotSerialize]
[UnitPortDisplay(showLabel = false)]
public ControlInput enter { get; }
Property Value
exitNotReady
Called upon entry when the cooldown is not yet ready.
Declaration
[DoNotSerialize]
[UnitPortDisplay("Not Ready", verticalOrder = 1)]
public ControlOutput exitNotReady { get; }
Property Value
exitReady
Called upon entry when the cooldown is ready.
Declaration
[DoNotSerialize]
[UnitPortDisplay("Ready", verticalOrder = 2)]
public ControlOutput exitReady { get; }
Property Value
remainingRatio
The proportion of the duration remaining until the cooldown is ready (0-1).
Declaration
[DoNotSerialize]
[UnitPortDisplay("Remaining %")]
public ValueOutput remainingRatio { get; }
Property Value
remainingSeconds
The number of seconds remaining until the cooldown is ready.
Declaration
[DoNotSerialize]
[UnitPortDisplay("Remaining")]
public ValueOutput remainingSeconds { get; }
Property Value
reset
Trigger to force reset the cooldown.
Declaration
[DoNotSerialize]
public ControlInput reset { get; }
Property Value
tick
Called each frame while the cooldown timer is active.
Declaration
[DoNotSerialize]
public ControlOutput tick { 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