Pause._TransitionIn C# (CSharp) Method

_TransitionIn() private method

private _TransitionIn ( ) : IEnumerator
return IEnumerator
    IEnumerator _TransitionIn()
    {
        // Freeze the game
        Time.timeScale = 0;

        // Fade in over 10 frames
        imgFade.color = Color.clear;
        for (int i = 0; i < 10; i++)
        {
            imgFade.color += new Color(0, 0, 0, 0.04f);
            yield return null;
        }
        imgFade.color = new Color(0, 0, 0, 0.4f);

        // Show the PAUSED text and the buttons
       
        objText.SetActive(true);
        objButtons.SetActive(true);

        // Allow input again
        busy = false;
    }