ScreenChanger.continueWithChange C# (CSharp) Method

continueWithChange() private method

private continueWithChange ( ) : IEnumerator
return IEnumerator
    IEnumerator continueWithChange()
    {
        if (Controller)
            Controller.DisableInput(5);

        foreach (var texture in SubObjects)
        {
            texture.color = visible;
        }

        var max = SubObjects.Count - 1;
        SubObjects[max].color = halfVisible;
        for (var i = max; i >= 0; i--)
        {
            var texture = SubObjects[i];
            float startElapsed = 0;
            var startTime = i == max ? StartTime / 2f : StartTime;
            var startColor = i == max ? halfVisible : visible;

            Debug.LogFormat("{0}, {1}", startTime, startColor);
            while (startElapsed < startTime)
            {
                if (Controller)
                    Controller.DisableInput(5);
                texture.color = Color.Lerp(startColor, invisible, startElapsed / startTime);
                startElapsed += Time.deltaTime;
                yield return null;
            }
        }

        if (Controller)
            Controller.EnableInput(5);
        SetActive(false);
        Controller.SignalLoadComplete();
    }