diff --git a/source/common/animatedsprite.cpp b/source/common/animatedsprite.cpp index be57dbc..2889511 100644 --- a/source/common/animatedsprite.cpp +++ b/source/common/animatedsprite.cpp @@ -104,7 +104,8 @@ void AnimatedSprite::setCurrentFrame(int num) } // Cambia el valor de la variable - animation.at(currentAnimation).counter = animation.at(currentAnimation).speed * num; + animation.at(currentAnimation).currentFrame = num; + animation.at(currentAnimation).counter = 0; // Escoge el frame correspondiente de la animación setSpriteClip(animation.at(currentAnimation).frames.at(animation.at(currentAnimation).currentFrame)); diff --git a/todo.txt b/todo.txt index 83b1a52..bd7e275 100644 --- a/todo.txt +++ b/todo.txt @@ -52,7 +52,7 @@ x (B) Así como no necesitar lo de frames per row (B) Lo enemigos han de coger el ancho y alto del fichero ani (y si no hay?) (B) Si no se passa parametro, el fichero ani se deduce del png (y si no hay?) x (C) Que no cree la ventana y luego añada el borde -(A) Las vidas del marcador no estan animadas. No cambian de frame +x (A) Las vidas del marcador no estan animadas. No cambian de frame (A) Mejorar las cintas. no permitir saltar hacia atras