Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Olympe::AnimationSequence Struct Reference

Defines a complete animation sequence. More...

#include <AnimationTypes.h>

Public Member Functions

 AnimationSequence ()
 
float GetTotalDuration () const
 
float GetEffectiveFPS () const
 
int GetFrameCount () const
 

Public Attributes

std::string name
 Animation name (e.g., "idle", "walk")
 
std::string spritesheetId
 References SpritesheetInfo.id.
 
int startFrame = 0
 Starting frame index (0-based)
 
int frameCount = 1
 Number of frames in sequence.
 
float frameDuration = 0.1f
 Duration of each frame in seconds.
 
bool loop = true
 Whether animation loops.
 
float speed = 1.0f
 Speed multiplier.
 
std::string nextAnimation
 Animation to play after this one.
 
std::string spritesheetPath
 Path to spritesheet texture.
 
std::vector< AnimationFrameframes
 Frame data.
 

Detailed Description

Defines a complete animation sequence.

Definition at line 173 of file AnimationTypes.h.

Constructor & Destructor Documentation

◆ AnimationSequence()

Olympe::AnimationSequence::AnimationSequence ( )
inline

Definition at line 190 of file AnimationTypes.h.

Member Function Documentation

◆ GetEffectiveFPS()

float Olympe::AnimationSequence::GetEffectiveFPS ( ) const
inline

Definition at line 206 of file AnimationTypes.h.

References frameDuration, and speed.

◆ GetFrameCount()

int Olympe::AnimationSequence::GetFrameCount ( ) const
inline

Definition at line 210 of file AnimationTypes.h.

References frameCount, and frames.

◆ GetTotalDuration()

float Olympe::AnimationSequence::GetTotalDuration ( ) const
inline

Definition at line 202 of file AnimationTypes.h.

References frameCount, frameDuration, and speed.

Member Data Documentation

◆ frameCount

int Olympe::AnimationSequence::frameCount = 1

Number of frames in sequence.

Definition at line 179 of file AnimationTypes.h.

Referenced by GetFrameCount(), and GetTotalDuration().

◆ frameDuration

float Olympe::AnimationSequence::frameDuration = 0.1f

Duration of each frame in seconds.

Definition at line 181 of file AnimationTypes.h.

Referenced by GetEffectiveFPS(), and GetTotalDuration().

◆ frames

std::vector<AnimationFrame> Olympe::AnimationSequence::frames

Frame data.

Definition at line 188 of file AnimationTypes.h.

Referenced by GetFrameCount().

◆ loop

bool Olympe::AnimationSequence::loop = true

Whether animation loops.

Definition at line 182 of file AnimationTypes.h.

◆ name

std::string Olympe::AnimationSequence::name

Animation name (e.g., "idle", "walk")

Definition at line 175 of file AnimationTypes.h.

Referenced by Olympe::AnimationEditorWindow::AddSequence(), and Olympe::AnimationEditorWindow::ImportBankJSON().

◆ nextAnimation

std::string Olympe::AnimationSequence::nextAnimation

Animation to play after this one.

Definition at line 184 of file AnimationTypes.h.

◆ speed

float Olympe::AnimationSequence::speed = 1.0f

Speed multiplier.

Definition at line 183 of file AnimationTypes.h.

Referenced by GetEffectiveFPS(), GetTotalDuration(), and AnimationSystem::UpdateEntity().

◆ spritesheetId

std::string Olympe::AnimationSequence::spritesheetId

References SpritesheetInfo.id.

Definition at line 176 of file AnimationTypes.h.

◆ spritesheetPath

std::string Olympe::AnimationSequence::spritesheetPath

Path to spritesheet texture.

Definition at line 187 of file AnimationTypes.h.

◆ startFrame

int Olympe::AnimationSequence::startFrame = 0

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