Esempio n. 1
0
 // Token: 0x060027E9 RID: 10217 RVA: 0x000CFC00 File Offset: 0x000CE000
 public AudioSource SpawnAudio(AudioClip clip, Vector3 pos, Transform parent)
 {
     for (int i = 0; i < this.audioPool[clip].Length; i++)
     {
         if (!this.audioPool[clip][i].gameObject.activeSelf)
         {
             AudioSource audioSource = this.audioPool[clip][i];
             audioSource.transform.parent   = parent;
             audioSource.transform.position = pos;
             audioSource.gameObject.SetActive(true);
             audioSource.BroadcastMessage("OnSpawned", SendMessageOptions.DontRequireReceiver);
             return(audioSource);
         }
     }
     return(null);
 }