Arreglado AnimatedSprite::setCurrentFrame

This commit is contained in:
2022-10-24 08:52:00 +02:00
parent e6b3d5ea13
commit 591932a928
2 changed files with 3 additions and 2 deletions

View File

@@ -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));

View File

@@ -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