예제 #1
0
    private void GenerateMinigameButtons()
    {
        bool first = true;

        foreach (Minigame m in PersistentDataManager.minigameMasterList.minigames)
        {
            GameObject      go = Instantiate(_buttonPrefab, transform);
            Button          b  = go.GetComponent <Button>();
            TextMeshProUGUI t  = go.GetComponentInChildren <TextMeshProUGUI>();

            if (first || m.GamePlayed)
            {
                t.text = m.Name;
            }
            else
            {
                t.text = "???";
            }

            b.onClick.AddListener(() => ExitingMainMenu.StartNewRun(m));

            if (!m.GameWon && !first)
            {
                b.interactable = false;
            }

            first = false;
        }
    }
 public void OpenCustomPlay()
 {
     ExitingMainMenu.GotoCustomPlay();
 }
 public void OpenQuickPlay()
 {
     ExitingMainMenu.StartNewQuickplayRun();
 }