mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-15 15:09:29 +00:00
d008b1bd41
* 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
19 lines
764 B
C#
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);
|
|
}
|
|
}
|
|
}
|