diff --git a/source/game.cpp b/source/game.cpp index 61803cd..6a7fc87 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -2094,7 +2094,7 @@ void Game::checkPlayerItemCollision(Player *player) break; case ITEM_COFFEE_MACHINE: - player->setPowerUp(true); + player->setPowerUp(); JA_PlaySound(itemPickUpSound); coffeeMachineEnabled = false; break; diff --git a/source/player.cpp b/source/player.cpp index cce86ac..74ac0ee 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -470,9 +470,10 @@ bool Player::isPowerUp() } // Establece el valor de la variable -void Player::setPowerUp(bool value) +void Player::setPowerUp() { - powerUp = value; + powerUp = true; + powerUpCounter = PLAYER_POWERUP_COUNTER; } // Obtiene el valor de la variable diff --git a/source/player.h b/source/player.h index 00c7095..0dfe5c8 100644 --- a/source/player.h +++ b/source/player.h @@ -175,8 +175,8 @@ public: // Obtiene el valor de la variable bool isPowerUp(); - // Establece el valor de la variable - void setPowerUp(bool value); + // Establece el valor de la variable a verdadero + void setPowerUp(); // Obtiene el valor de la variable Uint16 getPowerUpCounter();