Fixed audio and made the sounds a little quieter.

This commit is contained in:
Mihails Balalajs (FGCU)
2025-11-17 13:58:36 -05:00
parent d0edaa5add
commit 8095303e6b
+4 -3
View File
@@ -194,9 +194,10 @@ void Game::run() {
const float vulnerableDurationSeconds = 8.0f; // Duration of vulnerable mode const float vulnerableDurationSeconds = 8.0f; // Duration of vulnerable mode
auto window = sf::RenderWindow(sf::VideoMode(windowRes), windowName); auto window = sf::RenderWindow(sf::VideoMode(windowRes), windowName);
sf::Listener::setGlobalVolume(gameVolume);
sf::Sound sound(*resources.getSound("start")); sf::Sound sound(*resources.getSound("start"));
//sound.play(); sound.play();
sf::Sound pellet0(*resources.getSound("eat_dot_0")); sf::Sound pellet0(*resources.getSound("eat_dot_0"));
sf::Sound pellet1(*resources.getSound("eat_dot_1")); sf::Sound pellet1(*resources.getSound("eat_dot_1"));
@@ -484,9 +485,9 @@ void Game::run() {
scoreText.setString(std::to_string(score)); scoreText.setString(std::to_string(score));
if (pelletSoundCount % 2) { if (pelletSoundCount % 2) {
//pellet1.play(); pellet1.play();
} else { } else {
//pellet0.play(); pellet0.play();
} }
pelletSoundCount++; pelletSoundCount++;