Component that handles animated flipbook sprites for an Actor. It manages a sequence of textures and plays them as an animation, supporting looping, play control, and frame rate adjustment.
It inherits from the SpriteComponent class.
FlipbookComponent(Actor* pOwner, const std::vector<Texture*>& pTextures, int pDrawOrder);
Constructor of a Flipbook component. It needs an owner, a vector of textures and a draw order (by default 100).
float GetAnimationFps() const;
Returns the animation frame rate.
void SetAnimationTextures(const std::vector<Texture*>& pTextures);
Sets the textures used for the animation
void SetAnimationFps(float pFps);
Sets the animation frame rate (frames per second)
void PlayAnimation();
Starts playing the animation from the beginning
inline bool IsAnimationEnded() const;
Returns if the animation is finished or not.
void SetCanPlay(bool canPlay);
Enables or disables animation playback
void SetIsLooping(bool looping);
Sets whether the animation should loop