public AudioClip Get(ESfxId id) { Debug.Assert(sfxSrcList.Count > 0, "No SFX Source Data!"); if (sfxDic.Count == 0) { GenerateSfxDictionary(); } return(sfxDic[id]); }
public void SetGhostSoundClip(ESfxId id) { Debug.Log("Called"); if (id == currentGhostSound) { return; } currentGhostSound = id; ghostSource.clip = audioStorage.Get(id); ghostSource.Play(); }
public void PlaySound(ESfxId id) { if (id == ESfxId.Click && Time.timeScale == 0.0f) { Time.timeScale = 1.0f; AudioSource.PlayClipAtPoint(audioStorage.Get(id), Vector3.zero); Time.timeScale = 0.0f; } else { AudioSource.PlayClipAtPoint(audioStorage.Get(id), Vector3.zero); } }