gimm270-audioenvironment/Assets/Scripts/ImpactTrigger.cs
2022-10-31 00:08:36 -06:00

23 lines
363 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ImpactTrigger : MonoBehaviour
{
AudioSource source;
void Start()
{
source = GetComponent<AudioSource>();
}
private void OnTriggerEnter(Collider collider)
{
source.Play();
//Debug.Log("audio.Play Called");
}
}