Retocado un poco mas el salto

This commit is contained in:
2022-08-19 07:21:25 +02:00
parent 6a5f0b3b46
commit 76696f9eb7
5 changed files with 22 additions and 54 deletions

View File

@@ -117,6 +117,7 @@ void Player::checkInput()
jumpStrenght = std::max(jumpStrenght -= 0.4f, 0.0f);
vy -= jumpStrenght;
}
jumpPressed = true;
}
else
{
@@ -218,7 +219,6 @@ void Player::move()
} while (checkMapCollisions());
jumping = false;
vy = 0.0f;
jumpStrenght = 2.0f;
}
else
{
@@ -226,6 +226,8 @@ void Player::move()
{
y++;
} while (checkMapCollisions());
jumping = false;
vy = 0.0f;
}
}