using Microsoft.Xna.Framework;
using MonoGame.FourEngine;
using MonoGame.FourEngine.Attributes;

namespace LeMangeurDEnfants.Core.Scenes
{
    [Default]
    public class ScaleScene : Scene
    {
        public DrawingSurface GameSurface { get; private set; }

        public ScaleScene()
        {
            AddEntity(GameSurface = new DrawingSurface(Configuration.InnerResolution));
            GameSurface.NavigateTo<StartScene>();
            GameSurface.Transformations.Add(ScaleField);
        }

        private void ScaleField(SpriteDrawEventArgs args)
        {
            args.DestinationRectangle =
                new Rectangle(0, 0, DrawingSurface.Width, DrawingSurface.Height);
        }
    }
}