private void RecycleTask(CoroutineTask task) { Log.I(this, "Recycle coroutine task [{0}]", task.name); task.Dispose(); tasks.Remove(task); }
public void CheckAndRecycleTask(CoroutineTask task) { if (CheckTask(task)) { RecycleTask(task); } }
public CoroutineTask Execute(CoroutineTask task) { if (task.GetMonoBehaviour() == null) { task.SetMonoBehaviour(CoroutineTaskExecutor.instance); } tasks.Add(task); task.ExecuteInternal(); return(task); }
private bool CheckTask(CoroutineTask task) { return(task != null && task.ShouldRecycle() && !task.isRecycled); }
public static void CheckAndRecycle(CoroutineTask task) { CoroutineTaskManager.instance.CheckAndRecycleTask(task); }