Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.MusicCrossfade Class Reference
Inheritance diagram for AC.MusicCrossfade:

Public Member Functions

void Stop ()
bool IsPlaying ()
 Checks if the crossfade audio is playing More...
void FadeOut (AudioSource audioSourceToCopy, float _fadeTime)
 Fades out a new AudioSource More...
void _Update ()

Detailed Description

Handles the fading-out half of crossfading music. When music crossfades, the original track is copied here to be fade out, while the Music object fades in the next track.

Member Function Documentation

◆ _Update()

void AC.MusicCrossfade._Update ( )

Updates the AudioSource's volume. This is called every frame by Music.

◆ FadeOut()

void AC.MusicCrossfade.FadeOut ( AudioSource  audioSourceToCopy,
float  _fadeTime 

Fades out a new AudioSource

audioSourceToCopyThe AudioSource to copy clip and volume data from
_fadeTimeThe duration, in seconds, of the fade effect

◆ IsPlaying()

bool AC.MusicCrossfade.IsPlaying ( )

Checks if the crossfade audio is playing

True if the crossfade audio is playing

◆ Stop()

void AC.MusicCrossfade.Stop ( )

Stops the current audio immediately/