AudioClipGroup.AddInterpolation C# (CSharp) Метод

AddInterpolation() публичный Метод

public AddInterpolation ( AudioSource audioSource, float startVolume, float targetVolume, float totalTime ) : void
audioSource UnityEngine.AudioSource
startVolume float
targetVolume float
totalTime float
Результат void
    public void AddInterpolation(AudioSource audioSource, float startVolume, float targetVolume, float totalTime)
    {
        AudioSourceInterpolation currentInterpolation = InterpolationExist(audioSource);

        if (currentInterpolation != null)
            _openInterpolations.Remove(currentInterpolation);

        AudioSourceInterpolation interpolation = new AudioSourceInterpolation(audioSource, startVolume, targetVolume, totalTime);
        interpolation.OnComplete = OnInterpotalionComplete;
        _openInterpolations.Add(interpolation);
    }