Files
MonoGame.Extended/source/MonoGame.Extended.Content.Pipeline/Animations/AstridAnimatorImporter.cs
T
Christopher Whitley d008b1bd41 Replace Newtonsoft.Json with System.Text.Json (#869)
* Converted to use `System.Text.Json`

* Remove Newtonsoft.Json Dependency
Newtonsoft.Json dependency has been removed in favor of System.Text.Json

* Treat MGFXO file as binary
2024-05-22 23:23:36 -04:00

19 lines
764 B
C#

using System.IO;
using System.Text.Json;
using Microsoft.Xna.Framework.Content.Pipeline;
namespace MonoGame.Extended.Content.Pipeline.Animations
{
[ContentImporter(".aa", DefaultProcessor = "AstridAnimatorProcessor",
DisplayName = "Astrid Animator Importer - MonoGame.Extended")]
public class AstridAnimatorImporter : ContentImporter<ContentImporterResult<AstridAnimatorFile>>
{
public override ContentImporterResult<AstridAnimatorFile> Import(string filename, ContentImporterContext context)
{
var json = File.ReadAllText(filename);
var data = JsonSerializer.Deserialize<AstridAnimatorFile>(json);
return new ContentImporterResult<AstridAnimatorFile>(filename, data);
}
}
}