Arreglos en la estructura i format del codi

This commit is contained in:
2025-03-01 11:02:08 +01:00
parent c2040d3ded
commit 3562b139c3
10 changed files with 132 additions and 130 deletions

View File

@@ -82,13 +82,13 @@ void Player::checkInput()
if (!auto_movement_)
{
// Comprueba las entradas de desplazamiento lateral solo en el caso de no estar enganchado a una superficie automatica
if (input_->checkInput(input_left))
if (input_->checkInput(InputAction::LEFT))
{
vx_ = -0.6f;
sprite_->setFlip(SDL_FLIP_HORIZONTAL);
}
else if (input_->checkInput(input_right))
else if (input_->checkInput(InputAction::RIGHT))
{
vx_ = 0.6f;
sprite_->setFlip(SDL_FLIP_NONE);
@@ -119,7 +119,7 @@ void Player::checkInput()
}
}
if (input_->checkInput(input_jump))
if (input_->checkInput(InputAction::JUMP))
{
// Solo puede saltar si ademas de estar (state == s_standing)
// Esta sobre el suelo, rampa o suelo que se mueve