public void Play(AudibleNames.LCDInterface name, bool isLoop) { if (lcdInterfaceSFX == null) { if (GetComponentInChildren <LCDInterfaceSFX> () != null) { this.lcdInterfaceSFX = GetComponentInChildren <LCDInterfaceSFX> (); this.lcdInterfaceSFX.GetAudioSource(name).loop = isLoop; this.PlayOneShot(lcdInterfaceSFX.GetAudioSource(name)); } } else { this.lcdInterfaceSFX.GetAudioSource(name).loop = isLoop; this.PlayOneShot(lcdInterfaceSFX.GetAudioSource(name)); } }
public AudioSource GetAudioSource(AudibleNames.LCDInterface name) { this.audioSource.clip = this.audioPairs [name]; return(this.audioSource); }