Exemplo n.º 1
0
    void showNewCutscene()
    {
        currentlyDisplayingText = 0;

        //print (goalText [0]);

        SceneFadeInOut fader = GameObject.Find("screenFader").GetComponent <SceneFadeInOut> ();

        if (cutscenePos >= cutscenes.Length)
        {
            fader.EndScene();
            //print ("dONE W CUTSCENES");
            SceneManager.LoadScene("MainMenu", LoadSceneMode.Single);
        }
        else
        {
            SpriteRenderer showCutscene = GameObject.Find("Cutscene").GetComponent <SpriteRenderer> ();
            showCutscene.sprite = cutscenes[cutscenePos++];
            goalText            = allCutsceneText [cutscenePos];

            if (cutscenePos == 2)
            {
                ambientAudioSource.clip = magicAudio;
                ambientAudioSource.Play();
                fader.EndSceneFast();
            }
            else
            {
                fader.EndScene();
            }
        }
    }