9 #include "GDCore/String.h"
10 #include "GDCore/Extensions/Builtin/SpriteExtension/Sprite.h"
12 class SerializerElement;
41 void SetLoop(
bool loop_);
53 void SetTimeBetweenFrames(
double time);
63 const Sprite& GetSprite(std::size_t nb)
const;
73 Sprite& GetSprite(std::size_t nb);
80 const std::vector<gd::String>& GetSpriteNames()
const;
87 bool HasNoSprites()
const;
94 std::size_t GetSpritesCount()
const;
101 void RemoveSprite(std::size_t index);
106 void RemoveAllSprites();
111 void AddSprite(
const Sprite& sprite);
116 void SwapSprites(std::size_t firstSpriteIndex, std::size_t secondSpriteIndex);
121 void MoveSprite(std::size_t oldIndex, std::size_t newIndex);
139 double timeBetweenFrame;
140 std::vector<Sprite> sprites;
Class defining a direction (set of frames) of an Animation.
Definition: Direction.h:28
virtual const gd::String & GetMetadata() const
Return the (optional) metadata associated to the Direction.
Definition: Direction.h:132
bool IsLooping() const
Return true if sprites looping is activated.
Definition: Direction.h:36
virtual void SetMetadata(const gd::String &metadata_)
Set the metadata (any string) associated to the Direction.
Definition: Direction.h:127
double GetTimeBetweenFrames() const
Get the time between each sprite.
Definition: Direction.h:46
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
Represents a sprite to be displayed on the screen.
Definition: Sprite.h:25
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24