void Awake() { soundManager = SoundManager.Instance; mainMenuInfo = MainMenuInfo.Instance; if (fadeController == null) { fadeController = GetComponent <FadeController>(); } if (player == null) { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>(); } globalFadeController.SetAlpha(1f); globalFadeController.StartFadeIn(2f); }
// Start is called before the first frame update void Awake() { mainMenuInfo = MainMenuInfo.Instance; questions.Add(questionTextDepression); questions.Add(questionTextDisease); questions.Add(questionTextDistress); questions.Add(questionTextDebt); questions.Add(questionTextDeath); foreach (TMP_Text q in questions) { q.alpha = 0f; } button0.onClick.AddListener(OnButton0Click); button1.onClick.AddListener(OnButton1Click); button2.onClick.AddListener(OnButton2Click); button3.onClick.AddListener(OnButton3Click); button4.onClick.AddListener(OnButton4Click); }