Search Results for

    Show / Hide Table of Contents

    Struct CoroutineOption

    Represents options available for Coroutines, use predefined values or utility methods to create the option needed

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: LobsterFramework
    Assembly: LobsterFramework.dll
    Syntax
    public struct CoroutineOption

    Fields

    | Improve this Doc View Source

    Continue

    The coroutine option to continue execution of the current coroutine

    Declaration
    public static readonly CoroutineOption Continue
    Field Value
    Type Description
    CoroutineOption
    | Improve this Doc View Source

    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 Source

    Condition(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

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    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

    • Improve this Doc
    • View Source
    In This Article
    Back to top LobsterFramework documentation