#include <ugdk/graphic/drawable/sprite.h>
ugdk::graphic::Sprite::Sprite |
( |
const std::string & |
spritesheet_tag, |
|
|
action::AnimationSet * |
set = NULL |
|
) |
| |
|
explicit |
ugdk::graphic::Sprite::Sprite |
( |
const std::string & |
spritesheet_tag, |
|
|
const std::string & |
animation_set_tag |
|
) |
| |
|
explicit |
ugdk::graphic::Sprite::Sprite |
( |
const Spritesheet * |
spritesheet, |
|
|
const std::string & |
animation_set_tag |
|
) |
| |
|
explicit |
ugdk::graphic::Sprite::~Sprite |
( |
| ) |
|
|
virtual |
void ugdk::graphic::Sprite::AddObserverToAnimation |
( |
action::Observer * |
observer | ) |
|
|
inline |
Add a observer object to the animation.
Given an observer object, the function include this in the animation manager
- Parameters
-
*observer | is a pointer to the observer object |
void ugdk::graphic::Sprite::AddTickFunctionToAnimation |
( |
std::tr1::function< void(void)> |
tick | ) |
|
|
inline |
void ugdk::graphic::Sprite::Draw |
( |
| ) |
const |
|
virtual |
double ugdk::graphic::Sprite::GetAnimationFPS |
( |
| ) |
const |
|
inline |
Return the animation FPS.
Return the animation FPS
- Returns
- a double equivalente to the animation FPS
int ugdk::graphic::Sprite::GetAnimationFrameNumber |
( |
| ) |
const |
|
inline |
Return the animation frame number.
- Returns
- an integer that is the animation frame number
void ugdk::graphic::Sprite::SelectAnimation |
( |
const std::string & |
animation_name | ) |
|
|
inline |
Change the current animation to a new animation from the previously selected AnimationSet.
Given a animation name (a string), the function changes the current animation to a new animation of AnimationSet
void ugdk::graphic::Sprite::SelectAnimation |
( |
int |
animation_index | ) |
|
|
inline |
Change the current animation to a new animation from the previo2usly selected AnimationSet.
Given a animation index (a integer), the function changes the current animation to a new animation of AnimationSet
void ugdk::graphic::Sprite::SetAnimationSlowdownFactor |
( |
double |
factor | ) |
|
|
inline |
Change the SlowdownFactor of the animation.
Given a a factor, this function set the animation SlowdownFactor to this value
- Parameters
-
void ugdk::graphic::Sprite::SetAnimationSpeedupFactor |
( |
double |
factor | ) |
|
|
inline |
Change the SpeedupFactor of the animation.
Given a a factor, this function set the animation SpeedupFactor to this value
- Parameters
-
void ugdk::graphic::Sprite::SetDefaultFrame |
( |
int |
frame | ) |
|
|
inline |
Set the default frame.
- Parameters
-
const Vector2D & ugdk::graphic::Sprite::size |
( |
| ) |
const |
|
virtual |
void ugdk::graphic::Sprite::Update |
( |
double |
dt | ) |
|
|
virtual |
The documentation for this class was generated from the following files: