Esempio n. 1
0
 private void runAnimation(IAnimation animation)
 {
     if (animation == null || animation.State.IsPaused)
     {
         return;
     }
     if (animation.State.TimeToNextFrame < 0)
     {
         return;
     }
     if (_gameState.Cutscene.IsSkipping && animation.Configuration.Loops > 0)
     {
         animation.State.TimeToNextFrame = 0;
         while (animation.NextFrame())
         {
         }
     }
     else
     {
         animation.State.TimeToNextFrame--;
         if (animation.State.TimeToNextFrame < 0)
         {
             animation.NextFrame();
         }
     }
 }
Esempio n. 2
0
		private void runAnimation(IAnimation animation)
		{
			if (animation == null || animation.State.IsPaused)
				return;
			if (animation.State.TimeToNextFrame < 0)
				return;
			if (_gameState.Cutscene.IsSkipping && animation.Configuration.Loops > 0)
			{
				animation.State.TimeToNextFrame = 0;
				while (animation.NextFrame()) ;
			}
			else
			{
				animation.State.TimeToNextFrame--;
				if (animation.State.TimeToNextFrame < 0)
					animation.NextFrame();
			}
		}