fixed sounds

This commit is contained in:
2022-05-16 22:17:27 +07:00
parent ef26022a99
commit f6431a3fc4
5 changed files with 273 additions and 268 deletions

View File

@ -14,13 +14,7 @@ public class Shooting : MonoBehaviour
private float _fireCountdown = 1f;
public GameObject gun;
public AudioSource audio;
private void Start()
{
//audio = GetComponent<AudioSource>();
//audio.Play();
}
public AudioSource audioSource;
private void Update()
{
@ -33,7 +27,7 @@ public class Shooting : MonoBehaviour
{
_fireCountdown = 0;
_fireCountdown += hSliderValue;
audio.Play();
audioSource.Play();
Shoot();
}
_fireCountdown -= Time.deltaTime;