void Awake() { if (instance) Destroy(this); else { instance = this; AudioSource = GetComponent<AudioSource>(); } }
public void PlayOneShot(SoundEffect sound, float volumeScale = 1) { SoundEffectSource.PlayOneShot(SoundEffects[sound], volumeScale * 1); }