GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
A list of animations, containing directions with images and collision mask. More...
#include <SpriteAnimationList.h>
Public Member Functions | |
void | ExposeResources (gd::ArbitraryResourceWorker &worker) |
const Animation & | GetAnimation (std::size_t nb) const |
Return the animation at the specified index. If the index is out of bound, a "bad animation" object is returned. | |
Animation & | GetAnimation (std::size_t nb) |
Return the animation at the specified index. If the index is out of bound, a "bad animation" object is returned. | |
std::size_t | GetAnimationsCount () const |
Return the number of animations this object has. | |
bool | HasAnimationNamed (const gd::String &name) const |
Return true if an animation exists for a given name. | |
void | AddAnimation (const Animation &animation) |
Add an animation at the end of the existing ones. | |
bool | RemoveAnimation (std::size_t nb) |
Remove an animation. | |
void | RemoveAllAnimations () |
Remove all animations. | |
bool | HasNoAnimations () const |
Return true if the object hasn't any animation. | |
void | SwapAnimations (std::size_t firstIndex, std::size_t secondIndex) |
Swap the position of two animations. | |
void | MoveAnimation (std::size_t oldIndex, std::size_t newIndex) |
Change the position of the specified animation. | |
const std::vector< Animation > & | GetAllAnimations () const |
Return a read-only reference to the vector containing all the animation of the object. | |
bool | AdaptCollisionMaskAutomatically () const |
Check if the collision mask adapts automatically to the animation. | |
void | SetAdaptCollisionMaskAutomatically (bool enable) |
Set if the collision mask adapts automatically to the animation. | |
void | UnserializeFrom (const gd::SerializerElement &element) |
void | SerializeTo (gd::SerializerElement &element) const |
A list of animations, containing directions with images and collision mask.
It's used in the configuration of object that implements image-based animations.