예제 #1
0
    void ToggleMainMenu()
    {
        uiMain.gameObject.SetActive(!uiMain.gameObject.activeSelf);

        if (uiMain.gameObject.activeSelf)
        {
            uiGame.gameObject.SetActive(false);
        }
        else
        {
            uiGame.gameObject.SetActive(true);
        }

        uiMain.GetComponent <StartSelection>().selectable.Select();

        // TODO: consider changing these in OnEnable/OnDisable
        rewiredPlayer.controllers.maps.SetMapsEnabled(uiMain.gameObject.activeSelf, "UI");
        rewiredPlayer.controllers.maps.SetMapsEnabled(!uiMain.gameObject.activeSelf, "Exploration");
    }