C# Class BalloonsPop.SoundPlayer.SoundsPlayer

Playres sounds based on string parameters.
Inheritance: ISoundsPlayer
Afficher le fichier Open project: Baloons-Pop-4/Main Class Usage Examples

Méthodes publiques

Méthode Description
CountSounds ( ) : int

Returns the amount of registered sounds

PlaySound ( string soundName ) : void

Plays the sound matching the given string. If no matching sound, throw an exception.

RegisterSound ( string soundName, System.Media.SoundPlayer player ) : void

Caches a sound in the current instance.

SoundsPlayer ( ISoundsLoader loader ) : System

Initializes a new instance of the SoundsPlayer class.

Method Details

CountSounds() public méthode

Returns the amount of registered sounds
public CountSounds ( ) : int
Résultat int

PlaySound() public méthode

Plays the sound matching the given string. If no matching sound, throw an exception.
public PlaySound ( string soundName ) : void
soundName string
Résultat void

RegisterSound() public méthode

Caches a sound in the current instance.
public RegisterSound ( string soundName, System.Media.SoundPlayer player ) : void
soundName string
player System.Media.SoundPlayer
Résultat void

SoundsPlayer() public méthode

Initializes a new instance of the SoundsPlayer class.
public SoundsPlayer ( ISoundsLoader loader ) : System
loader ISoundsLoader
Résultat System