public void PlayFXSound(FXSounds fXSound) { if (fxDictionary.TryGetValue(fXSound, out AudioClip audioClip)) { EazySoundManager.GetUISoundAudio(EazySoundManager.PrepareUISound(audioClip)).Play(); } }
public int PlayUISound(AudioClip clip, float volume, float pitch = 1) { if (!Application.isPlaying) { return(-1); } var id = EazySoundManager.PlayUISound(clip, volume); var eazyAudio = EazySoundManager.GetUISoundAudio(id); eazyAudio.Pitch = pitch; return(id); }