예제 #1
0
    public AudioClip Get(ESfxId id)
    {
        Debug.Assert(sfxSrcList.Count > 0, "No SFX Source Data!");

        if (sfxDic.Count == 0)
        {
            GenerateSfxDictionary();
        }

        return(sfxDic[id]);
    }
예제 #2
0
    public void SetGhostSoundClip(ESfxId id)
    {
        Debug.Log("Called");

        if (id == currentGhostSound)
        {
            return;
        }

        currentGhostSound = id;
        ghostSource.clip  = audioStorage.Get(id);
        ghostSource.Play();
    }
예제 #3
0
 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);
     }
 }