nngn
Loading...
Searching...
No Matches
nngn::SpriteAnimation Class Reference

#include <animation.h>

Inheritance diagram for nngn::SpriteAnimation:
Collaboration diagram for nngn::SpriteAnimation:

Classes

struct  Frame
 

Public Types

using Track = std::vector<Frame>
 
using Group = std::vector<Track>
 

Public Member Functions

void load (nngn::lua::table_view t)
 
void load (SpriteAnimation *o)
 
auto cur_track () const
 
auto track_count () const
 
const Framecur () const
 
void set_track (size_t index)
 
void update (const Timing &t)
 

Private Attributes

std::shared_ptr< const Groupm_group = {}
 
size_t m_cur_track = 0
 
size_t cur_frame = 0
 
std::chrono::microseconds timer = {}
 
bool updated = true
 

Additional Inherited Members

- Public Attributes inherited from nngn::Animation
Entityentity = nullptr
 

Member Typedef Documentation

◆ Group

using nngn::SpriteAnimation::Group = std::vector<Track>

◆ Track

using nngn::SpriteAnimation::Track = std::vector<Frame>

Member Function Documentation

◆ cur()

const SpriteAnimation::Frame * nngn::SpriteAnimation::cur ( ) const
Here is the caller graph for this function:

◆ cur_track()

auto nngn::SpriteAnimation::cur_track ( ) const
inline

◆ load() [1/2]

void nngn::SpriteAnimation::load ( nngn::lua::table_view t)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load() [2/2]

void nngn::SpriteAnimation::load ( SpriteAnimation * o)

◆ set_track()

void nngn::SpriteAnimation::set_track ( size_t index)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ track_count()

auto nngn::SpriteAnimation::track_count ( ) const
inline
Here is the caller graph for this function:

◆ update()

void nngn::SpriteAnimation::update ( const Timing & t)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ cur_frame

size_t nngn::SpriteAnimation::cur_frame = 0
private

◆ m_cur_track

size_t nngn::SpriteAnimation::m_cur_track = 0
private

◆ m_group

std::shared_ptr<const Group> nngn::SpriteAnimation::m_group = {}
private

◆ timer

std::chrono::microseconds nngn::SpriteAnimation::timer = {}
private

◆ updated

bool nngn::SpriteAnimation::updated = true
private

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