Sound fix
This commit is contained in:
18
main.cpp
18
main.cpp
@@ -69,14 +69,18 @@ int main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Przerobić tak aby strzelanie odbywało się bez użycia warunku zewnętrzenego
|
||||||
|
// Ale w tym przypadku trzeba będzie przenieść obiekt dźwięku wewnątrz klasy Bullet
|
||||||
// strzelanie ze statku
|
// strzelanie ze statku
|
||||||
if(sf::Mouse::isButtonPressed(sf::Mouse::Left)) {
|
if(event.type == sf::Event::MouseButtonPressed) {
|
||||||
ship.shoot();
|
if (sf::Mouse::isButtonPressed(sf::Mouse::Left)) {
|
||||||
audioManager.playSoundEffect("shoot", 70.f); // Odtworzenie dźwięku wystrzału
|
ship.shoot();
|
||||||
}
|
audioManager.playSoundEffect("shoot", 70.f); // Odtworzenie dźwięku wystrzału
|
||||||
if(sf::Mouse::isButtonPressed(sf::Mouse::Right)) {
|
}
|
||||||
ship.alternate_shoot();
|
if (sf::Mouse::isButtonPressed(sf::Mouse::Right)) {
|
||||||
audioManager.playSoundEffect("shoot_alt", 70.f); // Odtworzenie dźwięku dla alternatywnego strzału
|
ship.alternate_shoot();
|
||||||
|
audioManager.playSoundEffect("shoot_alt", 70.f); // Odtworzenie dźwięku dla alternatywnego strzału
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// generowanie nowego meteoru
|
// generowanie nowego meteoru
|
||||||
|
|||||||
Reference in New Issue
Block a user