Use this class to play audiosources (usually background music but feel free to use that for anything) in sequence, with optional crossfade between songs
More...
|
virtual void | Start () |
| On Start we initialize our playlist More...
|
|
virtual void | Initialization () |
| On init we initialize our state machine and start playing if needed More...
|
|
virtual void | PlayFirstSong () |
| Picks and plays the first song More...
|
|
virtual IEnumerator | PlaySong (int index) |
| Plays a new song in the playlist, and stops / fades the previous one More...
|
|
virtual IEnumerator | Fade (int index, float duration, float initialVolume, float endVolume, bool stopAtTheEnd) |
| Fades an audiosource in or out, optionnally stopping it at the end More...
|
|
virtual int | PickNextIndex () |
| Picks the next song to play More...
|
|
virtual int | PickPreviousIndex () |
| Picks the previous song to play More...
|
|
virtual void | PlayTargetSong () |
|
virtual void | OnPlayEvent (int channel) |
|
virtual void | OnPauseEvent (int channel) |
|
virtual void | OnStopEvent (int channel) |
|
virtual void | OnPlayNextEvent (int channel) |
|
virtual void | OnPlayPreviousEvent (int channel) |
|
virtual void | OnPlayIndexEvent (int channel, int index) |
|
virtual void | OnEnable () |
| On enable, starts listening for playlist events More...
|
|
virtual void | OnDisable () |
| On disable, stops listening for playlist events More...
|
|
virtual void | OnValidate () |
| On Validate, we check if our array has changed and if yes we initialize our new elements More...
|
|
Use this class to play audiosources (usually background music but feel free to use that for anything) in sequence, with optional crossfade between songs
◆ PlaylistStates
the possible states this playlist can be in
Enumerator |
---|
Idle | |
Playing | |
Paused | |
◆ Fade()
virtual IEnumerator MoreMountains.Tools.MMPlaylist.Fade |
( |
int |
index, |
|
|
float |
duration, |
|
|
float |
initialVolume, |
|
|
float |
endVolume, |
|
|
bool |
stopAtTheEnd |
|
) |
| |
|
protectedvirtual |
Fades an audiosource in or out, optionnally stopping it at the end
- Parameters
-
source | |
duration | |
initialVolume | |
endVolume | |
stopAtTheEnd | |
- Returns
◆ Initialization()
virtual void MoreMountains.Tools.MMPlaylist.Initialization |
( |
| ) |
|
|
protectedvirtual |
On init we initialize our state machine and start playing if needed
◆ OnDisable()
virtual void MoreMountains.Tools.MMPlaylist.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On disable, stops listening for playlist events
◆ OnEnable()
virtual void MoreMountains.Tools.MMPlaylist.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable, starts listening for playlist events
◆ OnPauseEvent()
virtual void MoreMountains.Tools.MMPlaylist.OnPauseEvent |
( |
int |
channel | ) |
|
|
protectedvirtual |
◆ OnPlayEvent()
virtual void MoreMountains.Tools.MMPlaylist.OnPlayEvent |
( |
int |
channel | ) |
|
|
protectedvirtual |
◆ OnPlayIndexEvent()
virtual void MoreMountains.Tools.MMPlaylist.OnPlayIndexEvent |
( |
int |
channel, |
|
|
int |
index |
|
) |
| |
|
protectedvirtual |
◆ OnPlayNextEvent()
virtual void MoreMountains.Tools.MMPlaylist.OnPlayNextEvent |
( |
int |
channel | ) |
|
|
protectedvirtual |
◆ OnPlayPreviousEvent()
virtual void MoreMountains.Tools.MMPlaylist.OnPlayPreviousEvent |
( |
int |
channel | ) |
|
|
protectedvirtual |
◆ OnStopEvent()
virtual void MoreMountains.Tools.MMPlaylist.OnStopEvent |
( |
int |
channel | ) |
|
|
protectedvirtual |
◆ OnValidate()
virtual void MoreMountains.Tools.MMPlaylist.OnValidate |
( |
| ) |
|
|
protectedvirtual |
On Validate, we check if our array has changed and if yes we initialize our new elements
◆ Pause()
virtual void MoreMountains.Tools.MMPlaylist.Pause |
( |
| ) |
|
|
virtual |
◆ PickNextIndex()
virtual int MoreMountains.Tools.MMPlaylist.PickNextIndex |
( |
| ) |
|
|
protectedvirtual |
Picks the next song to play
- Returns
◆ PickPreviousIndex()
virtual int MoreMountains.Tools.MMPlaylist.PickPreviousIndex |
( |
| ) |
|
|
protectedvirtual |
Picks the previous song to play
- Returns
◆ Play()
virtual void MoreMountains.Tools.MMPlaylist.Play |
( |
| ) |
|
|
virtual |
Plays either the first song or resumes playing a paused one
◆ PlayAtIndex()
virtual void MoreMountains.Tools.MMPlaylist.PlayAtIndex |
( |
int |
songIndex | ) |
|
|
virtual |
◆ PlayFirstSong()
virtual void MoreMountains.Tools.MMPlaylist.PlayFirstSong |
( |
| ) |
|
|
protectedvirtual |
Picks and plays the first song
◆ PlayNextSong()
virtual void MoreMountains.Tools.MMPlaylist.PlayNextSong |
( |
| ) |
|
|
virtual |
Plays the next song in the playlist
◆ PlayPreviousSong()
virtual void MoreMountains.Tools.MMPlaylist.PlayPreviousSong |
( |
| ) |
|
|
virtual |
Plays the previous song in the playlist
◆ PlaySong()
virtual IEnumerator MoreMountains.Tools.MMPlaylist.PlaySong |
( |
int |
index | ) |
|
|
protectedvirtual |
Plays a new song in the playlist, and stops / fades the previous one
- Parameters
-
- Returns
◆ PlayTargetSong()
virtual void MoreMountains.Tools.MMPlaylist.PlayTargetSong |
( |
| ) |
|
|
protectedvirtual |
◆ Start()
virtual void MoreMountains.Tools.MMPlaylist.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our playlist
◆ Stop()
virtual void MoreMountains.Tools.MMPlaylist.Stop |
( |
| ) |
|
|
virtual |
◆ _coroutine
Coroutine MoreMountains.Tools.MMPlaylist._coroutine |
|
protected |
◆ _firstDeserialization
bool MoreMountains.Tools.MMPlaylist._firstDeserialization = true |
|
protected |
◆ _listCount
int MoreMountains.Tools.MMPlaylist._listCount = 0 |
|
protected |
◆ _songsPlayedSoFar
int MoreMountains.Tools.MMPlaylist._songsPlayedSoFar = 0 |
|
protected |
◆ _songsPlayedThisCycle
int MoreMountains.Tools.MMPlaylist._songsPlayedThisCycle = 0 |
|
protected |
◆ Channel
int MoreMountains.Tools.MMPlaylist.Channel = 0 |
the channel on which to broadcast orders for this playlist
◆ CurrentlyPlayingIndex
int MoreMountains.Tools.MMPlaylist.CurrentlyPlayingIndex = -1 |
the index we're currently playing
◆ CurrentSongName
string MoreMountains.Tools.MMPlaylist.CurrentSongName |
the name of the song that is currently playing
◆ Endless
bool MoreMountains.Tools.MMPlaylist.Endless = true |
whether this playlist should play and loop as a whole forever or not
◆ NextButton
bool MoreMountains.Tools.MMPlaylist.NextButton |
◆ PauseButton
bool MoreMountains.Tools.MMPlaylist.PauseButton |
◆ PlayButton
bool MoreMountains.Tools.MMPlaylist.PlayButton |
◆ PlaylistState
the current state of this playlist
◆ PlayOnStart
bool MoreMountains.Tools.MMPlaylist.PlayOnStart = true |
whether this playlist should auto play on start or not
◆ RandomizeOrderSeed
bool MoreMountains.Tools.MMPlaylist.RandomizeOrderSeed = true |
if this is true, random seed will be randomized by the system clock
◆ RandomOrder
bool MoreMountains.Tools.MMPlaylist.RandomOrder = false |
whether this should play in random order or not
◆ Songs
the songs that this playlist will play
◆ StopButton
bool MoreMountains.Tools.MMPlaylist.StopButton |
◆ TargetSongButton
bool MoreMountains.Tools.MMPlaylist.TargetSongButton |
◆ TargetSongIndex
int MoreMountains.Tools.MMPlaylist.TargetSongIndex = 0 |
the index of the song to play when pressing the PlayTargetSong button
◆ VolumeMultiplier
float MoreMountains.Tools.MMPlaylist.VolumeMultiplier = 1f |
a global volume multiplier to apply when playing a song
The documentation for this class was generated from the following file:
- E:/Github/Store/HighroadEngine/Assets/HighroadEngine/MMTools/Tools/MMAudio/MMPlaylist/MMPlaylist.cs