// ReSharper disable once UnusedMember.Local
 private void Awake()
 {
     Instance = this;
 }
Exemplo n.º 2
0
 //Unity Methods
 void Awake()
 {
     Instance = this;
     LevelStartText = Instance.LevelStart.GetComponentInChildren<Text>();
     foreach (Text child in Instance.Death.GetComponentsInChildren<Text>())
     {
         if (child.name == "Score") EndScoreText = child;
         else if (child.name == "Verdict") EndVerdictText = child;
     }
     Instance.LevelStart.SetActive(false);
     Instance.Death.SetActive(false);
     Instance.PauseMenu.SetActive(false);
     Instance.MainMenu.SetActive(false);
     Instance.OptionsMenu.SetActive(false);
     ScoreManager.OnScoreChange += OnScoreChange;
     ScoreManager.OnKillComboChange += OnKillComboChange;
     fader = GetComponent<ScreenFader>();
     DontDestroyOnLoad(gameObject);
 }