ScriptSystemExtensions.

AddAction(ScriptSystem, Action, TimeSpan, TimeSpan, long) Method

Summary

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

Syntax

public static MicroThread AddAction(this ScriptSystem scriptSystem, Action action, TimeSpan delay, TimeSpan repeatEvery, 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.
repeatEvery TimeSpan The amount of time to wait for between repetition.
priority long The priority of the micro thread action being added.

Return Value

Type Description
MicroThread The MicroThread.