void OnTriggerEnter(Collider other) { if (other.tag == "Player") { script = other.gameObject.GetComponent <UpdatedCharacterControllerScript>(); mainCamera.GetComponent <cameraAudioManager>().switchBackgroundMusic(OnEnterWater); } }
void Start() { anim = gameObject.GetComponentInChildren <Animator>(); script = gameObject.GetComponent <UpdatedCharacterControllerScript>(); }
// Start is called before the first frame update void Start() { characterScript = player.GetComponent <UpdatedCharacterControllerScript>(); }