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

namespace Rotor.Win32.Entities
{
    public class Mouse : BasicEntity
    {
        protected override SpriteDefinition SpriteDefinition
            => new SpriteDefinition
            {
                FileName = Resources.Sprites.Mouse,
                Size = new Point(20)
            };

        public Mouse()
        {
            SpriteComponent.Layer = int.MaxValue;
        }

        public override void OnUpdate(UpdateEventArgs args)
        {
            base.OnUpdate(args);
            SpriteComponent.Position = args.Pointer.Position;
        }
    }
}