Limpieza de código. Modificada la fuente nokiabig2. Puestas ayudas para los dos jugadores. Cambiado el tamaño del mensaje de juego completado

This commit is contained in:
2021-09-10 20:46:24 +02:00
parent 09421a093d
commit bdf092d46e
35 changed files with 377 additions and 655 deletions

View File

@@ -262,15 +262,15 @@ void Player::setInput(Uint8 input)
setWalkingStatus(PLAYER_STATUS_WALKING_RIGHT);
break;
case INPUT_FIRE_UP:
case INPUT_BUTTON_2:
setFiringStatus(PLAYER_STATUS_FIRING_UP);
break;
case INPUT_FIRE_LEFT:
case INPUT_BUTTON_1:
setFiringStatus(PLAYER_STATUS_FIRING_LEFT);
break;
case INPUT_FIRE_RIGHT:
case INPUT_BUTTON_3:
setFiringStatus(PLAYER_STATUS_FIRING_RIGHT);
break;
@@ -291,10 +291,7 @@ void Player::move()
// Si el jugador abandona el area de juego por los laterales
if ((mPosX < PLAY_AREA_LEFT - 5) || (mPosX + mWidth > PLAY_AREA_RIGHT + 5))
{
// Restaura su posición
mPosX -= mVelX;
}
mPosX -= mVelX; // Restaura su posición
// Actualiza la posición del sprite
mSpriteLegs->setPosX(getPosX());
@@ -509,13 +506,9 @@ bool Player::canFire()
{
// Si el contador a llegado a cero, podemos disparar. En caso contrario decrementamos el contador
if (mCooldown > 0)
{
return false;
}
else
{
return true;
}
}
// Establece el valor de la variable