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

@@ -3,7 +3,7 @@ frame_width=16
frame_height=16
[animation]
name=walk
name=default
speed=8
loop=0
frames=0,1,2,3,4,5

View File

@@ -3,7 +3,7 @@ frame_width=16
frame_height=16
[animation]
name=walk
name=default
speed=8
loop=0
frames=0,1,2,3,4,5

View File

@@ -3,7 +3,7 @@ frame_width=16
frame_height=16
[animation]
name=walk
name=default
speed=6
loop=0
frames=0,1,2,3,4,5

View File

@@ -3,7 +3,7 @@ frame_width=16
frame_height=16
[animation]
name=walk
name=default
speed=8
loop=0
frames=0,1,2,3,4,5

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

View File

@@ -89,7 +89,7 @@ bool EnemyEngine::load(std::string file_path)
printf("** enemy path loaded\n\n");
//enemies.push_back(new EnemyPath(enemy, p1, p2));
enemy = new EnemyPath(enemy, p1, p2);
this->enemy = new EnemyPath(enemy, p1, p2);
}
}