Implemented Custom Extensions for SpriteMaps (*.smap), Animations (*.anim) and AnimationSets (*.animset). Also restructured Frame to be a container for SpriteMapRegions rather than an extension of them. This will enable easier access to updating them when loading SpriteMaps in the Editor.
26 lines
569 B
C#
26 lines
569 B
C#
using Microsoft.Xna.Framework;
|
|
|
|
namespace QURO.AnimationLibrary
|
|
{
|
|
public class Animation
|
|
{
|
|
public string Name { get; set; }
|
|
public bool IsLooping { get; set; }
|
|
|
|
public Frame[] Frames { get; set; }
|
|
|
|
public bool IsStillImage => Frames.Length <= 1;
|
|
|
|
public Animation() : this("unnamed", new Frame[] { new Frame() }, false)
|
|
{
|
|
}
|
|
|
|
public Animation(string name, Frame[] frames, bool loop)
|
|
{
|
|
Name = name;
|
|
Frames = frames;
|
|
IsLooping = loop;
|
|
}
|
|
}
|
|
}
|