Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::ecs::components::Animation Struct Reference

Component representing an animation. More...

#include <Animation.hpp>

Collaboration diagram for rtp::ecs::components::Animation:

Public Attributes

int totalFrames {1}
 Total frames including all animations.
 
int currentFrame {0}
 Index of the currently displayed frame (0 to totalFrames - 1)
 
float frameDuration {0.1f}
 Duration of each frame in seconds.
 
bool loop {true}
 Whether the animation should loop.
 
float elapsedTime {0.0f}
 Time elapsed since the animation started.
 
int frameLeft {0}
 Left position of the current frame.
 
int frameTop {0}
 Top position of the current frame.
 
int frameWidth {0}
 Width of the current frame.
 
int frameHeight {0}
 Height of the current frame.
 

Detailed Description

Component representing an animation.

Definition at line 17 of file Animation.hpp.

Member Data Documentation

◆ currentFrame

int rtp::ecs::components::Animation::currentFrame {0}

Index of the currently displayed frame (0 to totalFrames - 1)

Definition at line 19 of file Animation.hpp.

◆ elapsedTime

float rtp::ecs::components::Animation::elapsedTime {0.0f}

Time elapsed since the animation started.

Definition at line 22 of file Animation.hpp.

Referenced by rtp::client::AnimationSystem::update().

◆ frameDuration

float rtp::ecs::components::Animation::frameDuration {0.1f}

Duration of each frame in seconds.

Definition at line 20 of file Animation.hpp.

◆ frameHeight

int rtp::ecs::components::Animation::frameHeight {0}

Height of the current frame.

Definition at line 26 of file Animation.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef().

◆ frameLeft

int rtp::ecs::components::Animation::frameLeft {0}

Left position of the current frame.

Definition at line 23 of file Animation.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef().

◆ frameTop

int rtp::ecs::components::Animation::frameTop {0}

Top position of the current frame.

Definition at line 24 of file Animation.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef().

◆ frameWidth

int rtp::ecs::components::Animation::frameWidth {0}

Width of the current frame.

Definition at line 25 of file Animation.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef().

◆ loop

bool rtp::ecs::components::Animation::loop {true}

Whether the animation should loop.

Definition at line 21 of file Animation.hpp.

◆ totalFrames

int rtp::ecs::components::Animation::totalFrames {1}

Total frames including all animations.

Definition at line 18 of file Animation.hpp.

Referenced by rtp::client::EntityTemplate::makeFromDef().


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