using Microsoft.Xna.Framework;
using MonoGame.FourEngine.Components;
using MonoGame.FourEngine.Entities;
using MonoGame.FourEngine.Resources;

namespace LeMangeurDEnfants.Core.Entities
{
    public class AutoSprite : ComponentWrapper<SpriteComponent>
    {
        public AutoSprite(string fileName, Point size) : base(CreateComponent(fileName, size))
        {
        }

        private static SpriteComponent CreateComponent(string fileName, Point size)
            => new SpriteComponent(
                new SpriteDefinition
                {
                    FileName = fileName,
                    Size = size
                });
    }
}