GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | List of all members
gd::SpriteAnimationList Class Reference

A list of animations, containing directions with images and collision mask. More...

#include <SpriteAnimationList.h>

Public Member Functions

void ExposeResources (gd::ArbitraryResourceWorker &worker)
 
const AnimationGetAnimation (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.
 
AnimationGetAnimation (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
 

Detailed Description

A list of animations, containing directions with images and collision mask.

It's used in the configuration of object that implements image-based animations.

See also
Animation
Direction
Sprite

The documentation for this class was generated from the following files: