mirror of
https://github.com/Ellpeck/Coroutine.git
synced 2024-11-21 21:33:29 +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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Coroutine {
|
namespace Coroutine {
|
||||||
public static class CoroutineHandler {
|
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) {
|
private static IEnumerator<IWait> InvokeLaterImpl(IWait wait, Action action) {
|
||||||
yield return wait;
|
yield return wait;
|
||||||
action();
|
action();
|
||||||
|
|
Loading…
Reference in a new issue