Exemplo n.º 1
0
    IEnumerator Finish()
    {
        transition.FadeToBlack();
        yield return(new WaitForSeconds(2f));

        Dificulty.level++;
        SceneLoaderStatic.ReloadScene();
    }
Exemplo n.º 2
0
    IEnumerator Begin()
    {
        Dificulty.level = 1;
        WaitForFixedUpdate update = new WaitForFixedUpdate();

        yield return(new WaitForSeconds(2f));

        lightning.Strike(2);
        cameraShake.Shake();
        dialogueManager.StartDialogue(DialogueData.tutorial1);
        Vector3 playerStartposiiton = player.transform.position;

        while (player.transform.position.y < playerStartposiiton.y + 4f)
        {
            yield return(update);
        }
        dialogueManager.StartDialogue(DialogueData.tutorial2);
        while (dialogueManager.InDialogue)
        {
            yield return(update);
        }

        player.GetComponent <DisplaySize>().enabled = true;
        foreach (GameObject wool in woolBalls)
        {
            if (wool != null)
            {
                wool.GetComponent <DisplaySize>().enabled = true;
            }
        }

        while (player.size < 20)
        {
            yield return(update);
        }

        cameraShake.Shake();
        lightning.Strike(10);
        dialogueManager.StartDialogue(DialogueData.tutorial4);
        while (dialogueManager.InDialogue)
        {
            yield return(update);
        }
        lightning.Strike(5);

        while (!tutorialFinish)
        {
            yield return(update);
        }

        transition.FadeToBlack();
        yield return(new WaitForSeconds(2f));

        SceneLoaderStatic.LoadNextScene();
    }