Skip to content
Snippets Groups Projects
Commit 08981f6f authored by MaskedBook's avatar MaskedBook
Browse files

misc changes

parent a7c0b6bf
Branches
No related tags found
No related merge requests found
......@@ -4,15 +4,26 @@ using UnityEngine;
public class Music : MonoBehaviour
{
// Start is called before the first frame update
[SerializeField] AudioClip music;
[SerializeField] AudioClip musictown;
[SerializeField] AudioSource audio;
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerEnter(Collider other) {
audio.clip = musictown;
audio.Play();
}
private void OnTriggerExit(Collider other) {
audio.clip = music;
audio.Play();
}
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment