public Sound GetFxSound(AudioFxTypes type) { if (_fxClipsTable == null) { InitializeFxClipsTable(); } return(_fxClipsTable[type]); }
public void PlayFxSound(AudioFxTypes fxType) { var sound = audioData.GetFxSound(fxType); fxAudioSource.clip = sound.clip; fxAudioSource.loop = sound.loop; fxAudioSource.volume = sound.volume; fxAudioSource.pitch = sound.pitch; fxAudioSource.Play(); }