public override void Update(float delta) { if (_threadWorker == null) { return; } if (_playing) { if (CurrentPosition == AmountOfFrames - 1) { MainThreadInvoker.Enqueue(() => Finished?.Invoke()); _playing = false; return; } NextKeyFrame(); } else if (_rewindPlannedPos > 0) { Rewind?.Invoke(true); _currentPosition = _rewindPlannedPos; _rewindPlannedPos = -1; _threadWorker?.Enqueue(() => { _data.ShowAt(_actualTimestamps ![_currentPosition], true); Rewind?.Invoke(false); });
private void Timer_Tick(object sender, EventArgs e) { mode = true; Rewind?.Invoke(this, new EventArgs()); }