예제 #1
0
    public void Awake()
    {
        PopulateHighscore populateHighscore = menu.GetComponentInChildren <PopulateHighscore>();

        populateHighscore.NewGrid();
        populateHighscore.PopulateTotal();
    }
예제 #2
0
 public void BuildLevelEndMenu()
 {
     if (TournamentTracker.IsTournamentRunning())
     {
         endOfGameMenu_T.SetActive(true);
         populateHighscore = endOfGameMenu_T.GetComponentInChildren <PopulateHighscore>();
         scoreTextObject_T.GetComponent <TMP_Text>().text = highscoreHandler.GetHighscoreText();
     }
     else
     {
         endOfGameMenu.SetActive(true);
         populateHighscore = endOfGameMenu.GetComponentInChildren <PopulateHighscore>();
         scoreTextObject.GetComponent <TMP_Text>().text = highscoreHandler.GetHighscoreText();
     }
     populateHighscore.NewGrid();
     populateHighscore.NewLevelScore(SceneHandler.GetSceneName());
 }
예제 #3
0
    public void SetMenuActive(GameObject menu)
    {
        if (menu.activeInHierarchy == false)
        {
            menu.SetActive(true);
        }
        if (menu == optionsMenu)
        {
            List <string> options = optManager.BuildResolutionsList();
            resolutionDrop.ClearOptions();
            resolutionDrop.AddOptions(options);
            resolutionDrop.value = optManager.currentResIndex;
            resolutionDrop.RefreshShownValue();

            soundSlider.value = PlayerPrefsManager.GetSfxVolume();
            musicSlider.value = PlayerPrefsManager.GetMusicVolume();
        }
        else if (menu == highscoreMenu)
        {
            PopulateHighscore populateHighscore = menu.GetComponentInChildren <PopulateHighscore>();
            populateHighscore.NewGrid();
            populateHighscore.PopulateTotal();
        }
    }