From 610083578e2258b971dbf1c71f69e5ec887842a8 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sat, 23 Aug 2025 20:05:16 +0200 Subject: [PATCH] =?UTF-8?q?style:=20eliminat=20soroll=20de=20drop=20item?= =?UTF-8?q?=20amb=20maquina=20de=20caf=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quan ix una maquina de café ja no se sent el so de drop item per a millorar l'experiència sonora del joc. Resol #91 --- source/sections/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/sections/game.cpp b/source/sections/game.cpp index fcbce97..887a9ad 100644 --- a/source/sections/game.cpp +++ b/source/sections/game.cpp @@ -606,6 +606,7 @@ void Game::handleItemDrop(const std::shared_ptr &balloon, const std::sh if (DROPPED_ITEM != ItemType::COFFEE_MACHINE) { createItem(DROPPED_ITEM, balloon->getPosX(), balloon->getPosY()); + playSound("item_drop.wav"); } else { createItem(DROPPED_ITEM, player->getPosX(), param.game.game_area.rect.y - Item::COFFEE_MACHINE_HEIGHT); coffee_machine_enabled_ = true; @@ -733,7 +734,6 @@ auto Game::dropItem() -> ItemType { // Crea un objeto item void Game::createItem(ItemType type, float x, float y) { items_.emplace_back(std::make_unique(type, x, y, param.game.play_area.rect, item_textures_[static_cast(type) - 1], item_animations_[static_cast(type) - 1])); - playSound("item_drop.wav"); } // Vacia el vector de items