Class ControllableCoroutine
Provides more APIs than Unity standard coroutine.
Inheritance
System.Object
ControllableCoroutine
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: BulletStorm.Util
Assembly: BulletStorm.dll
Syntax
public sealed class ControllableCoroutine
Constructors
| Improve this Doc View SourceControllableCoroutine(IEnumerator, Action)
Create a coroutine.
Declaration
public ControllableCoroutine(IEnumerator coroutine, Action callback = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerator | coroutine | The coroutine function. |
System.Action | callback | Callback function on finish. |
Properties
| Improve this Doc View SourceStatus
Status of the coroutine.
Declaration
public CoroutineStatus Status { get; }
Property Value
Type | Description |
---|---|
CoroutineStatus |
Methods
| Improve this Doc View SourceInterrupt()
Same as Stop(), but will not send finish callback.
Declaration
public void Interrupt()
Pause()
Pauses the coroutine.
Declaration
public void Pause()
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
Start()
Starts or unpause the coroutine.
Declaration
public void Start()
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
Stop()
Stops the coroutine.
Declaration
public void Stop()