C# Class geek.GameEngine.Sound.SoundManager

The class that handles sound playback.
Afficher le fichier Open project: impworks/xna.geek.engine

Méthodes publiques

Méthode 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

Méthode Description
SoundManager ( ) : System.Collections.Generic

Method Details

IsAnySoundPlaying() public static méthode

Checks if any sound is playing.
public static IsAnySoundPlaying ( ) : bool
Résultat bool

IsMusicPlaying() public static méthode

Checks if music is playing.
public static IsMusicPlaying ( ) : bool
Résultat bool

IsSoundPlaying() public static méthode

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

LoadMusic() public static méthode

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

LoadSound() public static méthode

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

PlayMusic() public static méthode

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

PlaySound() public static méthode

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).
Résultat void

StopAllSounds() public static méthode

Stop all sounds playing.
public static StopAllSounds ( ) : void
Résultat void

StopMusic() public static méthode

Stop music playing.
public static StopMusic ( ) : void
Résultat void

StopSound() public static méthode

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