summaryrefslogtreecommitdiff
path: root/GameCode/ProjectileAudio.cs
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2024-05-19 16:05:01 +0800
committerchai <215380520@qq.com>2024-05-19 16:05:01 +0800
commitc5f145786f4c6d2fe4bea831dfc16e52228920a5 (patch)
treea6ead7ea8266c767d58ed0f816dcd7a1dd75bd65 /GameCode/ProjectileAudio.cs
parent48b64e573a1709dc923cb9162b55be0246b3ff63 (diff)
* move
Diffstat (limited to 'GameCode/ProjectileAudio.cs')
-rw-r--r--GameCode/ProjectileAudio.cs37
1 files changed, 0 insertions, 37 deletions
diff --git a/GameCode/ProjectileAudio.cs b/GameCode/ProjectileAudio.cs
deleted file mode 100644
index 7390613..0000000
--- a/GameCode/ProjectileAudio.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using UnityEngine;
-
-public class ProjectileAudio : MonoBehaviour
-{
- public enum ProjectileType
- {
- Catapult
- }
-
- public AimbotProjectile target;
-
- public AudioSource aSource;
-
- public ProjectileType projectile;
-
- public float pitchrange = 0.2f;
-
- private void Start()
- {
- if (target != null)
- {
- target.onHit.AddListener(PlayImpact);
- }
- if (projectile == ProjectileType.Catapult)
- {
- aSource.clip = ThronefallAudioManager.Instance.audioContent.CatapultImpact.GetRandomClip();
- }
- aSource.pitch = Random.Range(1f - pitchrange, 1f + pitchrange);
- }
-
- private void PlayImpact()
- {
- aSource.Play();
- aSource.transform.parent = null;
- Object.Destroy(aSource.gameObject, aSource.clip.length);
- }
-}