Uranus  1.0.1.0
Uranus is a GameEngine written in C++
Loading...
Searching...
No Matches
tson::Animation Class Reference
Collaboration diagram for tson::Animation:
[legend]

Public Member Functions

 Animation (const std::vector< tson::Frame > &frames)
 
bool any () const
 
const tson::FramegetCurrentFrame () const
 
uint32_t getCurrentFrameNumber () const
 
uint32_t getCurrentTileId () const
 
const std::vector< tson::Frame > & getFrames () const
 
float getTimeDelta () const
 
void reset ()
 
void setCurrentFrame (uint32_t currentFrame)
 
void setFrames (const std::vector< tson::Frame > &frames)
 
void setTimeDelta (float timeDelta)
 
size_t size () const
 
void update (float timeDeltaMs)
 

Private Member Functions

int nextFrame ()
 

Private Attributes

uint32_t m_currentFrame {0}
 
std::vector< tson::Framem_frames
 
float m_timeDelta {0}
 

Member Function Documentation

◆ any()

bool tson::Animation::any ( ) const
inline

True if any frames exists, false otherwise

Returns

◆ getCurrentFrame()

const tson::Frame * tson::Animation::getCurrentFrame ( ) const
inline

Gets the current frame or nullptr if no frame is found.

Returns

◆ reset()

void tson::Animation::reset ( )
inline

Resets the current frame and time delta to 0.

◆ update()

void tson::Animation::update ( float  timeDeltaMs)
inline

Update animation based on the fra

Parameters
timedeltaMsTime in milliseconds

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