Ejemplo n.º 1
0
    private IEnumerator FadeIn()
    {
        float fadeVal  = 0;
        float fadeTime = 1.6f;

        stillView.gameObject.SetActive(true);
        textBoxController.ViewCGs();
        textBoxController.SwitchTextBox();
        while (true)
        {
            fadeVal        += Time.deltaTime;
            stillView.color = new Color(1, 1, 1, fadeVal / fadeTime);
            if (fadeVal >= fadeTime)
            {
                break;
            }
            yield return(null);
        }
        textBoxController.ViewCGs();
        textBoxController.SwitchTextBox();
        yield break;
    }