using System; using System.Collections.Generic; using System.IO; namespace ACE.DatLoader.Entity { public class AnimationFrame : IUnpackable { public List Frames { get; } = new List(); public List Hooks { get; } = new List(); /// /// You must use the Unpack(BinaryReader reader, int numParts) method. /// /// You must use the Unpack(BinaryReader reader, int numParts) method. public void Unpack(BinaryReader reader) { throw new NotSupportedException(); } public void Unpack(BinaryReader reader, uint numParts) { Frames.Unpack(reader, numParts); uint numHooks = reader.ReadUInt32(); for (uint i = 0; i < numHooks; i++) { var hook = AnimationHook.ReadHook(reader); Hooks.Add(hook); } } } }