using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Game200
{
    public class Ray
    {
        public Rectangle rec;
        public Texture2D image;
        public float angle;
        public Color color;

        public Ray()
        {
            image = C.LoadImage("pixel");
        }

        public void Update(Vec position, float dist, float angle, Color color)
        {
            this.angle = angle;
            this.color = color;
            rec = new Rectangle(C.FromCoord(position), new Point((int)(dist + 0.5f), 1));
        }

        public void Draw()
        {
            C.spriteBatch.Draw(image, rec, null, color, angle, Vector2.Zero, SpriteEffects.None, 0);
        }
    }
}
