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

Public Member Functions

override MainData SaveMainData (MainData mainData)
 Updates a MainData class with its own variables that need saving. More...
 
override void LoadMainData (MainData mainData)
 Updates its own variables from a MainData class. More...
 
- Public Member Functions inherited from AC.Soundtrack
override void _Update ()
 
float Play (int trackID, bool loop, bool isQueued, float fadeTime, bool resumeIfPlayedBefore=false, int newTrackTimeSamples=0)
 Plays a new soundtrack More...
 
float Crossfade (int trackID, bool loop, bool isQueued, float fadeTime, bool resumeIfPlayedBefore=false, int newTrackTimeSamples=0)
 Crossfade a new soundtrack More...
 
float ResumeLastQueue (float fadeTime, bool playFromStart)
 Resumes the last-played soundtrack queue More...
 
float StopAll (float fadeTime, bool storeCurrentIndex=true)
 Stops the currently-playing track, and cancels all those in the queue. More...
 
int GetCurrentTrackID ()
 
- Public Member Functions inherited from AC.Sound
void AfterLoad ()
 
void AfterLoading ()
 
void Interact ()
 
void FadeIn (float _fadeTime, bool loop, int _timeSamples=0)
 Fades in the AudioSource's current AudioClip, after which it continues to play. More...
 
void FadeOut (float _fadeTime)
 Fades out the AudioSource's current AudioClip, after which it stops. More...
 
bool IsFadingOut ()
 Checks if the AudioSource's AudioClip is being faded out. More...
 
void Play ()
 Plays the AudioSource's current AudioClip, without starting over if it was paused or changing its "loop" variable.
 
void Play (bool loop)
 Plays the AudioSource's current AudioClip. More...
 
void Play (AudioClip clip, bool loop, int _timeSamples=0)
 Plays an AudioClip. More...
 
void PlayAtPoint (bool loop, int samplePoint)
 Plays the AudioSource's current AudioClip from a set point. More...
 
void SetMaxVolume ()
 
void SetVolume (float volume)
 Sets the volume, but takes relativeVolume into account as well. More...
 
void ChangeRelativeVolume (float newRelativeVolume, float changeTime=0f)
 Changes the relativeVolume value. More...
 
void Stop ()
 
bool IsFading ()
 Checks if the sound is fading in or out. More...
 
bool IsPlaying ()
 Checks if sound is playing. More...
 
bool IsPlaying (AudioClip clip)
 Checks if a particular AudioClip is playing. More...
 
void TryDestroy ()
 
void EndOld (SoundType _soundType, Sound ignoreSound)
 Fades out all sounds of a particular type being played. More...
 
SoundData GetSaveData (SoundData soundData)
 Updates a SoundData class with its own variables that need saving. More...
 
void LoadData (SoundData soundData)
 Updates its own variables from a SoundData class. More...
 

Protected Member Functions

new void Awake ()
 
- Protected Member Functions inherited from AC.Soundtrack
void Awake ()
 
virtual bool EndsOthers ()
 
string CreateTimesampleString ()
 
string CreateLastSoundtrackString ()
 
string CreateOldTimesampleString ()
 
void LoadMainData (int _timeSamples, string _oldTimeSamples, int _lastTimeSamples, string _lastQueueData, string _queueData)
 
MusicStorage GetSoundtrack (int ID)
 
- Protected Member Functions inherited from AC.Sound
void Initialise ()
 

Properties

override List< MusicStorageStorages [get]
 
- Properties inherited from AC.Soundtrack
virtual List< MusicStorageStorages [get]
 
int LastTimeSamples [get]
 
virtual bool IsMusic [get]
 

Additional Inherited Members

- Public Attributes inherited from AC.Sound
SoundType soundType
 
bool playWhilePaused = false
 
float relativeVolume = 1f
 
bool surviveSceneChange = false
 
- Protected Attributes inherited from AC.Sound
AudioSource audioSource
 

Detailed Description

This script handles the playback of Ambience when played using the 'Sound: Play ambience' Action.

Member Function Documentation

◆ LoadMainData()

override void AC.Ambience.LoadMainData ( MainData  mainData)
virtual

Updates its own variables from a MainData class.

Parameters
mainDataThe MainData class to load from

Reimplemented from AC.Soundtrack.

◆ SaveMainData()

override MainData AC.Ambience.SaveMainData ( MainData  mainData)
virtual

Updates a MainData class with its own variables that need saving.

Parameters
mainDataThe original MainData class
Returns
The updated MainData class

Reimplemented from AC.Soundtrack.