Advanced coroutine handler.
public sealed class Routine<T> : KeepCoding.Internal.RoutineBase
Inheritance System.Object 🡒 RoutineBase 🡒 Routine<T>
Constructors | |
---|---|
Routine(Func<T,IEnumerator>, MonoBehaviour) | Creates a list of coroutines so that you can start, restart, or stop any coroutine running inside this class. |
Methods | |
---|---|
Restart(T, bool) | Stops and restarts the first coroutine that was run. |
RestartAll(T, bool) | Restarts all coroutines currently running. |
Start(T, bool, bool) | Starts the coroutine. Unless specified by allowMultiple, it will not be called if this class is in the middle of running the coroutine. |
StartOrRestart(T, bool, bool) | Starts a coroutine if no coroutines are running, otherwise restarts. |