/// <summary> /// Triggers a positional sound effect centered at this object's location /// </summary> /// <param name="sfx"></param> public void TriggerSfx(SfxTypes sfx) { AudioSource.PlayOneShot(Audioengine.Instance.SfxMapping[sfx]); }
/// <summary> /// Plays a one shot 2D sound effect. This has no spatial processing at all /// </summary> /// <param name="sfx"></param> public void Trigger2DSfx(SfxTypes sfx) { _audioSource2D.PlayOneShot(SfxMapping[sfx]); }
public AudioClipGroup GetRandClip(SfxTypes type) { return(map[type]); }