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(); } } }
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(); } }