recrownedathenaeum/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasWriter.cs

22 lines
698 B
C#
Raw Normal View History

using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using Newtonsoft.Json;
using TWrite = RecrownedAthenaeum.Pipeline.TextureAtlas.TextureAtlasData;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
[ContentTypeWriter]
class TextureAtlasWriter : ContentTypeWriter<TWrite>
{
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
return "RecrownedAthenaeum.Pipeline, TextureAtlasDataReader";
}
protected override void Write(ContentWriter output, TWrite value)
{
output.Write(JsonConvert.SerializeObject(value));
}
}
}