2018-12-05 01:19:31 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
|
|
|
|
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
|
2019-01-14 04:05:34 +00:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using System;
|
|
|
|
|
using TWrite = RecrownedAthenaeum.Pipeline.TextureAtlas.TextureAtlasData;
|
2018-12-05 01:19:31 +00:00
|
|
|
|
|
|
|
|
|
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
|
|
|
|
{
|
2018-12-05 08:28:09 +00:00
|
|
|
|
[ContentTypeWriter]
|
2019-01-14 04:05:34 +00:00
|
|
|
|
class TextureAtlasWriter : ContentTypeWriter<TWrite>
|
2018-12-05 01:19:31 +00:00
|
|
|
|
{
|
|
|
|
|
public override string GetRuntimeReader(TargetPlatform targetPlatform)
|
|
|
|
|
{
|
2018-12-05 08:28:09 +00:00
|
|
|
|
return "RecrownedAthenaeum.Pipeline, TextureAtlasDataReader";
|
2018-12-05 01:19:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-01-14 04:05:34 +00:00
|
|
|
|
protected override void Write(ContentWriter output, TWrite value)
|
2018-12-05 01:19:31 +00:00
|
|
|
|
{
|
2019-01-14 04:05:34 +00:00
|
|
|
|
output.Write(JsonConvert.SerializeObject(value));
|
2018-12-05 01:19:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|