예제 #1
0
    public void PrologueReview()
    {
        Click.Play();

        StoryManager.storyreview_0 = true;

        Stage.SetActive(false);
        Prologue.SetActive(true);

        GameObject.Find("BGM").GetComponent <AudioSource>().Stop();
        GameObject.Find("BGM_Pro").GetComponent <AudioSource>().Play();
    }
예제 #2
0
    public void StageMenu()
    {
        if (PlayerPrefs.GetInt("Story") == 0)
        {
            Click.Play();

            GameObject.Find("BGM").GetComponent <AudioSource>().Stop();
            GameObject.Find("BGM_Pro").GetComponent <AudioSource>().Play();
            StoryManager.index = 0;

            if (Prologue.activeInHierarchy == false)
            {
                Prologue.SetActive(true);
                Main.SetActive(false);
            }
        }

        else
        {
            Stage.SetActive(true);
            Main.SetActive(false);
        }
    }
예제 #3
0
    public void QuitApplication()
    {
        Click.Play();

        if (!Prologue.activeInHierarchy && !Epilogue.activeInHierarchy &&
            !Extra.activeInHierarchy && !Stage.activeInHierarchy)
        {
            Application.Quit();
        }

        else if (Prologue.activeInHierarchy)
        {
            Prologue.SetActive(false);
            Stage.SetActive(true);

            GameObject.Find("BGM").GetComponent <AudioSource>().Play();
            GameObject.Find("BGM_Pro").GetComponent <AudioSource>().Stop();

            if (PlayerPrefs.GetInt("Story") == 0)
            {
                PlayerPrefs.SetInt("Story", 1);
            }

            StoryManager.storyreview_0 = false;
            StoryManager.index         = 0;
        }

        else if (Epilogue.activeInHierarchy)
        {
            Epilogue.SetActive(false);
            Stage.SetActive(true);

            GameObject.Find("BGM").GetComponent <AudioSource>().Play();
            GameObject.Find("BGM_Epi").GetComponent <AudioSource>().Stop();

            StoryManager.storyreview_2 = false;
            StoryManager.index         = 0;
        }


        else if (Extra.activeInHierarchy)
        {
            Extra.SetActive(false);
            Stage.SetActive(true);

            GameObject.Find("BGM").GetComponent <AudioSource>().Play();
            GameObject.Find("BGM_Extra").GetComponent <AudioSource>().Stop();
            GameObject.Find("BGM_Extra2").GetComponent <AudioSource>().Stop();

            if (PlayerPrefs.GetInt("Story") == 3)
            {
                PlayerPrefs.SetInt("Story", 4);
            }

            StoryManager.storyreview_3 = false;
            StoryManager.index         = 0;
        }

        else if (Stage.activeInHierarchy)
        {
            Stage.SetActive(false);
            Main.SetActive(true);
        }

        //UnityEditor.EditorApplication.isPlaying = false;
    }