Beispiel #1
0
    private void Update()
    {
        cena = SceneManager.GetActiveScene();

        if (cena.name == "Z" + GameManager.zona + "F" + GameManager.fase + " Boss")
        {
            boss = true;
        }
        else
        {
            boss = false;
        }


        if (Input.GetKeyDown(KeyCode.P))
        {
            if (Time.timeScale == 1)
            {
                PlayerController.podeExecutar = false;
                turtle.shieldAtivo            = false;
                Time.timeScale = 0;
                PauseVolta.PauseGame();
            }

            else if (Time.timeScale == 0)
            {
                PlayerController.podeExecutar = true;
                turtle.shieldAtivo            = false;
                Time.timeScale = 1;
                PauseVolta.ResumeGame();
            }
        }
    }
Beispiel #2
0
    void gerenciaBotoes()
    {
        if (Event.current.isKey && Event.current.keyCode == KeyCode.Z && Input.anyKeyDown)
        {
            //Vai pro game manager
            if (GUI.GetNameOfFocusedControl() == botoes[0])
            {
                Time.timeScale = 1;
                PauseVolta.ResumeGame();
                PlayerController.podeExecutar = true;
                //hidePaused();
            }

            //Vai pras opções
            if (GUI.GetNameOfFocusedControl() == botoes[1])
            {
                GameManager.bgmEv.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
                MainMenu.musicaJaTocou = false;
                GameManager.instance.OnChangeScene("Menu");
            }

            if (GUI.GetNameOfFocusedControl() == botoes[2])
            {
                Application.Quit();
                //Debug.Log("saiu");
            }
        }
    }