Exemple #1
0
    public void Update()
    {
        if (Input.GetButtonDown("Submit") || Input.GetMouseButton(0) && SceneManager.GetActiveScene().name == "Attention")
        {
            if (isStart)
            {
                SceneFade.SwitchScene(Title);
                isStart = false;
            }
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Application.Quit();
            //EditorApplication.isPlaying = false;
        }

        if (NameController.textNum1 == 15 || NameController.textNum1 == 19 || NameController.textNum1 == 23)
        {
            if (SceneManager.GetActiveScene().name == "Unity_01")
            {
                SceneFade.SwitchScene(Unity_02);
                NameController.textNum1  = 60;
                TextController2.textNum1 = 60;
            }
        }

        if (NameController.textNum1 == 59)
        {
            if (SceneManager.GetActiveScene().name == "Unity_02")
            {
                SceneFade.SwitchScene(End);
                NameController.textNum1  = 60;
                TextController2.textNum1 = 60;
            }
        }
    }
Exemple #2
0
 public void OpenScene()
 {
     SceneFade.SwitchScene(sceneName);
 }
Exemple #3
0
 public void OnButtonSwitchScene(string sceneName)
 {
     SceneFade.SwitchScene(sceneName);
 }
Exemple #4
0
    void Update()
    {
        upperlimit += Time.deltaTime;

        if (upperlimit > Endcount)
        {
            if (one)
            {
                StopCoroutine(FadeinPanel1());
                StartCoroutine(FadeoutPanel1());
                one = false;
            }
        }


        if (upperlimit > (Endcount * 2))
        {
            if (two)
            {
                StopCoroutine(FadeoutPanel1());
                StartCoroutine(FadeinPanel1());
                two = false;
            }
        }

        if (upperlimit > (Endcount * 3))
        {
            if (three)
            {
                StopCoroutine(FadeinPanel2());
                StartCoroutine(FadeoutPanel2());
                three = false;
            }
        }

        if (upperlimit > (Endcount * 4))
        {
            if (four)
            {
                StopCoroutine(FadeoutPanel2());
                StartCoroutine(FadeinPanel2());
                four = false;
            }
        }

        if (upperlimit > (Endcount * 5))
        {
            if (five)
            {
                StopCoroutine(FadeinPanel3());
                StartCoroutine(FadeoutPanel3());
                five = false;
            }
        }

        if (upperlimit > (Endcount * 6))
        {
            if (six)
            {
                StopCoroutine(FadeoutPanel3());
                StartCoroutine(FadeinPanel3());
                six = false;
            }
        }

        if (upperlimit > (Endcount * 7))
        {
            if (seven)
            {
                StopCoroutine(FadeinPanel4());
                StartCoroutine(FadeoutPanel4());
                seven = false;
            }
        }

        if (upperlimit > (Endcount * 8))
        {
            if (eight)
            {
                StopCoroutine(FadeoutPanel4());
                StartCoroutine(FadeinPanel4());
                eight = false;
            }
        }

        if (upperlimit > (Endcount * 9))
        {
            if (nine)
            {
                StopCoroutine(FadeinPanel5());
                StartCoroutine(FadeoutPanel5());
                nine = false;
            }
        }

        if (upperlimit > (Endcount * 10))
        {
            if (ten)
            {
                StopCoroutine(FadeoutPanel5());
                StartCoroutine(FadeinPanel5());
                ten = false;
            }
        }

        if (upperlimit > (Endcount * 11))
        {
            if (eleven)
            {
                StopCoroutine(FadeinPanel6());
                StartCoroutine(FadeoutPanel6());
                eleven = false;
            }
        }

        if (upperlimit > (Endcount * 12))
        {
            if (twelve)
            {
                StopCoroutine(FadeoutPanel6());
                StartCoroutine(FadeinPanel6());
                twelve = false;
            }
        }

        if (upperlimit > 106)
        {
            if (thirteen)
            {
                Chara7.SetActive(true);
                thirteen = false;
            }
        }

        if (upperlimit > 113)
        {
            if (fourteen)
            {
                upperlimit = 0;
                Chara7.SetActive(false);
                SceneFade.SwitchScene(Attention);
                fourteen = false;
            }
        }

        if (Input.GetButtonDown("Submit") || Input.GetMouseButton(0) && SceneManager.GetActiveScene().name == "End")
        {
            if (isEnd)
            {
                upperlimit = 0;
                SceneFade.SwitchScene(Attention);
                isEnd = false;
            }
        }
    }