nou: sonidos de bala diferent per a cada jugador
This commit is contained in:
@@ -1349,7 +1349,7 @@ void Game::handleFireInput(const std::shared_ptr<Player> &player, Bullet::Type t
|
||||
break;
|
||||
}
|
||||
createBullet(bullet.x, bullet.y, type, player->getNextBulletColor(), static_cast<int>(player->getId()));
|
||||
playSound("bullet.wav");
|
||||
playSound(player->getBulletSoundFile());
|
||||
|
||||
// Establece un tiempo de espera para el próximo disparo.
|
||||
constexpr int POWERUP_COOLDOWN = 5;
|
||||
@@ -1636,6 +1636,7 @@ void Game::initPlayers(Player::Id player_id) {
|
||||
|
||||
auto player1 = std::make_unique<Player>(config_player1);
|
||||
player1->setBulletColors(Bullet::Color::YELLOW, Bullet::Color::GREEN);
|
||||
player1->setBulletSoundFile("bullet1p.wav");
|
||||
player1->setScoreBoardPanel(Scoreboard::Id::LEFT);
|
||||
player1->setName(Lang::getText("[SCOREBOARD] 1"));
|
||||
player1->setGamepad(Options::gamepad_manager.getGamepad(Player::Id::PLAYER1).instance);
|
||||
@@ -1657,6 +1658,7 @@ void Game::initPlayers(Player::Id player_id) {
|
||||
|
||||
auto player2 = std::make_unique<Player>(config_player2);
|
||||
player2->setBulletColors(Bullet::Color::RED, Bullet::Color::PURPLE);
|
||||
player2->setBulletSoundFile("bullet2p.wav");
|
||||
player2->setScoreBoardPanel(Scoreboard::Id::RIGHT);
|
||||
player2->setName(Lang::getText("[SCOREBOARD] 2"));
|
||||
player2->setGamepad(Options::gamepad_manager.getGamepad(Player::Id::PLAYER2).instance);
|
||||
|
||||
Reference in New Issue
Block a user