示例#1
0
 //It tooks us from Option to Pause panel.
 public void OptionToPause()
 {
     optionPanel.SetActive(false);
     pausePanel.SetActive(true);
     EventSystem.current.SetSelectedGameObject(null);
     EventSystem.current.SetSelectedGameObject(GameObject.Find("ResumeButton"));
     ConfigSaveSystem.Save();
 }
示例#2
0
    //It tooks us from Option to Menu panel.
    public void OptionToMenu()
    {
        ConfigSaveSystem.Save();

        optionPanel.SetActive(false);
        menuPanel.SetActive(true);
        EventSystem.current.SetSelectedGameObject(null);
        EventSystem.current.SetSelectedGameObject(GameObject.Find("OptionButton"));
    }
示例#3
0
    //Pausing the menu, the time will be setted to 1 and the player can move again.
    public void Unpause()
    {
        unpauseClip.Play();
        pausePanel.gameObject.SetActive(false);
        optionPanel.gameObject.SetActive(false);
        controlsPanel.gameObject.SetActive(false);
        Time.timeScale = 1f;
        Messenger <bool> .Broadcast(GlobalVariables.ENABLE_INPUT, true);

        Messenger <bool> .Broadcast(GlobalVariables.TOGGLE_AUDIO_ON_OFF, true, MessengerMode.DONT_REQUIRE_LISTENER);

        GlobalVariables.isPaused = false;
        ConfigSaveSystem.Save();        // save configs because the player could modify volumes
        Cursor.visible = false;
    }