changed fire effects and added fire sound

This commit is contained in:
2022-05-16 20:34:49 +07:00
parent 06fdfc077c
commit ef26022a99
74 changed files with 43230 additions and 98 deletions

View File

@ -2,7 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(AudioSource))]
public class Shooting : MonoBehaviour
{
public GameObject raycast;
@ -14,6 +14,14 @@ public class Shooting : MonoBehaviour
private float _fireCountdown = 1f;
public GameObject gun;
public AudioSource audio;
private void Start()
{
//audio = GetComponent<AudioSource>();
//audio.Play();
}
private void Update()
{
HandleMouseButton();
@ -25,6 +33,7 @@ public class Shooting : MonoBehaviour
{
_fireCountdown = 0;
_fireCountdown += hSliderValue;
audio.Play();
Shoot();
}
_fireCountdown -= Time.deltaTime;