forked from jaildesigner-jailgames/jaildoctors_dilemma
- La clase input ya admite inputs personalizados
- El juego ya utiliza el objeto input para comprobar las teclas de cambio de tamaño de ventana, pausa, etc.
This commit is contained in:
@@ -181,13 +181,13 @@ void Player::checkInput()
|
||||
|
||||
if (!autoMovement)
|
||||
{ // Comprueba las entradas de desplazamiento lateral solo en el caso de no estar enganchado a una superficie automatica
|
||||
if (input->checkInput(INPUT_LEFT, REPEAT_TRUE))
|
||||
if (input->checkInput(input_left))
|
||||
{
|
||||
vx = -0.6f;
|
||||
sprite->setFlipH(true);
|
||||
}
|
||||
|
||||
else if (input->checkInput(INPUT_RIGHT, REPEAT_TRUE))
|
||||
else if (input->checkInput(input_right))
|
||||
{
|
||||
vx = 0.6f;
|
||||
sprite->setFlipH(false);
|
||||
@@ -216,7 +216,7 @@ void Player::checkInput()
|
||||
}
|
||||
}
|
||||
|
||||
if (input->checkInput(INPUT_UP, REPEAT_TRUE))
|
||||
if (input->checkInput(input_jump))
|
||||
{
|
||||
// Solo puede saltar si ademas de estar (state == s_standing)
|
||||
// Esta sobre el suelo, rampa o suelo que se mueve
|
||||
|
||||
Reference in New Issue
Block a user