Exemplo n.º 1
0
    public void StartGame()
    {
        Time.timeScale = 1;

        MenuPanelManager menuPanelManager = MenuPanelManager.GetInstance();

        menuPanelManager.CloseMenu();
    }
Exemplo n.º 2
0
    public void RestartGame()
    {
        startGameButtonText.text = "Start Game";
        RotateCounter rc = FindObjectOfType <RotateCounter>();

        rc.ResetStartCondition();

        MenuPanelManager menuPanelManager = MenuPanelManager.GetInstance();

        menuPanelManager.CloseMenu();

        casette.ResetStartCondition();
        pen.ResetStartCondition();
    }
Exemplo n.º 3
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         MenuPanelManager menuPanelManager = MenuPanelManager.GetInstance();
         if (menuPanelManager.IsActivePanel(MenuPanelType.MainMenu))
         {
             Time.timeScale           = 1;
             startGameButtonText.text = "Start Game";
             menuPanelManager.CloseMenu();
         }
         else
         {
             Time.timeScale           = 0;
             startGameButtonText.text = "Resume Game";
             menuPanelManager.SwitchMenuPanel(MenuPanelType.MainMenu);
         }
     }
 }