void Start() { GameManager = GameObject.FindGameObjectWithTag("GM"); SDS = GameManager.GetComponent <SaveDataScript> (); SS = GameManager.GetComponent <ScoreScript> (); HighScore = SDS.GetHighScore(); Score = SS.GetScore(); ScoreText.text = "Score\n" + Score.ToString(); CheckForHighScore(); }
void Start() { GameManager = GameObject.FindGameObjectWithTag("GM"); SDS = GameManager.GetComponent <SaveDataScript> (); SS = GameManager.GetComponent <ScoreScript> (); HighScore = SDS.GetHighScore(); HSText.text = "Best\n" + HighScore.ToString(); if (AudioListener.volume == 0) { SoundButton.image.overrideSprite = SoundOffButtonImage; SoundImage.overrideSprite = SoundOffImage; } else { SoundButton.image.overrideSprite = SoundOnButtonImage; SoundImage.overrideSprite = SoundOnImage; } }