コード例 #1
0
    private void Update()
    {
        if (changeScene == false)
        {
            timer -= Time.deltaTime;
            if (timer <= 0)
            {
                if (_EFDeathCount <= 0)
                {
                    _victor = "Zion";
                    FadeScript fs = Fade.GetComponent <FadeScript>();
                    fs.Fade(true);
                    sceneIndex = 3;
                    StartCoroutine(WaitForFade());
                }

                if (_ZionDeathCount <= 0)
                {
                    FadeScript fs = Fade.GetComponent <FadeScript>();
                    fs.Fade(true);
                    sceneIndex = 2;
                    StartCoroutine(WaitForFade());
                }
            }
        }
    }
コード例 #2
0
    //Espera o fade para carregar a nova cena
    IEnumerator FadeAndLoad(string scene)
    {
        yield return(StartCoroutine
                         (fade.Fade(Color.clear, Color.black)));

        SceneManager.LoadScene(scene);
    }
コード例 #3
0
ファイル: DialogueSystem.cs プロジェクト: justinaray828/CWMA
    public IEnumerator RollCredits()
    {
        EventManager.TriggerEvent("FinishGame");
        FadeScript fade = FindObjectOfType <FadeScript>();

        if (fade != null)
        {
            fade.Fade();
        }
        yield return(new WaitForSeconds(1.6f));

        dialoguePanelController.PopUp = false;
        yield return(new WaitForSeconds(1.5f));

        sceneHandler.LoadScene("09_Credits");
    }
コード例 #4
0
    IEnumerator DialogueScene_1()
    {
        CharacterSelection();
        UpdateText();
        UpdatePanelProfile();
        panel.enabled   = true;
        profile.enabled = true;
        text.enabled    = true;

        yield return(new WaitForSeconds(timeBetweenSentances));

        index++;
        if (index < sentances.Length)
        {
            StartCoroutine(DialogueScene_1());
        }
        else
        {
            FadeScript fs = fadeObj.GetComponent <FadeScript>();
            fs.Fade(true);
            Invoke("ChangeScene", 1);
        }
    }