54 void addFrame(
Image *image,
int delay,
int offsetX,
int offsetY);
86 const std::string &dyePalettes = {});
An animation consists of several frames, each with their own delay and offset.
Frame * getFrame(int index)
Returns the frame at the specified index.
static bool isTerminator(const Frame &phase)
Determines whether the given animation frame is a terminator.
int getLength() const
Returns the length of this animation in frames.
void addFrame(Image *image, int delay, int offsetX, int offsetY)
Appends a new animation at the end of the sequence.
std::vector< Frame > mFrames
int getDuration() const
Returns the duration of this animation in milliseconds.
ResourceRef< ImageSet > mImageSet
static Animation fromXML(XML::Node node, const std::string &dyePalettes={})
Loads an animation from XML.
void addTerminator()
Appends an animation terminator that states that the animation should not loop.
Defines a class for loading and storing images.
Automatically counting Resource reference.
A single frame in an animation, with a delay and an offset.