Añadidos enemigos volteados verticalmente

This commit is contained in:
2022-11-09 22:49:51 +01:00
parent 41c765619d
commit 1a95abc2f5
9 changed files with 262 additions and 35 deletions

View File

@@ -26,9 +26,10 @@ Enemy::Enemy(enemy_t enemy)
{
if (enemy.vx < 0.0f)
{
sprite->setFlip(SDL_FLIP_HORIZONTAL);
sprite->setFlipH(true);
}
}
sprite->setFlipV(mirror);
collider = getRect();
@@ -66,7 +67,7 @@ void Enemy::checkPath()
sprite->setVelX(sprite->getVelX() * (-1));
if (doFlip)
{
sprite->flip();
sprite->flipH();
}
}
@@ -75,7 +76,7 @@ void Enemy::checkPath()
sprite->setVelY(sprite->getVelY() * (-1));
if (doFlip)
{
sprite->flip();
sprite->flipH();
}
}
}