C# Class geek.GameEngine.Sound.SoundManager

The class that handles sound playback.
Mostra file Open project: impworks/xna.geek.engine

Public Methods

Method Description
IsAnySoundPlaying ( ) : bool

Checks if any sound is playing.

IsMusicPlaying ( ) : bool

Checks if music is playing.

IsSoundPlaying ( string assetName ) : bool

Checks if sound is playing.

LoadMusic ( string assetName ) : void

Load the music.

LoadSound ( string assetName ) : void

Load a sound to the current

PlayMusic ( bool force = false ) : void

Play a background music.

PlaySound ( string assetName, bool allowOverlap = false, float volume = 1 ) : void

Play the sound.

StopAllSounds ( ) : void

Stop all sounds playing.

StopMusic ( ) : void

Stop music playing.

StopSound ( string assetName ) : void

Stop a sound playing.

Private Methods

Method Description
SoundManager ( ) : System.Collections.Generic

Method Details

IsAnySoundPlaying() public static method

Checks if any sound is playing.
public static IsAnySoundPlaying ( ) : bool
return bool

IsMusicPlaying() public static method

Checks if music is playing.
public static IsMusicPlaying ( ) : bool
return bool

IsSoundPlaying() public static method

Checks if sound is playing.
public static IsSoundPlaying ( string assetName ) : bool
assetName string Sound asset name.
return bool

LoadMusic() public static method

Load the music.
public static LoadMusic ( string assetName ) : void
assetName string Music asset name.
return void

LoadSound() public static method

Load a sound to the current
public static LoadSound ( string assetName ) : void
assetName string Sound asset name.
return void

PlayMusic() public static method

Play a background music.
public static PlayMusic ( bool force = false ) : void
force bool
return void

PlaySound() public static method

Play the sound.
public static PlaySound ( string assetName, bool allowOverlap = false, float volume = 1 ) : void
assetName string Sound effect's asset name.
allowOverlap bool Whether many instances of the same sound can be played simultaneously or not.
volume float Volume of the sample (0..1).
return void

StopAllSounds() public static method

Stop all sounds playing.
public static StopAllSounds ( ) : void
return void

StopMusic() public static method

Stop music playing.
public static StopMusic ( ) : void
return void

StopSound() public static method

Stop a sound playing.
public static StopSound ( string assetName ) : void
assetName string Sound asset name.
return void