Summary
Adds a micro thread function to the scriptSystem that executes after waiting specified delay.
- Namespace
- StrideToolkit
.Engine - Containing Type
- Script
System Extensions
Syntax
public static MicroThread AddTask(this ScriptSystem scriptSystem, Func<Task> action, TimeSpan delay, 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 | Func |
The micro thread function to execute. |
delay | TimeSpan | The amount of time to wait for. |
priority | long | The priority of the micro thread action being added. |
Return Value
Type | Description |
---|---|
MicroThread | The MicroThread . |