My Project
Public Member Functions | List of all members
SoundManager Class Reference

Class to store all Sounds. More...

#include <SoundManager.hpp>

Public Member Functions

 SoundManager (std::string const &soundsFile)
 Construct a new Sound Manager object. More...
 
 SoundManager ()
 Construct a new Sound Manager object. More...
 
 ~SoundManager ()
 Destroy the Sound Manager object. More...
 
ASound at (std::string const &index) const
 Get the Sound at index sent as param. More...
 
void loadSounds (std::string const &filepath)
 Load all Sounds from a config file. More...
 

Detailed Description

Class to store all Sounds.

Constructor & Destructor Documentation

◆ SoundManager() [1/2]

SoundManager::SoundManager ( std::string const &  soundsFile)

Construct a new Sound Manager object.

Parameters
soundsFilepath to the json containing all the sounds

◆ SoundManager() [2/2]

SoundManager::SoundManager ( )
inline

Construct a new Sound Manager object.

◆ ~SoundManager()

SoundManager::~SoundManager ( )
inline

Destroy the Sound Manager object.

Member Function Documentation

◆ at()

ASound SoundManager::at ( std::string const &  index) const

Get the Sound at index sent as param.

Parameters
indexIndex of the Sound in map
Returns
Sound Sound from the map

◆ loadSounds()

void SoundManager::loadSounds ( std::string const &  filepath)

Load all Sounds from a config file.

Parameters
filepathConfiguration file path containing data of all Sounds

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