recrownedathenaeum/RecrownedAthenaeum.Pipeline/NinePatch/NinePatchWriter.cs

22 lines
668 B
C#

using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using Newtonsoft.Json;
using RecrownedAthenaeum.Serializable;
namespace RecrownedAthenaeum.Pipeline.NinePatch
{
[ContentTypeWriter]
class NinePatchWriter : ContentTypeWriter<NinePatchData>
{
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
return "RecrownedAthenaeum.Pipeline, NinePatchDataReader";
}
protected override void Write(ContentWriter output, NinePatchData value)
{
output.Write(JsonConvert.SerializeObject(value));
}
}
}