public SimpleAnimation AsScaleAnimation() { //todo: remove audioservice from here var AudioService = new AudioService(); return(new SimpleAnimation(Texture, AnimationFrameChooser.AsScale(AudioService.GetCurrent), X, Y)); }
public void Draw(SpriteBatch batch, int x = 0, int y = 0) { var frame = AnimationFrameChooser.GetNextFrame(DateTime.Now); batch.Draw( Texture, new Rectangle( X + x, Y + y, frame.Width, frame.Height), frame, Color.White, 0, Vector2.Zero, SpriteEffects.None, ZIndex); }
public void Reset() { AnimationFrameChooser.Reset(); }
public void SetFrameRate(int value) { AnimationFrameChooser.SetFrameRate(value); }
public SimpleAnimation Reverse() { return(new SimpleAnimation(Texture, AnimationFrameChooser.AsReverse(), X, Y)); }