recrownedathenaeum/RecrownedAthenaeum.Pipeline/NinePatch/NinePatchProcessor.cs

18 lines
616 B
C#
Raw Normal View History

using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json;
using RecrownedAthenaeum.Data;
namespace RecrownedAthenaeum.Pipeline.NinePatch
{
[ContentImporter(DisplayName = "Nine Patch - RecrownedAthenaeum")]
class NinePatchProcessor : ContentProcessor<string, NinePatchData>
{
public override NinePatchData Process(string input, ContentProcessorContext context)
{
NinePatchData ninePatchData = JsonConvert.DeserializeObject<NinePatchData>(input);
context.AddDependency(ninePatchData.textureName);
return ninePatchData;
}
}
}