From 6ce8b9e22fc13be34b442c7b6af48b42cd44275a Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Wed, 13 Mar 2024 11:00:58 +0800 Subject: +init --- GunSFX.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 GunSFX.cs (limited to 'GunSFX.cs') diff --git a/GunSFX.cs b/GunSFX.cs new file mode 100644 index 0000000..a00422c --- /dev/null +++ b/GunSFX.cs @@ -0,0 +1,23 @@ +using UnityEngine; + +public class GunSFX : MonoBehaviour +{ + public AudioClip[] shootClips; + + private AudioSource au; + + private void Start() + { + au = GetComponent(); + au.mute = true; + } + + private void Update() + { + } + + public void PlayShootSound() + { + //au.PlayOneShot(shootClips[Random.Range(0, shootClips.Length)]); + } +} -- cgit v1.1-26-g67d0