using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[System.Serializable]
public class SoundEffect
{
    public string name;
    public AudioClip clip;
}

public class SoundManager : MonoBehaviour
{
    [SerializeField] private List<SoundEffect> m_SoundEffects;
    private static SoundManager m_Instance = null;
    private AudioSource m_AudioSource = null;
    // Start is called before the first frame update
    void Awake()
    {
        m_Instance = this;
        m_AudioSource = GetComponent<AudioSource>();
    }

    public static void PlayOneShot(AudioClip clip)
    {
        m_Instance.m_AudioSource.PlayOneShot(clip);
    }
}
