You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Source/Scripts/AudioManager.cs

17 lines
369 B
C#

3 months ago
using UnityEngine;
using static D2D.Utilities.CommonGameplayFacade;
public class AudioManager : MonoBehaviour
{
[SerializeField] private AudioSource audioSource;
private void Awake()
{
_audioManager = this;
}
public void PlayOneShot(AudioClip audioClip, float volume = 1f)
{
audioSource.PlayOneShot(audioClip, volume);
}
}