CapturePanorama.CapturePanorama.FadeOut C# (CSharp) Method

FadeOut() public method

public FadeOut ( IEnumerable fadeControls ) : IEnumerator
fadeControls IEnumerable
return IEnumerator
        public IEnumerator FadeOut(IEnumerable<ScreenFadeControl> fadeControls)
        {
            Log("Doing fade out");
            // Derived from OVRScreenFade
            float elapsedTime = 0.0f;
            Color color = fadeColor;
            color.a = 0.0f;
            fadeMaterial.color = color;
            SetFadersEnabled(fadeControls, true);
            while (elapsedTime < fadeTime)
            {
                yield return new WaitForEndOfFrame();
                elapsedTime += Time.deltaTime;
                color.a = Mathf.Clamp01(elapsedTime / fadeTime);
                fadeMaterial.color = color;
            }
        }