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
|
||||
if(sf::Mouse::isButtonPressed(sf::Mouse::Left)) {
|
||||
ship.shoot();
|
||||
audioManager.playSoundEffect("shoot", 70.f); // Odtworzenie dźwięku wystrzału
|
||||
}
|
||||
if(sf::Mouse::isButtonPressed(sf::Mouse::Right)) {
|
||||
ship.alternate_shoot();
|
||||
audioManager.playSoundEffect("shoot_alt", 70.f); // Odtworzenie dźwięku dla alternatywnego strzału
|
||||
if(event.type == sf::Event::MouseButtonPressed) {
|
||||
if (sf::Mouse::isButtonPressed(sf::Mouse::Left)) {
|
||||
ship.shoot();
|
||||
audioManager.playSoundEffect("shoot", 70.f); // Odtworzenie dźwięku wystrzału
|
||||
}
|
||||
if (sf::Mouse::isButtonPressed(sf::Mouse::Right)) {
|
||||
ship.alternate_shoot();
|
||||
audioManager.playSoundEffect("shoot_alt", 70.f); // Odtworzenie dźwięku dla alternatywnego strzału
|
||||
}
|
||||
}
|
||||
|
||||
// generowanie nowego meteoru
|
||||
|
||||
Reference in New Issue
Block a user