Jumpvalley 0.5.0
An app and library that can be used to test and run 3D platformer levels. Currently being made with Godot.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Properties | Events | List of all members
Jumpvalley.Music.MusicPlayer Class Reference

Plays music that is split into playlists (see Playlist)
This class applies a fade transition when the user wants to switch between playlists.
Each instance of a MusicPlayer can only play one song at a time at most. More...

Inheritance diagram for Jumpvalley.Music.MusicPlayer:
Jumpvalley.Music.MusicZonePlayer

Public Member Functions

virtual void ApplyOverrides (Playlist playlist)
 Method that can be overriden to define how playlists added to this music player should have their properties overriden. By default, overrides defined in the MusicPlayer class are applied here.
 
void RemovePlaylist (Playlist playlist)
 Removes a playlist from this MusicPlayer. This will cause this MusicPlayer to no longer make changes to the removed Playlist.
 
void AddPlaylist (Playlist playlist)
 Adds a playlist to this MusicPlayer. This will let this MusicPlayer make some changes to the added playlist.
 
new void Dispose ()
 

Public Attributes

bool OverrideTransitionTime = false
 Whether or not the a playlist's volume transition time will get set to MusicPlayer.TransitionTime whenever it gets played by this music player.
 
double TransitionTime = 0
 Playlists played by this music player will have their volume transition time set to the value of this variable whenever OverrideTransitionTime is set to true,.
 
bool OverrideLocalVolumeScale = false
 Whether or not the a playlist's LocalVolumeScale will get set to VolumeScale whenever it gets played by this music player.
 
bool OverrideSongStreamHandlingMode = false
 Whether or not playlist handled by this music player should have their Playlist.SongStreamHandlingMode property overriden to the value of this music player's SongStreamHandlingMode variable.
 
bool ShouldSetPlaylistParent
 Whether or not this MusicPlayer should add/remove this music player as a parent when the AddPlaylist and RemovePlaylist methods are called.
 

Protected Member Functions

virtual void RefreshPlayback ()
 Updates the playback status of the music.
 
void OnMusicPlayerSongChanged (SongChangedArgs args)
 

Properties

List< PlaylistPlaylists [get]
 Playlists currently being handled by this MusicPlayer

 
Playlist CurrentPlaylist [get, protected set]
 The playlist that's currently being played by the MusicPlayer.
 
double VolumeScale [get, set]
 Playlists played by this music player will have their LocalVolumeScale set to the value of this variable whenever OverrideLocalVolumeScale is set to true,.
 
Playlist.SongStreamHandlingModeFlags SongStreamHandlingMode [get, set]
 The song stream handling mode that the playlists handled by this music player should use if OverrideSongStreamHandlingMode is set to true.
 
Playlist PrimaryPlaylist [get, set]
 The MusicPlayer's primary playlist. If set, this playlist will be played whenever IsPlaying is set to true.
 
bool IsPlaying [get, set]
 Whether or not the playlist is currently playing any music
Setting this value to false will stop the music (with the fade transition).
 

Events

EventHandler< SongChangedArgsSongChanged
 Event that's raised when the song currently being played by this instance of MusicPlayer changes.
This event is meant to wrap individual raisings of Playlist's SongChanged event in order to make it easier for developers to adapt to song changes regardless of what Playlist is being played.
 

Detailed Description

Plays music that is split into playlists (see Playlist)
This class applies a fade transition when the user wants to switch between playlists.
Each instance of a MusicPlayer can only play one song at a time at most.

Member Function Documentation

◆ AddPlaylist()

void Jumpvalley.Music.MusicPlayer.AddPlaylist ( Playlist playlist)
inline

Adds a playlist to this MusicPlayer. This will let this MusicPlayer make some changes to the added playlist.

Parameters
playlist

◆ ApplyOverrides()

virtual void Jumpvalley.Music.MusicPlayer.ApplyOverrides ( Playlist playlist)
inlinevirtual

Method that can be overriden to define how playlists added to this music player should have their properties overriden. By default, overrides defined in the MusicPlayer class are applied here.

Parameters
playlistThe playlist to apply overrides to

◆ RefreshPlayback()

virtual void Jumpvalley.Music.MusicPlayer.RefreshPlayback ( )
inlineprotectedvirtual

Updates the playback status of the music.

Reimplemented in Jumpvalley.Music.MusicZonePlayer.

◆ RemovePlaylist()

void Jumpvalley.Music.MusicPlayer.RemovePlaylist ( Playlist playlist)
inline

Removes a playlist from this MusicPlayer. This will cause this MusicPlayer to no longer make changes to the removed Playlist.

Parameters
playlist

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