Explorar o código

removed spurrious code

Jumar Macato %!s(int64=7) %!d(string=hai) anos
pai
achega
dd407ac6db
Modificáronse 1 ficheiros con 5 adicións e 8 borrados
  1. 5 8
      src/Avalonia.Animation/Keyframes/KeyFramesStateMachine.cs

+ 5 - 8
src/Avalonia.Animation/Keyframes/KeyFramesStateMachine.cs

@@ -39,14 +39,10 @@ namespace Avalonia.Animation.Keyframes
         public void Start(Animation animation)
         {
             parentAnimation = animation;
+
             _delayTotalFrameCount = (ulong)(animation.Delay.Ticks / Timing.FrameTick.Ticks);
             _durationTotalFrameCount = (ulong)(animation.Duration.Ticks / Timing.FrameTick.Ticks);
-
-            if (_delayTotalFrameCount > 0)
-            {
-                _currentState = KeyFramesStates.DO_DELAY;
-            }
-
+ 
             switch (animation.RepeatBehavior)
             {
                 case RepeatBehavior.Loop:
@@ -93,7 +89,8 @@ namespace Avalonia.Animation.Keyframes
             if (_currentState == KeyFramesStates.DISPOSED)
                 throw new InvalidProgramException("This KeyFrames Animation is already disposed.");
 
-            if (_playState == PlayState.Stop) _currentState = KeyFramesStates.STOP;
+            if (_playState == PlayState.Stop)
+                _currentState = KeyFramesStates.STOP;
 
             // Save state and pause the machine
             if (_playState == PlayState.Pause && _currentState != KeyFramesStates.PAUSE)
@@ -133,7 +130,7 @@ namespace Avalonia.Animation.Keyframes
                     var tmp1 = (double)_durationFrameCount / _durationTotalFrameCount;
                     var easedTime = parentAnimation.Easing.Ease(tmp1);
                     _durationFrameCount++;
-                    
+
                     targetObserver.OnNext(Interpolator(easedTime));
                     break;