Example #1
0
        public SimpleAnimation AsScaleAnimation()
        {
            //todo: remove audioservice from here
            var AudioService = new AudioService();

            return(new SimpleAnimation(Texture, AnimationFrameChooser.AsScale(AudioService.GetCurrent), X, Y));
        }
Example #2
0
        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);
        }
Example #3
0
 public void Reset()
 {
     AnimationFrameChooser.Reset();
 }
Example #4
0
 public void SetFrameRate(int value)
 {
     AnimationFrameChooser.SetFrameRate(value);
 }
Example #5
0
 public SimpleAnimation Reverse()
 {
     return(new SimpleAnimation(Texture, AnimationFrameChooser.AsReverse(), X, Y));
 }