C# Class WaveFrogger.Services.AudioService

Audio Service class.
Inheritance: UpdatableService
Exibir arquivo Open project: WaveEngine/QuickStarters Class Usage Examples

Public Methods

Method Description
LoadAllSounds ( ) : void

Loads all sounds.

Play ( Audio sound, bool loop = false ) : void

Plays the sound.

Play ( Audio music, float volume = MUSIC_VOLUME ) : void

Plays the specified music.

PlayRandom ( ) : void
Update ( System.TimeSpan gameTime ) : void

Updates the specified game time.

Protected Methods

Method Description
Initialize ( ) : void

Initializes a new instance of the SoundsManager class.

Terminate ( ) : void

Terminates this instance.

Private Methods

Method Description
GetSoundOrMusicPath ( Enum audio ) : string

Resolve paths

InternalPlaySound ( Enum sound, bool loop ) : SoundInstance

Internals the play sound.

Load ( Enum sound, SoundInfo &array ) : void

Loads the sound.

SearchMusicAndSounds ( Type contentType ) : void

Method Details

Initialize() protected method

Initializes a new instance of the SoundsManager class.
protected Initialize ( ) : void
return void

LoadAllSounds() public method

Loads all sounds.
public LoadAllSounds ( ) : void
return void

Play() public method

Plays the sound.
public Play ( Audio sound, bool loop = false ) : void
sound Audio The sound.
loop bool if set to true [loop].
return void

Play() public method

Plays the specified music.
public Play ( Audio music, float volume = MUSIC_VOLUME ) : void
music Audio The music.
volume float
return void

PlayRandom() public method

public PlayRandom ( ) : void
return void

Terminate() protected method

Terminates this instance.
protected Terminate ( ) : void
return void

Update() public method

Updates the specified game time.
public Update ( System.TimeSpan gameTime ) : void
gameTime System.TimeSpan The game time.
return void