using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using MLEM.Font;
using MLEM.Startup;
using MLEM.Textures;

namespace TouchyTickets {
    public static class Assets {

        public static UniformTextureAtlas TilesTexture { get; private set; }
        public static UniformTextureAtlas AttractionTexture { get; private set; }
        public static UniformTextureAtlas UiTexture { get; private set; }

        public static SoundEffect ClickSound { get; private set; }
        public static SoundEffect PlaceSound { get; private set; }
        public static SoundEffect BuySound { get; private set; }

        public static Vector2 TileSize { get; private set; }
        public static GenericFont Font { get; private set; }
        public static GenericFont MonospacedFont { get; private set; }

        public static void Load() {
            TilesTexture = new UniformTextureAtlas(MlemGame.LoadContent<Texture2D>("Textures/Tiles"), 16, 16);
            AttractionTexture = new UniformTextureAtlas(MlemGame.LoadContent<Texture2D>("Textures/Attractions"), 16, 16);
            UiTexture = new UniformTextureAtlas(MlemGame.LoadContent<Texture2D>("Textures/Ui"), 16, 16);

            ClickSound = MlemGame.LoadContent<SoundEffect>("Sounds/Click");
            PlaceSound = MlemGame.LoadContent<SoundEffect>("Sounds/Place");
            BuySound = MlemGame.LoadContent<SoundEffect>("Sounds/StarBuy");

            TileSize = new Vector2(AttractionTexture.RegionWidth, AttractionTexture.RegionHeight);
            Font = new GenericSpriteFont(MlemGame.LoadContent<SpriteFont>("Fonts/" + Localization.Get("Font")));
            MonospacedFont = new GenericSpriteFont(MlemGame.LoadContent<SpriteFont>("Fonts/Monospaced"));
        }

    }
}