Completadas las superficies automáticas

This commit is contained in:
2022-09-25 14:34:40 +02:00
parent dea16e0004
commit b88df7c9e6
5 changed files with 40 additions and 23 deletions

View File

@@ -183,8 +183,16 @@ void Player::checkInput()
}
else
{ // El movimiento lo proporciona la superficie
vx = 0.6f;
sprite->setFlip(SDL_FLIP_NONE);
vx = 0.6f * room->getAutoSurfaceDirection();
if (vx > 0.0f)
{
sprite->setFlip(SDL_FLIP_NONE);
}
else
{
sprite->setFlip(SDL_FLIP_HORIZONTAL);
}
}
if (input->checkInput(INPUT_UP, REPEAT_TRUE))