public void StopCoroutine(IEnumerator routine) { if (routine == null) { return; } _coroutineRunner.StopCoroutine(routine); }
public void End() { if (runner != null && timeInRoutine != null) { runner.StopCoroutine(timeInRoutine); } IsPlayingNormal.Value = false; isStopped = true; isReversing = false; hasEnded = true; gameSpeed = 0; }
public void OnDestroy() { destroyed = true; for (int i = 0; i < coroutineInstances.Count; i++) { CoroutineRunner corunner = (CoroutineRunner)coroutineInstances[i]; corunner.StopCoroutine((Coroutine)loopRoutines[i]); } isRunning = false; }
private static void StopGlobalCustomMessageQueue(bool clearQueue = false) { if (_globalCustomMessageQueueRoutine != null) { CoroutineRunner.StopCoroutine(_globalCustomMessageQueueRoutine); _globalCustomMessageQueueRoutine = null; } if (clearQueue) { _globalCustomMessageQueue.Clear(); } }
public void GetNextKey(GetKeyCallback callback, Action cancelCallback) { if (runner == null) { runner = CoroutineRunner.Instantiate(this.name + "_KeyGetter"); } else if (nextKeyRoutine != null) { if (storedGetNextKeyCancel != null) { storedGetNextKeyCancel.Invoke(); } runner.StopCoroutine(nextKeyRoutine); } storedGetNextKeyCancel = cancelCallback; nextKeyRoutine = GetNextKeyRoutine(callback); runner.StartCoroutine(nextKeyRoutine); }
protected override void Apply(Transform other) { spawnPos = spawnOnInitialPos? spawnPos : transform.position; if (spawnRoutine != null) { runner.StopCoroutine(spawnRoutine); } base.Apply(other); if (timeToRespawn == 0) { Respawn(); } else { spawnRoutine = toSpawnRoutine(); runner.StartCoroutine(spawnRoutine); } }
public static void StopCoroutine(IEnumerator routine) { coroutineRunner.StopCoroutine(routine); }
public static void StopCoroutine(this Coroutine coroutine) { coroutineRunner.StopCoroutine(coroutine); }
/// <summary> /// 停止协程 /// </summary> /// <param name="coroutine"></param> public static void StopCoroutine(Coroutine coroutine) { m_coroutineRunner.StopCoroutine(coroutine); }