Pacman Torben Petré
Loading...
Searching...
No Matches
SoundManager.h
Go to the documentation of this file.
1#ifndef PACMAN_SOUNDMANAGER_H
2#define PACMAN_SOUNDMANAGER_H
3
4#include <SFML/Audio/Sound.hpp>
5#include <vector>
6
7#include "../Logic/Observer.h"
8
9
10class SoundManager final : public logic::Observer {
11public:
13
17 void start();
18
22 void stop();
23
24private:
30 void update(logic::Events event) override;
31
41 static void loadSound(sf::Sound& sound, const std::string& name);
42
43 std::vector<sf::Sound> coinSoundPool;
44 std::vector<sf::Sound> ghostSoundPool;
45
46 sf::Sound ghostMove;
47 sf::Sound ghostFrightened;
48 sf::Sound eatingFruit;
49 sf::Sound deathSound;
50};
51
52
53#endif //PACMAN_SOUNDMANAGER_H
void stop()
Stops all the sounds.
Definition SoundManager.cpp:47
void start()
Starts the sounds for a new game.
Definition SoundManager.cpp:43
SoundManager()
Definition SoundManager.cpp:5
Definition Observer.h:16
Events
Definition Observer.h:14