private void Update()
 {
     if (isGameOver && Input.GetKeyDown(KeyCode.R))
     {
         Restart();
     }
     if (Input.GetKeyDown(KeyCode.Escape) && isReady)
     {
         if (menudepth == 0)
         {
             Pause();
         }
         else if (menudepth == 1)
         {
             Resume();
         }
         else if (OptionsMenuUI.activeInHierarchy == true)
         {
             OptionsMenuUI.SetActive(false);
             PauseMenuUI.SetActive(true);
             menudepth--;
         }
         else if (QuitMenuUI.activeInHierarchy == true)
         {
             QuitMenuUI.SetActive(false);
             PauseMenuUI.SetActive(true);
             menudepth--;
         }
     }
 }
示例#2
0
    public void SairDoJogo()
    {
        OptionsMenuUI.SetActive(false);
        Continuar();

        SceneManager.LoadScene(0);
    }
示例#3
0
    IEnumerator Init()
    {
        yield return(1);

        UIResourceMgr.GetInstance().LoadMapUIMaterials();
        //if (GameApp.GetInstance().GetGameState().FirstTimeGame)
        {
            if (Time.time - startTime < 3.0f && !GameApp.GetInstance().GetGameState().FromShopMenu)
            {
                yield return(new WaitForSeconds(3.0f - (Time.time - startTime)));
            }
        }
        FadeAnimationScript.GetInstance().FadeOutBlack();
        GameApp.GetInstance().GetGameState().FromShopMenu = false;

        mapPanel = new MapUIPanel();
        m_UIManager.Add(mapPanel);
        mapPanel.Start();
        mapPanel.Show();


        optionsUI = new OptionsMenuUI();
        m_UIManager.Add(optionsUI);
    }
示例#4
0
 public void CarregarOpcoes()
 {
     OptionsMenuUI.SetActive(true);
 }