private void Start() { gameSession = FindObjectOfType <GameSession>(); nextLevelDelay = FindObjectOfType <NextLevelDelay>(); CountBlocks(); }
void Awake() { SetUpSingleton(); //Get handle to music players audio source component musicPlayerAudioSource = GetComponent <AudioSource>(); //Get handle to next level delay object nextLevelDelay = FindObjectOfType <NextLevelDelay>(); }
// Start is called before the first frame update void Start() { isStarted = false; //Calculate distance between ball and paddle paddleToBallVector = transform.position - paddle.transform.position; myAudioSource = GetComponent<AudioSource>(); nextLevelDelay = FindObjectOfType<NextLevelDelay>(); }