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