Resolution independent 2D graphics engine
qr::sprite_loop_animator

Class Description

Animator which repeatedly loops through all the frames in a sprite. One instance of this animator can be used to animate many scene nodes. Inherits qr::animator.

Public Methods

sprite_loop_animator (float framerate)

Protected Methods

void on_attach (qr::scene_node *node)
void on_animate (qr::scene_node *node, float time_delta)
void on_detach (qr::scene_node *node)

Details

qr::sprite_loop_animator::sprite_loop_animator ( float framerate
) [inline]

Description

Creates a sprite loop animator and sets the frame rate.

Paramiters

framerate Number of frames per second
void qr::sprite_loop_animator::on_attach ( qr::scene_node * node
) [protected, virtual]

Description

Create tree var to track current frame.

Paramiters

node
void qr::sprite_loop_animator::on_animate ( qr::scene_node * node,
float time_delta
) [protected, virtual]

Description

Loop through sprite animation frames.

Paramiters

node
time_delta
void qr::sprite_loop_animator::on_detach ( qr::scene_node * node
) [protected, virtual]

Description

Delete tree var.

Paramiters

node