Music player which provides basic operations for playing/pausing/stopping music.
More...
|
const float | nextSongDelay = 0.33f |
| How long to wait before playing the next song. More...
|
|
const float | songEndDelta = 0.1f |
| Difference between clip length and current time which we still considere to be end of song. More...
|
|
Music player which provides basic operations for playing/pausing/stopping music.
◆ DoFadeIn()
virtual IEnumerator PlatformerPro.MusicPlayer.DoFadeIn |
( |
float |
time | ) |
|
|
protectedvirtual |
◆ DoFadeOut()
virtual IEnumerator PlatformerPro.MusicPlayer.DoFadeOut |
( |
float |
time | ) |
|
|
protectedvirtual |
◆ FadeIn()
virtual void PlatformerPro.MusicPlayer.FadeIn |
( |
float |
time | ) |
|
|
virtual |
Fade the music in over time.
- Parameters
-
◆ FadeOut()
virtual void PlatformerPro.MusicPlayer.FadeOut |
( |
float |
time | ) |
|
|
virtual |
Fade the music out over time.
- Parameters
-
time | Time taken to fade to 0. |
◆ Init()
virtual void PlatformerPro.MusicPlayer.Init |
( |
| ) |
|
|
protectedvirtual |
◆ Pause()
virtual void PlatformerPro.MusicPlayer.Pause |
( |
| ) |
|
|
virtual |
◆ Play() [1/2]
virtual void PlatformerPro.MusicPlayer.Play |
( |
| ) |
|
|
virtual |
Play the first song in the playlist.
◆ Play() [2/2]
virtual void PlatformerPro.MusicPlayer.Play |
( |
string |
songName | ) |
|
|
virtual |
Play the specified song.
- Parameters
-
◆ PlayNext()
virtual void PlatformerPro.MusicPlayer.PlayNext |
( |
| ) |
|
|
virtual |
◆ Stop()
virtual void PlatformerPro.MusicPlayer.Stop |
( |
| ) |
|
|
virtual |
◆ UpdateVolume()
virtual void PlatformerPro.MusicPlayer.UpdateVolume |
( |
| ) |
|
|
virtual |
◆ audioSource
AudioSource PlatformerPro.MusicPlayer.audioSource |
|
protected |
Cached reference to the audioSource;
◆ autoPlayNextSong
bool PlatformerPro.MusicPlayer.autoPlayNextSong |
Should we start playing the next song automatically.
◆ currentSong
int PlatformerPro.MusicPlayer.currentSong = 0 |
|
protected |
◆ currentSongTime
float PlatformerPro.MusicPlayer.currentSongTime |
|
protected |
◆ nextSongDelay
const float PlatformerPro.MusicPlayer.nextSongDelay = 0.33f |
|
staticprotected |
How long to wait before playing the next song.
◆ playlist
List<SongData> PlatformerPro.MusicPlayer.playlist |
◆ playOnStart
bool PlatformerPro.MusicPlayer.playOnStart |
Should we play the first song straight away?
◆ randomiseSong
bool PlatformerPro.MusicPlayer.randomiseSong |
If true the song that is played is selected randomly.
◆ songEndDelta
const float PlatformerPro.MusicPlayer.songEndDelta = 0.1f |
|
staticprotected |
Difference between clip length and current time which we still considere to be end of song.
The documentation for this class was generated from the following file:
- D:/Projects/platformer-pro-2019.3/Assets/PlatformerPro/Scripts/Audio/MusicPlayer.cs