recrownedathenaeum/RecrownedAthenaeum.Pipeline/NinePatch/NinePatchImporter.cs

17 lines
592 B
C#

using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json;
using RecrownedAthenaeum.Data;
using System.IO;
namespace RecrownedAthenaeum.Pipeline.NinePatch
{
[ContentImporter(".9p", DisplayName = "Nine Patch Importer - RecrownedAthenaeum", DefaultProcessor = "NinePatchProcessor")]
internal class NinePatchImporter : ContentImporter<NinePatchData>
{
public override NinePatchData Import(string filename, ContentImporterContext context)
{
return JsonConvert.DeserializeObject<NinePatchData>(File.ReadAllText(filename));
}
}
}