Struct CoroutineOption
Represents options available for Coroutines, use predefined values or utility methods to create the option needed
Inherited Members
Namespace: LobsterFramework
Assembly: LobsterFramework.dll
Syntax
public struct CoroutineOption
Fields
| Improve this Doc View SourceContinue
The coroutine option to continue execution of the current coroutine
Declaration
public static readonly CoroutineOption Continue
Field Value
Type | Description |
---|---|
CoroutineOption |
Reset
The coroutine option to restart the coroutine execution from the beginning
Declaration
public static readonly CoroutineOption Reset
Field Value
Type | Description |
---|---|
CoroutineOption |
Methods
| Improve this Doc View SourceCondition(Func<bool>)
Pause the execution of coroutine until the condition has been met
Declaration
public static CoroutineOption Condition(Func<bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
Func<bool> | predicate | The condition to test for |
Returns
Type | Description |
---|---|
CoroutineOption | The CoroutineOption represents this option |
SubCoroutine(IEnumerable<CoroutineOption>)
Start a subcoroutine, current coroutine will not be executed until subcoroutine has finished
Declaration
public static CoroutineOption SubCoroutine(IEnumerable<CoroutineOption> subCoroutine)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<CoroutineOption> | subCoroutine | The subcoroutine to be executed |
Returns
Type | Description |
---|---|
CoroutineOption | The CoroutineOption represents this option |
WaitForCoroutine(Coroutine)
Pause the execution of coroutine until another coroutine has finished, cannot be used to wait for the current coroutine itself
Declaration
public static CoroutineOption WaitForCoroutine(Coroutine coroutine)
Parameters
Type | Name | Description |
---|---|---|
Coroutine | coroutine | The coroutine to wait for, cannot be the current executing coroutine itself |
Returns
Type | Description |
---|---|
CoroutineOption | The CoroutineOption represents this option |
WaitForSeconds(float)
Pause the execution of coroutine for the specified seconds, will be affected by Time.timeScale
Declaration
public static CoroutineOption WaitForSeconds(float time)
Parameters
Type | Name | Description |
---|---|---|
float | time | time to pause the coroutine |
Returns
Type | Description |
---|---|
CoroutineOption | The CoroutineOption represents this option |
WaitForUnscaledSeconds(float)
Pause the execution of coroutine for the specified seconds, will not be affected by Time.timeScale
Declaration
public static CoroutineOption WaitForUnscaledSeconds(float time)
Parameters
Type | Name | Description |
---|---|---|
float | time | time to pause the coroutine |
Returns
Type | Description |
---|---|
CoroutineOption | The CoroutineOption represents this option |