All audio managers are singletons (static) in order to be globally accessible
Allows to load all sound effects. It calls loadAll on all other specialized managers
Allows to play sound, if ID of sound effect is provided
2 Specialized Audio Managers
Loads sound effects that relate to particular domain. (for example Zombie, or Weapons ...etc)
Allows to play sound. No ID is necessary to be know (for example playWeaponReloadSound() )
3 Loading system
AudioManager
uses a list (key / value) which contains the urls of target sound effects to download.
Then, for all the urls, the sound effects are loaded (and audio data decoded).
When a sound is supposed to be played, ID needs to be known.
AudioManager
calls
loadAll
method on all the specialized AudioManagers. (
AudioManagerWeapon
,
AudioManagerZombie
)
These managers add the sound urls to the provided list.