Class Cooldown
Runs a cooldown timer to throttle flow and outputs remaining measurements.
Syntax
[UnitCategory("Time")]
[TypeIcon(typeof(Timer))]
[UnitOrder(8)]
public sealed class Cooldown : Unit, IUnit, IGraphElementWithDebugData, IGraphElementWithData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable, IAnalyticsIdentifiable, IGraphEventListener
Properties
becameReady
Called when the cooldown timer reaches zero.
Declaration
[DoNotSerialize]
[PortLabel("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]
public ControlInput enter { get; }
Property Value
exitNotReady
Called upon entry when the cooldown is not yet ready.
Declaration
[DoNotSerialize]
[PortLabel("Not Ready")]
public ControlOutput exitNotReady { get; }
Property Value
exitReady
Called upon entry when the cooldown is ready.
Declaration
[DoNotSerialize]
[PortLabel("Ready")]
public ControlOutput exitReady { get; }
Property Value
remainingRatio
The proportion of the duration remaining until the cooldown is ready (0-1).
Declaration
[DoNotSerialize]
[PortLabel("Remaining %")]
public ValueOutput remainingRatio { get; }
Property Value
remainingSeconds
The number of seconds remaining until the cooldown is ready.
Declaration
[DoNotSerialize]
[PortLabel("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]
[PortLabel("Unscaled")]
public ValueInput unscaledTime { get; }
Property Value
Methods
CreateData()
Declaration
public IGraphElementData CreateData()
Returns
Implements
Definition()
Declaration
protected override void Definition()
Overrides
IsListening(GraphPointer)
Declaration
public bool IsListening(GraphPointer pointer)
Parameters
Returns
Implements
StartListening(GraphStack)
Declaration
public void StartListening(GraphStack stack)
Parameters
Implements
StopListening(GraphStack)
Declaration
public void StopListening(GraphStack stack)
Parameters
Implements
Update(Flow)
Declaration
public void Update(Flow flow)
Parameters
Type |
Name |
Description |
Flow |
flow |
|
Extension Methods