예제 #1
0
    public void ButtonSelect(int ButtonVal)
    {
        if (ButtonVal == 1)
        {
            SceneManager.LoadScene(1);
        }

        else if (ButtonVal == 2)
        {
            Level1.SetActive(true);
            Level2.SetActive(true);
            Level3.SetActive(true);
        }
        else if (ButtonVal == 3)
        {
            Debug.Log("exit");
            Application.Quit();
            Debug.Log("exit1");
        }
        else if (ButtonVal == 4)
        {
            Debug.Log("settings");
            Sound1.SetActive(true);
            Sound2.SetActive(true);
        }

        else if (ButtonVal == 5)
        {
            PlayerPrefs.SetInt("sesKontrol", 1);
            Debug.Log("seson");

            Sound.SetActive(true);
        }
        else if (ButtonVal == 6)
        {
            PlayerPrefs.SetInt("sesKontrol", 0);
            Debug.Log("sesoff");
            Sound.SetActive(false);
        }
        else if (ButtonVal == 7)
        {
            PlayerPrefs.DeleteAll();
        }
    }