public void Simulate(float simulateTime, bool withChildren = true, bool restart = false) { if (simulateTime == 0.0f) { return; } if (UseShuriken) { shurikenFallback.Simulate(simulateTime, withChildren, restart); return; } if (restart) { Stop(); Play(); } SystemComp.StartCoroutine(SimulateRoutine(simulateTime)); if (withChildren) { Children.ForEach(s => s.Simulate(simulateTime)); } }
public void Play(bool withChildren = true) { IsPaused = false; m_isPlaying = true; IsStopped = false; if (UseShuriken) { shurikenFallback.Play(withChildren); return; } if (!IsPaused || !looping && SystemTime >= Duration) { SystemComp.StartCoroutine(PlayRoutine()); } if (withChildren) { Children.ForEach(s => s.Play()); } }
/// <summary> /// Start playback of the current system /// </summary> /// <param name="withChildren">Should children system also start playback</param> public void Play(bool withChildren = true) { IsPaused = false; m_isPlaying = true; IsStopped = false; if (!IsPaused || !looping && SystemTime >= Duration) { if (delay > 0) { SystemComp.StartCoroutine(PlayRoutine()); } else { PlayInstant(); } } if (withChildren) { Children.ForEach(s => s.Play()); } }