Beispiel #1
0
 public void PlayFXSound(FXSounds fXSound)
 {
     if (fxDictionary.TryGetValue(fXSound, out AudioClip audioClip))
     {
         EazySoundManager.GetUISoundAudio(EazySoundManager.PrepareUISound(audioClip)).Play();
     }
 }
Beispiel #2
0
    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);
    }