using UnityEngine;



public class PlaySound : MonoBehaviour
{
    public AudioSource audioSource;
    public AudioClip clip;
    void Start()
    {
        audioSource = GetComponent<AudioSource>();
    }

    public void PlayMySound()
    {
        audioSource.Play();
    }

    private void OnCollisionEnter(Collision other)
    {
        if (other.gameObject.CompareTag("Orb"))
        {

            audioSource.PlayOneShot(clip);

        }


    }
}


