AnimatedSprite: afegit setAnimationSpeed()
This commit is contained in:
@@ -246,4 +246,10 @@ void AnimatedSprite::loadFromAnimationsFileBuffer(const AnimationsFileBuffer &so
|
||||
// Pone un valor por defecto
|
||||
setWidth(frame_width);
|
||||
setHeight(frame_height);
|
||||
}
|
||||
|
||||
// Establece la velocidad de la animación
|
||||
void AnimatedSprite::setAnimationSpeed(size_t value)
|
||||
{
|
||||
animations_[current_animation_].speed = value;
|
||||
}
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
void setCurrentAnimation(const std::string &name = "default"); // Establece la animación por nombre
|
||||
void setCurrentAnimation(int index = 0); // Establece la animación por índice
|
||||
void resetAnimation(); // Reinicia la animación actual
|
||||
void setAnimationSpeed(size_t value); // Establece la velocidad de la animación
|
||||
|
||||
// --- Consultas ---
|
||||
bool animationIsCompleted(); // Comprueba si la animación ha terminado
|
||||
|
||||
Reference in New Issue
Block a user