using SFML.Graphics;
using SFML.Window;

namespace YourBeatingHeart.Main.Entities
{
    public class DrawableEntity : Entity
    {
        public Drawable Drawable { get; set; }

        public bool Visible { get; set; }

        public DrawableEntity(Drawable drawable, int layer = 0)
            : base(null, new Vector2f(), 0)
        {
            Drawable = drawable;
            Layer = layer;

            Visible = true;
        }


        public override void Update(float elapsedTime)
        {
        }

        public override void Draw(RenderTarget renderTarget)
        {
            if ((Drawable == null) || !Visible)
                return;

            renderTarget.Draw(Drawable);
        }
    }
}
