OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Package Functions | Properties | List of all members
OmegaEngine.Audio.MusicManager Class Reference

Manages the playback of Song in the background controlled by themes. More...

Inheritance diagram for OmegaEngine.Audio.MusicManager:

Public Member Functions

void LoadLibrary (string id)
 Populates the music manager with songs listed in a library file More...
 
void AddSong (string id, params string[] themes)
 Adds a new song to the list More...
 
void PlaySong (string id)
 Plays a specific song More...
 
void PlayTheme (string theme)
 Starts playing random songs from a certain theme More...
 
void SwitchTheme (string theme)
 Switches to a new theme, but doesn't interrupt the current song More...
 
void Update ()
 Plays the next song from the current theme (if any) if the last one stopped More...
 
void Stop (bool fade)
 Stops the currently playing song More...
 
void Dispose ()
 Disposes all Songs maintained by this MusicManager More...
 

Package Functions

 MusicManager (Engine engine)
 Creates a new empty music controller More...
 
void PlaySong (Song song)
 Plays a specific song More...
 

Properties

bool Playing [get]
 Is music currently being played? More...
 

Detailed Description

Manages the playback of Song in the background controlled by themes.

Constructor & Destructor Documentation

OmegaEngine.Audio.MusicManager.MusicManager ( Engine  engine)
inlinepackage

Creates a new empty music controller

Parameters
engineThe Engine to be used for playing the music

Member Function Documentation

void OmegaEngine.Audio.MusicManager.AddSong ( string  id,
params string[]  themes 
)
inline

Adds a new song to the list

Parameters
idThe file name of the song
themesThe names of all themes the song is associated to
Exceptions
InvalidOperationExceptionThis song was already loaded.
IOExceptionThere was a problem loading the song.
void OmegaEngine.Audio.MusicManager.Dispose ( )
inline

Disposes all Songs maintained by this MusicManager

void OmegaEngine.Audio.MusicManager.LoadLibrary ( string  id)
inline

Populates the music manager with songs listed in a library file

Parameters
idThe ID of the library file to load
void OmegaEngine.Audio.MusicManager.PlaySong ( string  id)
inline

Plays a specific song

Parameters
idThe name of the song to play
void OmegaEngine.Audio.MusicManager.PlaySong ( Song  song)
inlinepackage

Plays a specific song

Parameters
songThe song to play
void OmegaEngine.Audio.MusicManager.PlayTheme ( string  theme)
inline

Starts playing random songs from a certain theme

Parameters
themeThe name of the new theme - must not be null
void OmegaEngine.Audio.MusicManager.Stop ( bool  fade)
inline

Stops the currently playing song

Parameters
fadeTrue to fade out the music instead of immediately cutting it off
void OmegaEngine.Audio.MusicManager.SwitchTheme ( string  theme)
inline

Switches to a new theme, but doesn't interrupt the current song

Parameters
themeThe name of the new theme; may be null
void OmegaEngine.Audio.MusicManager.Update ( )
inline

Plays the next song from the current theme (if any) if the last one stopped

Property Documentation

bool OmegaEngine.Audio.MusicManager.Playing
get

Is music currently being played?


The documentation for this class was generated from the following file: