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

public class SFX_OneShot : MonoBehaviour
{
    public AudioClip clip;
    public bool PlayOnStart = true;
    // Start is called before the first frame update
    void Start()
    {
        if (PlayOnStart)
        {
            Play();            
        }
    }

    public void Play()
    {
        SoundManager.PlayOneShot(clip);
        Destroy(this);
    }
}
