Class Coroutiner
Special class used to run Coroutines on. When using any of its public static methods, it will instantiate itself and run any number of coroutines
Inherited Members
Namespace: Doozy.Runtime.Global
Assembly: cs.temp.dll.dll
Syntax
public class Coroutiner : SingletonBehaviour<Coroutiner>
Methods
DelayExecution(UnityAction, Int32)
Delay callback execution with for set number of frames
Declaration
public static IEnumerator DelayExecution(UnityAction callback, int numberOfFrames)
Parameters
Type | Name | Description |
---|---|---|
UnityAction | callback | Callback |
Int32 | numberOfFrames | Number of frames to wait until the callback is executed |
Returns
Type | Description |
---|---|
IEnumerator |
DelayExecution(UnityAction, Single)
Delay callback execution with for set time duration (in seconds)
Declaration
public static IEnumerator DelayExecution(UnityAction callback, float delay)
Parameters
Type | Name | Description |
---|---|---|
UnityAction | callback | Callback |
Single | delay | Time delay in seconds |
Returns
Type | Description |
---|---|
IEnumerator |
DelayExecutionToTheEndOfFrame(UnityAction)
Delay callback execution till the end of the current frame.
Declaration
public static IEnumerator DelayExecutionToTheEndOfFrame(UnityAction callback)
Parameters
Type | Name | Description |
---|---|---|
UnityAction | callback | Callback |
Returns
Type | Description |
---|---|
IEnumerator |
DelayExecutionToTheNextFrame(UnityAction)
Delay callback execution till the next frame.
Declaration
public static IEnumerator DelayExecutionToTheNextFrame(UnityAction callback)
Parameters
Type | Name | Description |
---|---|---|
UnityAction | callback | Callback |
Returns
Type | Description |
---|---|
IEnumerator |
ExecuteAtEndOfFrame(UnityAction)
Execute the given callback at the end of the current frame. Coroutine will run on the Coroutiner GameObject
Declaration
public static Coroutine ExecuteAtEndOfFrame(UnityAction callback)
Parameters
Type | Name | Description |
---|---|---|
UnityAction | callback | Callback |
Returns
Type | Description |
---|---|
Coroutine |
ExecuteLater(UnityAction, Int32)
Execute the given callback after the set number of frames has passed. Coroutine will run on the Coroutiner GameObject
Declaration
public static Coroutine ExecuteLater(UnityAction callback, int numberOfFrames)
Parameters
Type | Name | Description |
---|---|---|
UnityAction | callback | Callback |
Int32 | numberOfFrames | Number of frames to wait until the callback is executed |
Returns
Type | Description |
---|---|
Coroutine |
ExecuteLater(UnityAction, Single)
Execute the given callback after the set time delay (in seconds). Coroutine will run on the Coroutiner GameObject
Declaration
public static Coroutine ExecuteLater(UnityAction callback, float delay)
Parameters
Type | Name | Description |
---|---|---|
UnityAction | callback | Callback |
Single | delay | Time delay in seconds |
Returns
Type | Description |
---|---|
Coroutine |
ExecuteNextFrame(UnityAction)
Execute the given callback in the next frame. Coroutine will run on the Coroutiner GameObject
Declaration
public static Coroutine ExecuteNextFrame(UnityAction callback)
Parameters
Type | Name | Description |
---|---|---|
UnityAction | callback | Callback |
Returns
Type | Description |
---|---|
Coroutine |
Start(IEnumerator)
Start a Coroutine. Coroutine will run on the Coroutiner GameObject
Declaration
public static Coroutine Start(IEnumerator enumerator)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator | enumerator | Target enumerator |
Returns
Type | Description |
---|---|
Coroutine |
StartLocalCoroutine(IEnumerator)
Start a Coroutine. Coroutine will run on the Coroutiner GameObject
Declaration
public Coroutine StartLocalCoroutine(IEnumerator enumerator)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator | enumerator | The enumerator |
Returns
Type | Description |
---|---|
Coroutine |
Stop(Coroutine)
Stop the first Coroutine named methodName, or the Coroutine stored in routine running on Coroutiner
Declaration
public static void Stop(Coroutine coroutine)
Parameters
Type | Name | Description |
---|---|---|
Coroutine | coroutine | The coroutine |
Stop(IEnumerator)
Stop the first Coroutine named methodName, or the Coroutine stored in routine running on Coroutiner
Declaration
public static void Stop(IEnumerator enumerator)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator | enumerator | Target enumerator |
StopAll()
Stop all Coroutines running on Coroutiner
Declaration
public static void StopAll()
StopAllLocalCoroutines()
Stop all Coroutines running on this behaviour
Declaration
public void StopAllLocalCoroutines()
StopLocalCoroutine(Coroutine)
Stop the first Coroutine named methodName, or the Coroutine stored in routine running on this behaviour
Declaration
public void StopLocalCoroutine(Coroutine coroutine)
Parameters
Type | Name | Description |
---|---|---|
Coroutine | coroutine | The coroutine |
StopLocalCoroutine(IEnumerator)
Stop the first Coroutine named methodName, or the Coroutine stored in routine running on this behaviour
Declaration
public void StopLocalCoroutine(IEnumerator enumerator)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator | enumerator | The enumerator |