C# Class BalloonsPop.SoundPlayer.SoundsPlayer

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

Public Methods

Method 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 method

Returns the amount of registered sounds
public CountSounds ( ) : int
return int

PlaySound() public method

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

RegisterSound() public method

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

SoundsPlayer() public method

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