11 public string Name {
get;
private set; }
31 public bool Paused {
get;
private set; }
51 public float Volume {
get;
private set; }
88 AudioSource.clip =
clip;
104 AudioSource.loop =
loop;
120 AudioSource.mute =
mute;
133 priority = Mathf.Clamp(value, 0, 256);
146 get {
return pitch; }
149 pitch = Mathf.Clamp(value, -3, 3);
152 AudioSource.pitch =
pitch;
229 spread = Mathf.Clamp(value, 0, 360);
232 AudioSource.spread =
spread;
345 this.Type = audioType;
349 this.Persist = persist;
350 this.targetVolume = volume;
351 this.initTargetVolume = volume;
352 this.tempFadeSeconds = -1;
353 this.FadeInSeconds = fadeInValue;
354 this.FadeOutSeconds = fadeOutValue;
388 AudioSource.clip =
Clip;
389 AudioSource.loop =
Loop;
390 AudioSource.mute =
Mute;
391 AudioSource.volume =
Volume;
393 AudioSource.pitch =
Pitch;
398 AudioSource.spread =
Spread;
423 if (!restoredFromPool)
442 targetVolume = volume;
516 public void SetVolume(
float volume,
float fadeSeconds,
float startVolume)
void SetVolume(float volume, float fadeSeconds, float startVolume)
Sets the audio volume.
AudioRolloffMode RolloffMode
How the audio attenuates over distance.
bool Mute
Whether the audio is muted.
float FadeInSeconds
How many seconds it needs for the audio to fade in/ reach target volume (if higher than current)
void Play()
Start playing audio clip from the beginning.
void Set3DDistances(float min, float max)
Sets the Audio 3D distances.
float Spread
The spread angle (in degrees) of a 3d stereo or multichannel sound in speaker space.
float StereoPan
Pans a playing sound in a stereo way (left or right). This only applies to sounds that are Mono or St...
Audio(string name, AudioType audioType, AudioClip clip, bool loop, bool persist, float volume, float fadeInValue, float fadeOutValue, Transform sourceTransform)
bool Stopping
Whether the audio is stopping.
void UnPause()
Resume playing audio clip.
AudioSource AudioSource
The audio source that is responsible for this audio. Do not modify the audiosource directly as it cou...
float ReverbZoneMix
The amount by which the signal from the AudioSource will be mixed into the global reverb associated w...
bool IsPlaying
Whether the audio is currently playing.
int Priority
Sets the priority of the audio.
float SpatialBlend
Sets how much this AudioSource is affected by 3D spatialisation calculations (attenuation,...
void Update()
Update loop of the Audio. This is automatically called from the sound manager itself....
bool Loop
Whether the audio will be lopped.
Transform SourceTransform
The source transform of the audio.
bool Paused
Whether the audio is paused.
bool Pooled
Whether the audio is currently pooled. Do not modify this value, it is specifically used by EazySound...
void Stop()
Stop playing audio clip.
AudioClip Clip
Audio clip to play/is playing.
void Play(float volume)
Start playing audio clip from the beggining.
void Pause()
Pause playing audio clip.
float Max3DDistance
(Logarithmic rolloff) MaxDistance is the distance a sound stops attenuating at.
AudioRolloffMode rolloffMode
float Min3DDistance
Within the Min distance the audio will cease to grow louder in volume.
AudioType Type
The type of the Audio.
float Volume
The volume of the audio. Use SetVolume to change it.
float Pitch
The pitch of the audio.
Transform sourceTransform
void SetVolume(float volume)
Sets the audio volume.
float FadeOutSeconds
How many seconds it needs for the audio to fade out/ reach target volume (if lower than current)
float DopplerLevel
The doppler scale of the audio.
AudioType
Enum representing the type of audio.
void CreateAudiosource()
Creates and initializes the audiosource component with the appropriate values.
void Resume()
Resume playing audio clip.
bool Activated
Whether the audio is created and updated at least once.
int AudioID
The ID of the Audio.
void SetVolume(float volume, float fadeSeconds)
Sets the audio volume.
bool Persist
Whether the audio persists in between scene changes.
Static class responsible for playing and managing audio and sounds.
static bool RestoreAudioFromPool(Audio.AudioType audioType, int audioID)
Restores and re-adds a pooled audio to its corresponding audio dictionary.
static float GlobalVolume
Global volume.
static GameObject Gameobject
The gameobject that the sound manager is attached to.