ScriptSystemExtensions.

AddAction(ScriptSystem, Action, TimeSpan, long) Method

Summary

Adds a micro thread function to the scriptSystem that executes after waiting specified delay.
Namespace
StrideToolkit.Engine
Containing Type
ScriptSystemExtensions

Syntax

public static MicroThread AddAction(this ScriptSystem scriptSystem, Action 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 Action 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.