my HEAD hurts and the SFX is TOO LOUD

This commit is contained in:
Sylvia 2026-04-26 21:49:57 -07:00
parent a3321d361c
commit d4ebf0ca61
41 changed files with 1465 additions and 123 deletions

View file

@ -0,0 +1,20 @@
using System;
using UnityEngine;
public class EntityDeathSFX : MonoBehaviour
{
[SerializeField] private AudioSource AS;
public void PlaySFX(AudioClip audioToPlay, float volume)
{
AS.PlayOneShot(audioToPlay, volume);
}
private void Update()
{
if (!AS.isPlaying)
{
Destroy(gameObject);
}
}
}