public Coroutine StartCoroutine(TCoroutine coroutine) { if (mContainer != null) { mContainer.Add(coroutine); } return(coroutine.Start()); }
public Coroutine StartCoroutine(out TCoroutine coroutine, IEnumerator enumerator, Action <bool> onFinished = null, Action onTimeup = null, int timer = 0) { coroutine = new TCoroutine(this, null, enumerator, onFinished, onTimeup, timer); if (mContainer != null) { mContainer.Add(coroutine); } return(coroutine.Start()); }
public void StopCoroutine(TCoroutine coroutine) { if (mContainer == null) { return; } int index = mContainer.IndexOf(coroutine); if (index >= 0) { coroutine.Shutdown(); } }