Example #1
0
    public static void PlayEffect(EffectType type)
    {
        AudioClip clip = m_Instance.GetAudioClipForType(type);

        if (clip == null)
        {
            return;
        }

        AudioClipPlayer player = Instantiate(m_Instance.AudioClipPlayerPrefab, m_Instance.transform).GetComponent <AudioClipPlayer>();

        player.Play(clip);
    }