Пример #1
0
    void Update()
    {
        if (!paused)
        {
            if (Input.GetButtonDown("Cancel") || Input.GetKeyDown(KeyCode.I) || Input.GetKeyDown(KeyCode.F))
            {
                if (Input.GetButtonDown("Cancel"))
                {
                    menuState = MenuManager.MenuState.System;
                }
                if (Input.GetKeyDown(KeyCode.I))
                {
                    menuState = MenuManager.MenuState.Items;
                }
                if (Input.GetKeyDown(KeyCode.F))
                {
                    menuState = MenuManager.MenuState.Flow;
                }

                Pause(menuState, false);
            }
        }
        else if (Input.GetButtonDown("Cancel") || Input.GetKeyDown(KeyCode.I) || Input.GetKeyDown(KeyCode.F))
        {
            Resume();
        }
    }
Пример #2
0
    public void Pause(MenuManager.MenuState state, bool exploreMode)
    {
        //GetComponent<CanvasGroup>().alpha = 0;
        conversation.SetActive(false);
        explore.SetActive(false);

        if (!exploreMode)
        {
            lastMode = PlayMode.gameMode;
        }
        else
        {
            lastMode = PlayMode.GameMode.Explore;
        }

        PlayMode.ChangeGameMode(PlayMode.GameMode.Menu);
        menuCanvas.SetActive(true);
        menuCanvas.GetComponent <MenuManager>().SetMenu(state);
        paused = true;
    }