using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Hover
{
    class Sprite
    {
        public Vector2 Position;
        public Vector2 DrawOffset;

        public Texture2D Tex;
        public Rectangle SourceRec;
        public SpriteEffects Effects;
        public Color Color = Color.White;
        public Vector2 Origin;
        public float Rotation;
        

        public Sprite()
        {
            Tex = Engine.Spritesheet;
        }

        public virtual void Update()
        {

        }

        public virtual void Draw(SpriteBatch sb)
        {
            var pos = Position + DrawOffset;
            if (Engine.PixelClampPositions)
                pos = new Vector2((int)pos.X, (int)pos.Y);

            sb.Draw(Tex, pos, SourceRec, Color, Rotation, Origin, 1, Effects, 1);
        }
    }
}
