els jugadors ara es dibuixen al fondo de la resta de elements
modificat la veu de 'thankyou' per a que incloga el sonido de començar a jugar clasic els globos ja son ells qui fan el seu propi so
This commit is contained in:
@@ -78,6 +78,8 @@ Game::Game(int player_id, int current_stage, bool demo)
|
||||
|
||||
background_->setPos(param.game.play_area.rect);
|
||||
|
||||
balloon_manager_->setBouncingSounds(param.balloon.bouncing_sound);
|
||||
|
||||
SDL_SetTextureBlendMode(canvas_, SDL_BLENDMODE_BLEND);
|
||||
|
||||
// Inicializa el resto de variables
|
||||
@@ -320,7 +322,7 @@ void Game::updateGameStateGameOver()
|
||||
{
|
||||
createMessage({paths_.at(2), paths_.at(3)}, Resource::get()->getTexture("game_text_game_over"));
|
||||
Audio::get()->fadeOutMusic(1000);
|
||||
balloon_manager_->setSounds(true);
|
||||
balloon_manager_->setBouncingSounds(true);
|
||||
}
|
||||
|
||||
game_over_counter_--;
|
||||
@@ -607,7 +609,6 @@ void Game::checkBulletCollision()
|
||||
if (dropped_item != ItemType::COFFEE_MACHINE)
|
||||
{
|
||||
createItem(dropped_item, balloon->getPosX(), balloon->getPosY());
|
||||
playSound("item_drop.wav");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -617,7 +618,6 @@ void Game::checkBulletCollision()
|
||||
}
|
||||
|
||||
// Explota el globo
|
||||
const auto SIZE = balloon->getSize();
|
||||
const auto SCORE = balloon_manager_->popBalloon(balloon);
|
||||
evaluateAndSetMenace();
|
||||
|
||||
@@ -629,26 +629,6 @@ void Game::checkBulletCollision()
|
||||
}
|
||||
updateHiScore();
|
||||
|
||||
// Sonido de explosión
|
||||
switch (SIZE)
|
||||
{
|
||||
case BalloonSize::SIZE1:
|
||||
playSound("balloon1.wav");
|
||||
break;
|
||||
case BalloonSize::SIZE2:
|
||||
playSound("balloon2.wav");
|
||||
break;
|
||||
case BalloonSize::SIZE3:
|
||||
playSound("balloon3.wav");
|
||||
break;
|
||||
case BalloonSize::SIZE4:
|
||||
playSound("balloon4.wav");
|
||||
break;
|
||||
default:
|
||||
playSound("balloon1.wav");
|
||||
break;
|
||||
}
|
||||
|
||||
// Deshabilita la bala
|
||||
bullet->disable();
|
||||
|
||||
@@ -789,6 +769,7 @@ ItemType Game::dropItem()
|
||||
void Game::createItem(ItemType type, float x, float y)
|
||||
{
|
||||
items_.emplace_back(std::make_unique<Item>(type, x, y, param.game.play_area.rect, item_textures_[static_cast<int>(type) - 1], item_animations_[static_cast<int>(type) - 1]));
|
||||
playSound("item_drop.wav");
|
||||
}
|
||||
|
||||
// Vacia el vector de items
|
||||
@@ -1069,13 +1050,13 @@ void Game::fillCanvas()
|
||||
|
||||
// Dibuja los objetos
|
||||
background_->render();
|
||||
renderItems();
|
||||
renderPlayers();
|
||||
renderSmartSprites();
|
||||
renderItems();
|
||||
balloon_manager_->render();
|
||||
tabe_->render();
|
||||
renderBullets();
|
||||
renderPathSprites();
|
||||
renderPlayers();
|
||||
|
||||
// Deja el renderizador apuntando donde estaba
|
||||
SDL_SetRenderTarget(renderer_, temp);
|
||||
@@ -1722,6 +1703,9 @@ void Game::initDemo(int player_id)
|
||||
// Configura los marcadores
|
||||
scoreboard_->setMode(SCOREBOARD_LEFT_PANEL, ScoreboardMode::DEMO);
|
||||
scoreboard_->setMode(SCOREBOARD_RIGHT_PANEL, ScoreboardMode::DEMO);
|
||||
|
||||
// Silencia los globos
|
||||
balloon_manager_->setSounds(false);
|
||||
}
|
||||
|
||||
// Modo grabar demo
|
||||
|
||||
Reference in New Issue
Block a user