ProtoFlux:Stopwatch: Difference between revisions

From Resonite Wiki
Initial
 
m Fix type links and type color in protoflux preview
Line 13: Line 13:
{"Name":"OnStop", "Type":"Continuation"},
{"Name":"OnStop", "Type":"Continuation"},
{"Name":"OnReset", "Type":"Continuation"},
{"Name":"OnReset", "Type":"Continuation"},
{"Name":"Time", "Type":"Float"},
{"Name":"Time", "Type":"float"},
{"Name":"IsRunning", "Type":"Bool"}
{"Name":"IsRunning", "Type":"bool"}
]
]
}}
}}
Line 55: Line 55:
Sends an impulse after a Reset ([[Impulses|Call]]) has been impulsed.
Sends an impulse after a Reset ([[Impulses|Call]]) has been impulsed.


=== Time ([[Type|Float]]) ===
=== Time ([[Type:Float|Float]]) ===


The current Time state of the Stopwatch as a ([[Type|Float]]) value.
The current Time state of the Stopwatch as a ([[Type:Float|Float]]) value.


=== IsRunning ([[Type|Bool]]) ===
=== IsRunning ([[Type:Bool|Bool]]) ===


Is true if the Stopwatch is in a Running state and false if the Stopwatch is in a Stopped state.
Is true if the Stopwatch is in a Running state and false if the Stopwatch is in a Stopped state.

Revision as of 14:30, 2 March 2024

Stopwatch
Start
OnStart
Stop
OnStop
Reset
OnReset
Time
IsRunning
Actions

A simple Stopwatch node.

TODO

Inputs

Start (Call)

Call this to Start the Stopwatch => puts the Stopwatch into a Running state. Does nothing if the Stopwatch is already in the Running state. If Stopwatch Reset was not called, Time Output will continue from the value it was when it was last in a Stopped state.

Stop (Call)

Call this to Stop the Stopwatch. => puts the Stopwatch into a Stopped state. (default) Does nothing if the Stopwatch is already in the Stopped state. If Stopwatch Reset was not called, Time Output will be the value it was when it was last in a Stopped state. (default 0)

Reset (Call)

Call this to Reset the Stopwatch => puts the Stopwatch into a Stopped state. (default) Calling Reset sets the Time Output to zero (0).

Outputs

OnStarted (Continuation)

Sends an impulse after a Start (Call) has been impulsed.

OnStopped (Continuation)

Sends an impulse after a Stop (Call) has been impulsed.

OnReset (Continuation)

Sends an impulse after a Reset (Call) has been impulsed.

Time (Float)

The current Time state of the Stopwatch as a (Float) value.

IsRunning (Bool)

Is true if the Stopwatch is in a Running state and false if the Stopwatch is in a Stopped state.

Examples

TODO