Music Update
This commit is contained in:
@@ -10,6 +10,9 @@ public class BarricadeManager : MonoBehaviour
|
||||
public OffMeshLink offMeshLink;
|
||||
public Transform walkPoint;
|
||||
|
||||
public AudioSource audioSource = new AudioSource();
|
||||
public AudioClip buildSound;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@@ -37,6 +40,7 @@ public class BarricadeManager : MonoBehaviour
|
||||
public void addPlank()
|
||||
{
|
||||
if (health < (barricadePlanks.Count * 50)) {
|
||||
audioSource.PlayOneShot(buildSound);
|
||||
health += 50;
|
||||
offMeshLink.enabled = false;
|
||||
}
|
||||
|
@@ -14,6 +14,9 @@ public class BlockManager : MonoBehaviour
|
||||
private bool action = false;
|
||||
public List<GameObject> amountModels = new List<GameObject>();
|
||||
|
||||
public AudioSource audioSource = new AudioSource();
|
||||
public AudioClip doorSound;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@@ -97,6 +100,7 @@ public class BlockManager : MonoBehaviour
|
||||
{
|
||||
if (!animation.isPlaying)
|
||||
{
|
||||
audioSource.PlayOneShot(doorSound);
|
||||
if (!action)
|
||||
{
|
||||
animation["Door"].speed = 1;
|
||||
|
Reference in New Issue
Block a user