// private void Awake() { // SetupSingleton(); // } void Start() { ui = FindObjectOfType <UIDisplay>(); winLabel.SetActive(false); loseLabelOne.SetActive(false); loseLabelTwo.SetActive(false); ui.ShowScore(score); }
// void SetupSingleton(){ // int gameSessionCount = FindObjectsOfType<GameSession>().Length; // if(gameSessionCount >1){ // Destroy(gameObject); // }else{ // DontDestroyOnLoad(gameObject); // } // } private void AddScore(int amount) { score += amount; ui.ShowScore(score); CheckWinCondition(); }