Manages the playback of Song in the background controlled by themes.
More...
Manages the playback of Song in the background controlled by themes.
◆ AddSong()
void OmegaEngine.Audio.MusicManager.AddSong |
( |
string |
id, |
|
|
params string [] |
themes |
|
) |
| |
|
inline |
Adds a new song to the list
- Parameters
-
id | The file name of the song |
themes | The names of all themes the song is associated to |
- Exceptions
-
InvalidOperationException | This song was already loaded. |
IOException | There was a problem loading the song. |
◆ Dispose()
void OmegaEngine.Audio.MusicManager.Dispose |
( |
| ) |
|
|
inline |
◆ LoadLibrary()
void OmegaEngine.Audio.MusicManager.LoadLibrary |
( |
string |
id | ) |
|
|
inline |
Populates the music manager with songs listed in a library file
- Parameters
-
id | The ID of the library file to load |
◆ PlaySong()
void OmegaEngine.Audio.MusicManager.PlaySong |
( |
string |
id | ) |
|
|
inline |
Plays a specific song
- Parameters
-
id | The name of the song to play |
◆ PlayTheme()
void OmegaEngine.Audio.MusicManager.PlayTheme |
( |
string |
theme | ) |
|
|
inline |
Starts playing random songs from a certain theme
- Parameters
-
theme | The name of the new theme - must not be null |
◆ Stop()
void OmegaEngine.Audio.MusicManager.Stop |
( |
bool |
fade | ) |
|
|
inline |
Stops the currently playing song
- Parameters
-
fade | True 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
-
theme | The 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
◆ Playing
bool OmegaEngine.Audio.MusicManager.Playing |
|
get |
Is music currently being played?
The documentation for this class was generated from the following file:
- OmegaEngine/Audio/MusicManager.cs