R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
ecs::AnimationClip Struct Reference

Defines a sequence of frames for an animation. More...

#include <AnimationSet.hpp>

Collaboration diagram for ecs::AnimationClip:
Collaboration graph

Public Member Functions

 AnimationClip ()
 Default constructor.
 
 AnimationClip (const std::vector< Rectangle > &frames, float duration=0.1f, bool loop=true, const std::string &nextClip="")
 Constructor with all parameters.
 

Public Attributes

std::vector< Rectangleframes
 Frame rectangles in the texture.
 
float frameDuration
 Duration per frame in seconds.
 
bool loop
 Whether animation loops.
 
std::string nextClip
 Next clip name after completion (optional)
 

Detailed Description

Defines a sequence of frames for an animation.

Contains all frames (as source rectangles), timing information, loop behavior, and optional transition to next animation.

Definition at line 24 of file AnimationSet.hpp.

Constructor & Destructor Documentation

◆ AnimationClip() [1/2]

ecs::AnimationClip::AnimationClip ( )
inline

Default constructor.

Definition at line 33 of file AnimationSet.hpp.

◆ AnimationClip() [2/2]

ecs::AnimationClip::AnimationClip ( const std::vector< Rectangle > &  frames,
float  duration = 0.1f,
bool  loop = true,
const std::string &  nextClip = "" 
)
inline

Constructor with all parameters.

Parameters
framesFrame rectangles
durationDuration per frame in seconds
loopWhether animation loops
nextClipNext animation clip name

Definition at line 42 of file AnimationSet.hpp.

Member Data Documentation

◆ frameDuration

float ecs::AnimationClip::frameDuration

Duration per frame in seconds.

Definition at line 26 of file AnimationSet.hpp.

Referenced by ecs::AnimationSystem::update().

◆ frames

std::vector<Rectangle> ecs::AnimationClip::frames

Frame rectangles in the texture.

Definition at line 25 of file AnimationSet.hpp.

Referenced by ecs::AnimationSystem::update().

◆ loop

bool ecs::AnimationClip::loop

Whether animation loops.

Definition at line 27 of file AnimationSet.hpp.

Referenced by ecs::AnimationSystem::update().

◆ nextClip

std::string ecs::AnimationClip::nextClip

Next clip name after completion (optional)

Definition at line 28 of file AnimationSet.hpp.

Referenced by ecs::AnimationSystem::update().


The documentation for this struct was generated from the following file: