mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-22 03:15:20 +00:00
29 lines
812 B
C#
29 lines
812 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.Drawing.Imaging;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Newtonsoft.Json.Linq;
|
|
using OMI.Formats.Pck;
|
|
using PckStudio.Extensions;
|
|
using PckStudio.Interfaces;
|
|
|
|
namespace PckStudio.Internal.Serializer
|
|
{
|
|
internal sealed class AnimationSerializer : IPckAssetSerializer<Animation>
|
|
{
|
|
public static readonly AnimationSerializer DefaultSerializer = new AnimationSerializer();
|
|
|
|
public void Serialize(Animation animation, ref PckAsset file)
|
|
{
|
|
string anim = animation.BuildAnim();
|
|
file.SetProperty("ANIM", anim);
|
|
var texture = animation.BuildTexture();
|
|
file.SetTexture(texture);
|
|
}
|
|
}
|
|
}
|