82 #endif // SOUNDMANAGER_H
void setCollisionSound(SoundEffects effect)
Sets the collision sound that will be played next time playCollisionSound() is called.
Definition: soundmanager.cpp:52
static void drop()
Drops current instance of Soundmanager.
Definition: soundmanager.cpp:21
static Soundmanager * m_instance
Definition: soundmanager.h:69
SoundEffects
Definition: soundmanager.h:11
The Soundmanager class provides several sounds which can be played. The Soundmanager is implemented ...
Definition: soundmanager.h:26
QMediaPlayer * m_collisionSound
Definition: soundmanager.h:71
Soundmanager()
Definition: soundmanager.cpp:9
void loadSounds()
Definition: soundmanager.cpp:68
virtual ~Soundmanager()
Definition: soundmanager.cpp:13
Q_INVOKABLE void stopBackgroundMusic()
Stops playing our background music.
Definition: soundmanager.cpp:63
QMediaPlayer * m_backgroundMusic
Definition: soundmanager.h:70
QObject * soundmanagerSingletontypeProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
Callback function used to get the current instance of Soundmanager within QML.
Definition: soundmanager.cpp:94
static Soundmanager * instance()
The instance of our Soundmanager.
Definition: soundmanager.cpp:30
Q_INVOKABLE void playBackgroundMusic()
Starts playing our background music.
Definition: soundmanager.cpp:47
void playCollisionSound()
Plays a previously defined sound in order to indicate a collision.
Definition: soundmanager.cpp:58