コード例 #1
0
    /* waits for time seconds, then fades out */
    IEnumerator FadeAfterTime(float time)
    {
        yield return(new WaitForSeconds(time));

        FIScript.FadeOut();
        firstScreenAfterCredsImage.enabled = true;
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     if (fadeMasterFIScript.getFadeOutEngaged())
     {
         FIScript.FadeOut();
     }
 }
コード例 #3
0
 // Update is called once per frame
 void Update()
 {
     if (curScene.enabled)
     {
         wasEnabled = true;
         if (!fadeActive)
         {
             timeAccum += Time.deltaTime;
             if (timeAccum >= currSceneTime)
             {
                 if (skipFade)
                 {
                     curScene.enabled = false;
                 }
                 FIScript.FadeOut();
                 fadeActive = true;
                 if (rt != null)
                 {
                     rt.setMoveIt(true);
                 }
                 if (nextSceneImage != null)
                 {
                     nextSceneImage.enabled = true;
                 }
             }
             else if (spaceToSpeedUp && Input.GetMouseButtonDown(0))
             {
                 FIScript.fadeRate = 10.0f;
                 timeAccum         = currSceneTime + 1;
                 if (SceneManager.GetActiveScene().name == "Splash Screen")
                 {
                     GameObject.Find("MangoSound").GetComponent <AudioSource>().volume = 0.0f;
                 }
             }
         }
         else if (spaceToSpeedUp && Input.GetMouseButtonDown(0))
         {
             FIScript.fadeRate = 10.0f;
             if (SceneManager.GetActiveScene().name == "Splash Screen")
             {
                 GameObject.Find("MangoSound").GetComponent <AudioSource>().volume = 0.0f;
             }
         }
     }
     else if (!endScene && wasEnabled)
     {
         endScene = true;
         if (nextScene == null && endOfSceneLocation != null)
         {
             SceneManager.LoadScene(endOfSceneLocation, LoadSceneMode.Single);
         }
     }
 }
コード例 #4
0
    void CutsceneFlow(string state)
    {
        if (state == "startCutScene")
        {
            currentImage.FadeOut(2f);
            currentImage.ChangeSourceImage(0);
            currentImage.FadeIn(2f);
        }
        if (state == "afterfirst")
        {
            DirectFadeImage(stateNow);
            StartCoroutine(waitBothFadeOut(2f));
        }
        if (state == "endScene")
        {
            currentImage.gameObject.SetActive(false);
            nextImage.gameObject.SetActive(false);
            //GamePhase.Instance.ChangePhase("Phase0");

            //SceneLoader.Instance.ChangeToScene(nextScene.ToString());
        }
    }
コード例 #5
0
    public IEnumerator UnloadScene()
    {
        Debug.Log("unloading");
        // Fade to black
        yield return(StartCoroutine(blackScreenCover.FadeIn()));

        // Hide loading screen
        foreach (GameObject i in destroyMeSenpai)
        {
            Destroy(i);
        }

        //Fade to new screen and destroy this object
        yield return(StartCoroutine(blackScreenCover.FadeOut(gameObject)));
    }
コード例 #6
0
    IEnumerator ShowEndCutscene(float time)
    {
        yield return(new WaitForSeconds(time));

        Destroy(factorySmoke);
        Destroy(factory);

        Instantiate(factoryDestroyed);

        player.transform.position = endCutscenePos.transform.position;
        Camera.main.transform.LookAt(endCutsceneTarget.transform.position);
        fadeImage.FadeOut();

        victoryText.SetActive(true);

        ScreenFadeOut(8);
    }
コード例 #7
0
 void BothFadeOut()
 {
     currentImage.FadeOut(1f);
     nextImage.FadeOut(1f);
 }
コード例 #8
0
ファイル: CanvasController.cs プロジェクト: errues/GGJ
 public void FadeOut()
 {
     fadeImage.FadeOut(fadingSpeed);
 }