style: eliminat soroll de drop item amb maquina de café
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
This commit is contained in:
@@ -606,6 +606,7 @@ void Game::handleItemDrop(const std::shared_ptr<Balloon> &balloon, const std::sh
|
|||||||
|
|
||||||
if (DROPPED_ITEM != ItemType::COFFEE_MACHINE) {
|
if (DROPPED_ITEM != ItemType::COFFEE_MACHINE) {
|
||||||
createItem(DROPPED_ITEM, balloon->getPosX(), balloon->getPosY());
|
createItem(DROPPED_ITEM, balloon->getPosX(), balloon->getPosY());
|
||||||
|
playSound("item_drop.wav");
|
||||||
} else {
|
} else {
|
||||||
createItem(DROPPED_ITEM, player->getPosX(), param.game.game_area.rect.y - Item::COFFEE_MACHINE_HEIGHT);
|
createItem(DROPPED_ITEM, player->getPosX(), param.game.game_area.rect.y - Item::COFFEE_MACHINE_HEIGHT);
|
||||||
coffee_machine_enabled_ = true;
|
coffee_machine_enabled_ = true;
|
||||||
@@ -733,7 +734,6 @@ auto Game::dropItem() -> ItemType {
|
|||||||
// Crea un objeto item
|
// Crea un objeto item
|
||||||
void Game::createItem(ItemType type, float x, float y) {
|
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]));
|
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
|
// Vacia el vector de items
|
||||||
|
|||||||
Reference in New Issue
Block a user