recrownedathenaeum/RecrownedAthenaeum/ContentReaders/NinePatchDataReader.cs

16 lines
476 B
C#
Raw Normal View History

using Microsoft.Xna.Framework.Content;
using Newtonsoft.Json;
2019-01-21 03:45:15 +00:00
namespace RecrownedAthenaeum.ContentReaders
{
2019-01-15 23:33:55 +00:00
class NinePatchDataReader : ContentTypeReader<SpecialTypes.NinePatch>
{
2019-01-15 23:33:55 +00:00
protected override SpecialTypes.NinePatch Read(ContentReader input, SpecialTypes.NinePatch existingInstance)
{
string serialized = input.ReadString();
return JsonConvert.DeserializeObject<SpecialTypes.NinePatch>(serialized);
}
}
}