Platformer
Platformer
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
SoundManager Class Reference

This class manages the sounds of our game as a singleton. More...

#include <SoundManager.hpp>

Collaboration diagram for SoundManager:
Collaboration graph

Public Member Functions

bool init ()
 Initializes the SoundManager.
 
void shutdown ()
 Shuts down the SoundManager.
 
 SoundManager (const SoundManager &)=delete
 Stop the compiler from generating methods to copy the object.
 
SoundManageroperator= (const SoundManager &)=delete
 Stop the compiler from generating methods to copy the object.
 

Static Public Member Functions

static SoundManagerinstance ()
 The singleton instance of the SoundManager.
 
static void PlaySound (std::shared_ptr< SDLSoundWrapper > sound, int times)
 Plays the given sound the given number of times. More...
 

Private Member Functions

 SoundManager ()
 Constructs a SoundManager.
 
 ~SoundManager ()
 Destructs a SoundManager.
 

Detailed Description

This class manages the sounds of our game as a singleton.

Member Function Documentation

◆ PlaySound()

void SoundManager::PlaySound ( std::shared_ptr< SDLSoundWrapper sound,
int  times 
)
static

Plays the given sound the given number of times.

Parameters
soundThe sound to be played
timesThe number of times the sound should be played

The documentation for this class was generated from the following files: