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