/// <inheritdoc /> public override IEnumerator Update() { if (Data.PlaysOnRepeat == false) { yield break; } int endlessLoopCheck = 0; while (endlessLoopCheck < 100000) { IEnumerator update = childProcess.Update(); while (update.MoveNext()) { yield return(null); } childProcess.End(); childProcess.Start(); endlessLoopCheck++; } }
private void FinishCurrentState() { update = null; process.End(); fastForwardedStates[Stage] = false; switch (Stage) { case Stage.Inactive: return; case Stage.Activating: StartActive(); return; case Stage.Active: return; case Stage.Deactivating: StartInactive(); return; } }
public static void Remove(IProcess process) { if (mProcesses.Contains(process)) { process.End(); mProcesses.Remove(process); } }
public static void Update() { if (mProcesses.Count == 0) { return; } mTempProcesses.Clear(); mTempProcesses.AddRange(mProcesses); for (int i = 0; i < mTempProcesses.Count; i++) { IProcess ip = mTempProcesses[i]; if (!mProcesses.Contains(ip)) { continue; } if (!ip.IsFinished()) { ip.Update(Time.deltaTime * Speed); if (ip is Process && (ip as Process).onUpdate != null) { (ip as Process).onUpdate(Time.deltaTime * Speed); } } else { ip.End(); mProcesses.Remove(ip); if (ip != null && ip is Process) { if ((ip as Process).NextProcess != null) { Add((ip as Process).NextProcess); } } } } }
public void RemoveProcess(IProcess process) { process.End(); processes.Remove(process); }
private void CloseService() { _process.End(); _process = null; }