32 : mAnimation(std::move(animation))
40 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.
int getLength() const
Returns the length of this animation in frames.
static Animation fromXML(XML::Node node, const std::string &dyePalettes={})
Loads an animation from XML.
A central point of control for graphics.
bool drawImage(const Image *image, int x, int y)
Blits an image onto the screen.
Defines a class for loading and storing images.
Frame * mCurrentFrame
Current animation phase.
int mAnimationTime
Time in milliseconds the current frame is shown.
int mAnimationPhase
Index of current animation phase.
bool mInitialized
Tell whether the animation is ready.
Image * getCurrentImage() const
bool draw(Graphics *graphics, int posX, int posY) const
SimpleAnimation(Animation animation)
Creates a simple animation with an already created animation.
Animation mAnimation
The hosted animation.
void reset()
Resets the animation.