public void PlaySFX(ESoundEffectType type, int trackNumber = 0) { var soundEffect = soundEffectDic[type]; var soundClip = soundEffect.Item1; var soundVolume = soundEffect.Item2; audioTracks[trackNumber].PlayOneShot(soundClip, soundVolume); }
public AudioClip FindClip(ESoundEffectType type) { var pair = SoundEffectPairs.Find(x => x.Type == type); return(pair.AudioClip); }