📓

SpriteAnimation

public class SpriteAnimation
{
    public string name;
    public bool loopable = false;
    public List<SpriteFrame> frames;
//...

A class designed to describe a 2d animation. You can give it a name, set whether its loopable and then store the action game frames in the form of a SpriteFrame

Methods

public Sprite GetFrameSprite(int index)

Retrieves Sprite from animation by index or null if not available

public static SpriteAnimation BuildAnimation(string animationName, int duration, bool loopable, List<Sprite> sprites)

Helper function to build a SpriteAnimation from necessary pieces