1
0
This repository has been archived on 2024-09-03. You can view files and clone it, but cannot push or open issues or pull requests.
System-Purge/Assets/Sounds/soundTest.cs
2016-01-30 22:45:03 -05:00

20 lines
414 B
C#

using UnityEngine;
using System.Collections;
public class soundTest : MonoBehaviour {
public AudioClip mClip;
int playing = 0;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if ((GameObject.Find ("Player").transform.position - transform.position).magnitude < 1.0) {
AudioSource.PlayClipAtPoint (mClip, transform.position, 1.0f);
}
}
}