27 lines
916 B
C#
27 lines
916 B
C#
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
|||
|
using Microsoft.Xna.Framework.Graphics;
|
|||
|
using RecrownedAthenaeum.DataTypes;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.IO;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Xml.Serialization;
|
|||
|
|
|||
|
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
|||
|
{
|
|||
|
internal class TextureAtlasImporter : ContentImporter<TextureAtlasTemplate>
|
|||
|
{
|
|||
|
public override TextureAtlasTemplate Import(string filename, ContentImporterContext context)
|
|||
|
{
|
|||
|
StreamReader stream = new StreamReader(filename);
|
|||
|
XmlSerializer serializer = new XmlSerializer(typeof(TextureAtlasTemplate));
|
|||
|
TextureAtlasTemplate atlas = (TextureAtlasTemplate)serializer.Deserialize(stream);
|
|||
|
context.AddDependency(atlas.textureName);
|
|||
|
stream.Dispose();
|
|||
|
return atlas;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|