using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Random = UnityEngine.Random;

public class EnemyAudioHandler : MonoBehaviour
{
    [SerializeField] private List<AudioClip> _audio;
    [SerializeField] private AudioSource _audioSource;

    // Start is called before the first frame update
    void Start()
    {
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void PlayAudio()
    {
        var clip = Random.Range(0, _audio.Count);
        _audioSource.clip = _audio[clip];
        _audioSource.Play();
    }

    public AudioClip getAudioClip()
    {
        return _audio[0];
    }

}