mirror of
https://github.com/Ellpeck/Coroutine.git
synced 2024-12-22 09:09:23 +01:00
allow getting a list of all active coroutines
This commit is contained in:
parent
bf792e3e73
commit
b850b3bae0
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Coroutine {
|
||||
public static class CoroutineHandler {
|
||||
|
@ -53,6 +54,10 @@ namespace Coroutine {
|
|||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<ActiveCoroutine> GetActiveCoroutines() {
|
||||
return TickingCoroutines.Concat(EventCoroutines);
|
||||
}
|
||||
|
||||
private static IEnumerator<IWait> InvokeLaterImpl(IWait wait, Action action) {
|
||||
yield return wait;
|
||||
action();
|
||||
|
|
Loading…
Reference in a new issue