public virtual void Play(KeyType key, bool forceReset = true) { if (IsDisposed) { return; } IsPlaying = true; if (CurrentTrack == null || !CurrentKey.Equals(key)) { CurrentKey = key; CurrentTrack = Tracks[CurrentKey]; ElapsedTime = 0; if (forceReset) { CurrentTrack.Reset(); } UpdateClippingRegion(); } else if (forceReset) { ElapsedTime = 0; CurrentTrack.Reset(); UpdateClippingRegion(); } }
public void Stop() { Pause(); CurrentTrack.Reset(); UpdateClippingRegion(); ElapsedTime = 0; }
public void Play(bool forceReset = true) { if (CurrentTrack == null) { throw new System.InvalidOperationException("Animation can't play or resume an invalid track"); } IsPlaying = true; if (forceReset) { ElapsedTime = 0; CurrentTrack.Reset(); UpdateClippingRegion(); } }