Exemplo n.º 1
0
    void LateUpdate()
    {
        if (!gameManager.LevelEnded() && Input.GetKeyDown(KeyCode.Escape))
        {
            if (isGamePaused == false)
            {
                isGamePaused   = true;
                Time.timeScale = 0;
                PausePanel.SetActive(true);
                eventSys.UpdateEventSystem(btnPauseStart);
                FindObjectOfType <HeroController>().Pause();
            }
            else
            {
                isGamePaused = false;
                PausePanel.SetActive(false);
                Time.timeScale = 1;
                FindObjectOfType <HeroController>().Resume();
            }
        }

        /*if (Input.GetKeyDown(KeyCode.D))
         * {
         *  DeathUI();
         * }*/
    }
Exemplo n.º 2
0
    public void OpenMenu(int menu)
    {
        int idx = menu - 1;

        state = (menu > (int)MenuState.SUBMENU ? (int)MenuState.SUBMENU : menu);
        foreach (Button button in mainMenuButtons)
        {
            button.interactable = (menu == (int)MenuState.MENU);
        }
        hero.SetActive(false);
        eventSystem.UpdateEventSystem(menus[idx].firstButton);
        foreach (MenuPanel m in menus)
        {
            if (m.menu != null)
            {
                m.menu.SetActive((m.menu == menus[idx].menu));
            }
        }
    }
Exemplo n.º 3
0
 public void ClearDatas()
 {
     ApplicationDatas.Clear();
     SetupLoad();
     eventSys.UpdateEventSystem();
 }
Exemplo n.º 4
0
 public void SelectButton()
 {
     eventPatch.UpdateEventSystem(button);
 }