Example #1
0
    private IEnumerator ShowEat(Eat.Target target)
    {
        yield return(blackScreen.FadeIn());

        eat.transform.position = new Vector3(0, 0, -30);
        eat.StartEat(target);
        yield return(blackScreen.FadeOut());
    }
Example #2
0
    IEnumerator FadeChangeRoom()
    {
        isChanging = true;
        transform.GetChild(0).localScale = new Vector3(0, 0, 0);
        StartCoroutine(blkScreen.FadeOut(fadeDuration));
        yield return(new WaitForSeconds(fadeDuration + 0.1f));

        sphereScreen.GetComponent <Renderer>().material.mainTexture = textureSphere[i];
        if (i == textureSphere.Count - 1)
        {
            i = 0;
        }
        else
        {
            i++;
        }
        isChanging = false;
        StartCoroutine(blkScreen.FadeIn(fadeDuration));
        yield return(null);
    }