public AudioClip GetAudioPairs(AudibleNames.Target name) { if (this.audioPairs == null) { this.GenerateAudioPairs(); } if (this.audioPairs.ContainsKey(name)) { return(this.audioPairs [name]); } else { return(null); } }
public void Play(AudibleNames.Target name, bool isLoop = false) { if (targetSFX == null) { if (GetComponentInChildren <TargetSFX>() != null) { this.targetSFX = GetComponentInChildren <TargetSFX>(); if (this.targetSFX.GetAudioSource(name) != null) { this.targetSFX.GetAudioSource(name).loop = isLoop; this.PlaySource(targetSFX.GetAudioSource(name)); } } } else { if (this.targetSFX.GetAudioSource(name) != null) { this.targetSFX.GetAudioSource(name).loop = isLoop; this.PlaySource(targetSFX.GetAudioSource(name)); } } }
public AudioSource GetAudioSource(AudibleNames.Target name) { this.GetAudioSource().clip = this.GetAudioPairs(name); return(this.audioSource); }