示例#1
0
    IEnumerator DeathOverlayTransition()
    {
        yield return(new WaitForSeconds(1));

        yield return(new WaitForSeconds(fade.BeginFade(1)));

        deathOverlayUI.SetActive(true);

        yield return(new WaitForSeconds(fade.BeginFade(-1)));
    }
示例#2
0
    IEnumerator LoadingLevel(string levelToLoad)
    {
        if (loading == false)
        {
            loading = true;

            float fadeTime = fade.fadeSpeed;
            fade.doFade = true;
            fade.BeginFade(1);                          //fade out
            yield return(new WaitForSeconds(fadeTime)); //wait for fade

            Application.LoadLevel(levelToLoad);
            Debug.Log(levelToLoad + "is being loaded");
            loading = false;
        }
    }
示例#3
0
    IEnumerator FadingLoading(string level)
    {
        float fadetime = fading.BeginFade(1);

        yield return(new WaitForSeconds(fadetime * 1.2f));

        Application.LoadLevel(level);
    }
示例#4
0
    IEnumerator endingalmost()
    {
        yield return(new WaitForSeconds(5));

        yield return(new WaitForSeconds(fading.BeginFade(1) * 1.2f));

        Application.LoadLevel("StartPage");
    }
示例#5
0
    IEnumerator ChangeScene(string scene)
    {
        float fadeTime = _Fade.BeginFade(1);

        yield return(new WaitForSeconds(fadeTime));

        SceneManager.LoadScene(scene);
    }
示例#6
0
    IEnumerator FadeLevel()
    {
        Debug.Log("Attempting to fade level");
        float fade_time = fade.BeginFade(1);

        Debug.Log(fade_time);

        //halt player movement until fade is done
        player.GetComponent <PlayerMovementController>().enabled = false;
        yield return(new WaitForSeconds(fade_time));

        player.GetComponent <PlayerMovementController>().enabled = true;
    }
示例#7
0
 // Use this for initialization
 void Start()
 {
     StopIcon.SetActive(false);
     dialogue      = "";
     characterName = "";
     pose          = 0;
     position      = "L";
     playerTalking = false;
     parser        = GameObject.Find("DialogueParser").GetComponent <DialogueParser>();
     fading        = GameObject.Find("Fade").GetComponent <Fade>();
     fading.BeginFade(-1);
     lineNum = 0;
 }
示例#8
0
    IEnumerator StartGameRoutine()
    {
        float fadeTime = _Fade.BeginFade(-1);

        yield return(new WaitForSeconds(fadeTime));

        ShowShipStatusMain();
        ShowShipStatus();
    }
示例#9
0
    private IEnumerator _FadeOutLoadLevel(string _level)
    {
        yield return(new WaitForSeconds(fade.BeginFade(1)));

        Application.LoadLevel(_level);
    }
示例#10
0
 // Use this for initialization
 void Start()
 {
     fading = GameObject.Find("Fade").GetComponent <Fade>();
     fading.BeginFade(-1);
     StartCoroutine(endingalmost());
 }
示例#11
0
 void Start()
 {
     FadeInstance.BeginFade(-1);
 }
示例#12
0
    IEnumerator SceneTransition(int scene)
    {
        yield return(new WaitForSeconds(fade.BeginFade(1)));

        SceneManager.LoadScene(scene, LoadSceneMode.Single);
    }