Table of Contents
Class for scheduling Tasks using MelonCoroutines
public static class TaskScheduler
Inheritance System.Object TaskScheduler
Schedule a task to execute later on as a Coroutine
public static void ScheduleTask(System.Action action, BTD_Mod_Helper.Api.Enums.ScheduleType scheduleType, int amountToWait, System.Func<bool> waitCondition=null);
action
System.Action
The action you want to execute once it's time to run your task
scheduleType
ScheduleType
How you want to wait for your task
amountToWait
System.Int32
The amount you want to wait
waitCondition
System.Func<System.Boolean>
Wait for this to be true before executing task
Schedule a task to execute later on as a Coroutine. By default will wait until the end of this current frame
public static void ScheduleTask(System.Action action, System.Func<bool> waitCondition=null);
action
System.Action
The action you want to execute once it's time to run your task
waitCondition
System.Func<System.Boolean>
Wait for this to be true before executing task
Schedule a task to execute right now as a Coroutine
public static void ScheduleTask(System.Collections.IEnumerator iEnumerator);
iEnumerator
System.Collections.IEnumerator
This coroutine will wait for amountToWait before finishing
private static System.Collections.IEnumerator WaiterCoroutine(System.Action action, BTD_Mod_Helper.Api.Enums.ScheduleType scheduleType, int amountToWait, System.Func<bool> waitCondition=null);
action
System.Action
scheduleType
ScheduleType
amountToWait
System.Int32
waitCondition
System.Func<System.Boolean>