Esempio n. 1
0
    private void Start()
    {
        SetState(0);
        var mainMenu    = menuManager.transform.Find("MainMenu");
        var optionsMenu = menuManager.transform.Find("OptionsMenu");

        optionsMenu.gameObject.SetActive(false);
        mainMenu.gameObject.SetActive(true);

        DontDestroyOnLoad(persistentSettings);

        //set starting difficulty in beginning
        PersistentSettings.UpdateDiff(1);

        //select first button
        EventSystem.current.SetSelectedGameObject(GameObject.Find("Play"));
    }
Esempio n. 2
0
 public void ChangeDifficulty()
 {
     print("changing difficulty to " + difficultySlider.value + "!");
     PersistentSettings.UpdateDiff((int)difficultySlider.value);
     UpdateSliderCube(difficultySlider);
 }