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
10
class
SoundManager
final :
public
logic::Observer
{
11
public
:
12
SoundManager
();
13
17
void
start
();
18
22
void
stop
();
23
24
private
:
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
Observer.h
SoundManager::stop
void stop()
Stops all the sounds.
Definition
SoundManager.cpp:47
SoundManager::start
void start()
Starts the sounds for a new game.
Definition
SoundManager.cpp:43
SoundManager::SoundManager
SoundManager()
Definition
SoundManager.cpp:5
logic::Observer
Definition
Observer.h:16
logic::Events
Events
Definition
Observer.h:14
Representation
SoundManager.h
Generated by
1.15.0