Añadidos enemigos tipo path

This commit is contained in:
2022-08-27 22:53:06 +02:00
parent 3f232c6c25
commit 7c7e0c01e2
6 changed files with 8 additions and 8 deletions

View File

@@ -28,15 +28,15 @@ AnimatedSprite::~AnimatedSprite()
// Obtiene el indice de la animación a partir del nombre
int AnimatedSprite::getIndex(std::string name)
{
int result = -1;
int index = 0;
for (int i = 0; i < animation.size(); i++)
{
if (animation[i].name == name)
{
result = i;
index = i;
}
}
return result;
return index;
}
// Calcula el frame correspondiente a la animación