// Use this for initialization void Start() { musicManager = GameObject.FindObjectOfType <MusicManager>(); player = GameObject.FindObjectOfType <SpPlayerController>(); //spawnNotePrefab = GameObject.FindGameObjectWithTag("MusicalNote"); elapsedTime = 0; timeToSpawnMusicalNoteTick = timeToSpawnMusicalNote; }
// Use this for initialization void Start() { player = FindObjectOfType <SpPlayerController>(); GetComponent <Rigidbody2D>().velocity = direction * speed; audioSFX = GetComponent <AudioSource>(); }