void Awake() { anim = GetComponent <Animator>(); das = GetComponent <DoorAudioSource>(); }
void Awake() { GameObject doorAudioSourceGO = Instantiate(doorAudioSource.gameObject, this.transform.position, transform.rotation) as GameObject; DoorAudioSource aDoorAudioScript = doorAudioSourceGO.GetComponent<DoorAudioSource>(); myAudioSource = aDoorAudioScript; }