Exemple #1
0
    public void ShowMainMenu()
    {
        LoadMenuLevel();
        GamePanel.SetActive(false);
        PauseMenu.SetActive(false);
        HelpPanel.SetActive(false);
        LevelPickerPanel.SetActive(false);
        LevelPickerContainerContainer.SetActive(false);
        //LevelPickerContainerFunContainer.SetActive(false);
        //LevelPickerContainerCommunityContainer.SetActive(false);
        LevelFailed.SetActive(false);
        LevelComplete.SetActive(false);

        MainMenu.SetActive(true);
        SetCameraPosition(true);

        SetCameraTouchX(false);

        if (MainMenu.activeSelf)
        {
            //if (!EventSystem.current.alreadySelecting)
            EventSystem.current.SetSelectedGameObject(PlayButton);
        }

        _canStartMoving = true;
    }
Exemple #2
0
 public void Kill(string message = "Beware of beasts and blackholes!")
 {
     _lives          = 0;
     _canStartMoving = false;
     LevelFailed.transform.Find("Reason").GetComponent <TMPro.TMP_Text>().text = message;
     LevelFailed.SetActive(true);
     EventSystem.current.SetSelectedGameObject(LevelFailedButton);
     Time.timeScale = 0;
 }
Exemple #3
0
 public void HideMainMenu()
 {
     GamePanel.SetActive(false);
     PauseMenu.SetActive(false);
     MainMenu.SetActive(false);
     HelpPanel.SetActive(false);
     LevelPickerPanel.SetActive(false);
     LevelFailed.SetActive(false);
     LevelComplete.SetActive(false);
     SetCameraPosition(false);
 }