// Init void Start() { playerContainer = GameObject.Find("Player Container"); scoreGame = GameObject.Find("Player Container").transform.GetChild(0).GetComponent <ScoreGame>(); audioSource = playerContainer.transform.GetChild(0).gameObject.GetComponent <MultipleAudio>(); spriteRender = GetComponent <SpriteRenderer>(); spriteRender.enabled = false; }
void Start() { // Game Object Setup canvas = GameObject.Find("Canvas"); player = GameObject.Find("Player Container").transform.GetChild(0).gameObject; multipleAudio = player.GetComponent <MultipleAudio>(); pauseButton = canvas.GetComponent <PauseButtonHandler>(); audioSource = player.GetComponent <AudioSource>(); scoreTally = GameObject.Find("Canvas/Score Panel/Score Text").GetComponent <ScoreTally>(); // Grab score text lowScoreText.text = getText(score); highScoreText.text = getText(score); }