Implemented as much audio as I could given the drafts/snippets of audio I've been given by Andrew

This commit is contained in:
Gregory Campbell
2020-07-07 20:13:52 -04:00
parent 6933331f45
commit e9d7e90e27
21 changed files with 469 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MusicScript : MonoBehaviour
{
private AudioSource audioSource;
private void Awake()
{
DontDestroyOnLoad(transform.gameObject);
audioSource = GetComponent<AudioSource>();
}
public void PlayMusic()
{
if (audioSource.isPlaying) return;
audioSource.Play();
}
public void StopMusic()
{
audioSource.Stop();
}
}