diff --git a/Coroutine/CoroutineHandler.cs b/Coroutine/CoroutineHandler.cs
index 2575d2a..6254186 100644
--- a/Coroutine/CoroutineHandler.cs
+++ b/Coroutine/CoroutineHandler.cs
@@ -25,15 +25,21 @@ namespace Coroutine {
return CoroutineHandler.Instance.Start(coroutine, name, priority);
}
- ///
+ ///
public static ActiveCoroutine InvokeLater(Wait wait, Action action, string name = "", int priority = 0) {
return CoroutineHandler.Instance.InvokeLater(wait, action, name, priority);
}
+ ///
+ public static ActiveCoroutine InvokeLater(Event evt, Action action, string name = "", int priority = 0) {
+ return CoroutineHandler.Instance.InvokeLater(evt, action, name, priority);
+ }
+
///
public static void Tick(double deltaSeconds) {
CoroutineHandler.Instance.Tick(deltaSeconds);
}
+
///
public static void Tick(TimeSpan delta) {
CoroutineHandler.Instance.Tick(delta);
diff --git a/Coroutine/CoroutineHandlerInstance.cs b/Coroutine/CoroutineHandlerInstance.cs
index 4046b1d..8e47189 100644
--- a/Coroutine/CoroutineHandlerInstance.cs
+++ b/Coroutine/CoroutineHandlerInstance.cs
@@ -78,6 +78,19 @@ namespace Coroutine {
return this.Start(CoroutineHandlerInstance.InvokeLaterImpl(wait, action), name, priority);
}
+ ///
+ /// Causes the given action to be invoked after the given .
+ /// This is equivalent to a coroutine that waits for the given wait and then executes the given .
+ ///
+ /// The event to wait for
+ /// The action to execute after waiting
+ /// The that the underlying coroutine should have. Defaults to an empty string.
+ /// The that the underlying coroutine should have. The higher the priority, the earlier it is advanced compared to other coroutines that advance around the same time. Defaults to 0.
+ /// An active coroutine object representing this coroutine
+ public ActiveCoroutine InvokeLater(Event evt, Action action, string name = "", int priority = 0) {
+ return this.InvokeLater(new Wait(evt), action, name, priority);
+ }
+
///
/// Ticks this coroutine handler, causing all time-based s to be ticked.
///