void Awake() { if (deadMenu == null) { deadMenu = GetComponentInParent <UIDeadMenu>(); } highScoresManager = GameController.Instance.GetComponent <HighScoresManager>(); if (!highScoresManager.CanBeAdded(GetCurrentScore())) { ProceedToMainMenu(); } }
void Initialize() { gameFinishedMenu = Resources.FindObjectsOfTypeAll <UIDeadMenu>() .Where(menu => menu.gameObject.scene.isLoaded) .First(); }
void Start() { deadMenu = Resources.FindObjectsOfTypeAll <UIDeadMenu>() .Where(menu => menu.gameObject.scene.isLoaded) .First(); }