This script will activate the beep sound when the MRT card in the trigger range.
using UnityEngine;
using System.Collections;
public class TapCard : MonoBehaviour {
public AudioClip beep;
AudioSource audio;
// Use this for initialization
void Start () {
audio = GetComponent<AudioSource>();
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag ("MrtCard"))
{
audio.PlayOneShot(beep, 0.7F);
}
}
}