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

public class SoundManager : MonoBehaviour {


    public AudioSource[] EffectsAudioSource;
    
    public void PlaySound(SoundEffect effect)
    {
        if(!EffectsAudioSource[(int)effect].isPlaying)
            EffectsAudioSource[(int)effect].Play();
    }

    public void StopSound(SoundEffect effect)
    {
        EffectsAudioSource[(int)effect].Stop();
    }



}
public enum SoundEffect
{
    Rumble,
    Snore,
    OpenGate,
    Charge,
}