/// <summary> /// Changes the event audio to the relevant clip and plays it. /// </summary> /// <param name="clipName">The eventclipname that has the audio to be played.</param> public void PlayEvent(EventClipName clipName) { ChangeEvent(clipName); StartCoroutine(PlayEventMusic()); }
private void ChangeEvent(EventClipName clipName) { AudioClip eventClip = _audioClipManager.GetEventClip(clipName); _eventAudioSource.clip = eventClip; }
/// <summary> /// Retrieves the audio clip associated with a event clip name enum. /// </summary> /// <param name="clipName">The event clip enumeration name</param> /// <returns>The audio clip associated</returns> public AudioClip GetEventClip(EventClipName clipName) { return(_eventClips[clipName]); }