public void Clear(bool waitForReset = true) { _dataSource.ClearData(); if (!IsRunning || IsPaused) { Logging.Error("Attempt to clear effects from a non running context"); return; } CurrentEffects.Reset(); if (waitForReset) { //wait for reset to occur, but time out if it does not happen var sw = Stopwatch.StartNew(); while (CurrentEffects.Resetting()) { if (sw.ElapsedMilliseconds > 1000) { Logging.Error("Attempt to clear current effects timed out after 1 second."); break; } } } }
private void _SequenceExecutorSequenceEnded(object sender, SequenceEventArgs e) { CurrentEffects.Reset(); OnSequenceEnded(e); OnContextEnded(EventArgs.Empty); }
private void _sequenceExecutor_SequenceReStarted(object sender, SequenceStartedEventArgs e) { CurrentEffects.Reset(); OnSequenceReStarted(e); }