Summary
Adds a micro thread function to the scriptSystem that executes when the event is published.
Syntax
public static MicroThread AddOnEventAction<T>(this ScriptSystem scriptSystem, EventReceiver<T> receiver, Action<T> action, long priority = 0)
If the action is a ScriptComponent instance method the micro thread will be automatically stopped if the ScriptComponent or Entity is removed.
Type Parameters
| Name |
Description |
| T |
The type of the event handler parameter. |
Parameters
| Name |
Type |
Description |
| scriptSystem |
ScriptSystem |
The ScriptSystem. |
| receiver |
EventReceiver<T> |
The event reciever to listen to for. |
| action |
Action<T> |
The micro thread function to execute. |
| priority |
long |
The priority of the micro thread action being added. |
Return Value
| Type |
Description |
| MicroThread |
The MicroThread. |