Afegides veus al jugador

Afegit efectes de so al rebotar el jugador quan mor
This commit is contained in:
2024-12-15 20:00:35 +01:00
parent 3367b70cd5
commit fe0900a686
6 changed files with 11 additions and 1 deletions

View File

@@ -474,6 +474,7 @@ void Game::checkPlayerItemCollision(std::shared_ptr<Player> &player)
(item->getWidth() - game_text_textures_[4]->getWidth()) / 2;
createItemText(x, game_text_textures_[4]);
}
JA_PlaySound(Resource::get()->getSound("voice_coffee.wav"));
break;
}
case ItemType::COFFEE_MACHINE:
@@ -484,6 +485,7 @@ void Game::checkPlayerItemCollision(std::shared_ptr<Player> &player)
item->getPosX() +
(item->getWidth() - game_text_textures_[3]->getWidth()) / 2;
createItemText(x, game_text_textures_[3]);
JA_PlaySound(Resource::get()->getSound("voice_power_up.wav"));
break;
}
default:
@@ -819,7 +821,7 @@ void Game::killPlayer(std::shared_ptr<Player> &player)
balloon_manager_->stopAllBalloons();
JA_PlaySound(Resource::get()->getSound("player_collision.wav"));
screen_->shake();
JA_PlaySound(Resource::get()->getSound("coffeeout.wav"));
JA_PlaySound(Resource::get()->getSound("voice_no.wav"));
player->setPlayingState(PlayerState::DYING);
allPlayersAreNotPlaying() ? stopMusic() : resumeMusic();
}