static CoroutineManager() { if (coroutine == null) { coroutine = new GameObject("CoroutineManager").AddComponent <InnerCoroutine>(); GameObject.DontDestroyOnLoad(coroutine); } }
public IEnumerator Start() { while (InnerCoroutine.MoveNext()) { yield return(InnerCoroutine.Current); } Completed = true; }
protected virtual void StartWait(float timeout, bool ignoreTimeScale = false) { var iEnumerator = Wait.WaitFor(() => { if (Check()) { return(new WaitSuccess()); } return(new WaitFailed(errorMessage)); }, timeout, ignoreTimeScale: ignoreTimeScale); innerCroutine = new InnerCoroutine(iEnumerator, OnCompleteCallback); CoroutineProvider.Mono.StartCoroutine(innerCroutine); }
public void Reset() { InnerCoroutine.Reset(); }
public bool MoveNext() { return(InnerCoroutine.MoveNext()); }
public CoroutineManager() { innerCoroutine = new GameObject("_Coroutine").AddComponent <InnerCoroutine>(); waits = new Dictionary <float, WaitForSeconds>(); }