void Start() { basketMovement = GetComponent <BasketMovement>(); audioSource = GetComponent <AudioSource>(); highScoreLoader = FindObjectOfType <HighScoreLoader>(); highScore = highScoreLoader.GetHighScore(); highScoreText.text = "High Score : " + highScore.ToString(); UpdateScoreText(); }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(this.gameObject); } }