OmegaEngine API  1.0.3
Public Member 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...
 

Properties

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

Detailed Description

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

Member Function Documentation

◆ AddSong()

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.

◆ Dispose()

void OmegaEngine.Audio.MusicManager.Dispose ( )
inline

Disposes all Songs maintained by this MusicManager

◆ LoadLibrary()

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

◆ PlaySong()

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

Plays a specific song

Parameters
idThe name of the song to play

◆ PlayTheme()

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

◆ Stop()

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

◆ SwitchTheme()

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

◆ Update()

void OmegaEngine.Audio.MusicManager.Update ( )
inline

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

Property Documentation

◆ Playing

bool OmegaEngine.Audio.MusicManager.Playing
get

Is music currently being played?


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