33 lines
590 B
C#
33 lines
590 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class SFXManager : MonoBehaviour
|
|
{
|
|
public static SFXManager instance;
|
|
|
|
void Awake(){
|
|
instance = this;
|
|
}
|
|
|
|
public AudioSource audioSource;
|
|
|
|
public AudioClip crunchSfx;
|
|
public AudioClip deathSfx;
|
|
public AudioClip turnSfx;
|
|
|
|
|
|
public void PlayCrunch(){
|
|
audioSource.PlayOneShot(crunchSfx);
|
|
}
|
|
|
|
public void PlayDeath(){
|
|
audioSource.PlayOneShot(deathSfx);
|
|
}
|
|
|
|
public void PlayTurn(){
|
|
audioSource.PlayOneShot(turnSfx);
|
|
}
|
|
|
|
}
|