Summary
Adds a micro thread function to the scriptSystem that executes after waiting specified delay and repeats execution.
- Namespace
- StrideToolkit
.Engine - Containing Type
- Script
System Extensions
Syntax
public static MicroThread AddOverTimeAction(this ScriptSystem scriptSystem, Action<float> action, TimeSpan duration, long priority = 0)
Remarks
If the action is a
ScriptComponent
instance method the micro thread will be automatically stopped if the ScriptComponent
or Entity
is removed.
Parameters
Name | Type | Description |
---|---|---|
scriptSystem | ScriptSystem | The ScriptSystem . |
action | Action |
The micro thread function to execute. The parameter is the progress over time from 0.0f to 1.0f. |
duration | TimeSpan | The duration of the time to execute the micro thread function for. |
priority | long | The priority of the micro thread action being added. |
Return Value
Type | Description |
---|---|
MicroThread | The MicroThread . |