Beispiel #1
0
 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;
             }
         }
     }
 }
Beispiel #2
0
 private void _SequenceExecutorSequenceEnded(object sender, SequenceEventArgs e)
 {
     CurrentEffects.Reset();
     OnSequenceEnded(e);
     OnContextEnded(EventArgs.Empty);
 }
Beispiel #3
0
 private void _sequenceExecutor_SequenceReStarted(object sender, SequenceStartedEventArgs e)
 {
     CurrentEffects.Reset();
     OnSequenceReStarted(e);
 }