using Microsoft.Xna.Framework.Content.Pipeline; using Newtonsoft.Json; using System.IO; namespace RecrownedAthenaeum.Pipeline.TextureAtlas { [ContentImporter(".tatlas", DisplayName = "Texture Atlas Importer", DefaultProcessor = "TextureAtlasProcessor")] internal class TextureAtlasImporter : ContentImporter { public override TextureAtlasData Import(string filename, ContentImporterContext context) { TextureAtlasData atlas = JsonConvert.DeserializeObject(File.ReadAllText(filename)); context.AddDependency(atlas.textureName); return atlas; } } }