summaryrefslogtreecommitdiff
path: root/Assembly_CSharp/AudioPoolSource.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assembly_CSharp/AudioPoolSource.cs')
-rw-r--r--Assembly_CSharp/AudioPoolSource.cs40
1 files changed, 0 insertions, 40 deletions
diff --git a/Assembly_CSharp/AudioPoolSource.cs b/Assembly_CSharp/AudioPoolSource.cs
deleted file mode 100644
index 883151d..0000000
--- a/Assembly_CSharp/AudioPoolSource.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using UnityEngine;
-
-public class AudioPoolSource : MonoBehaviour
-{
- [SerializeField]
- private AudioSource audioS;
-
- private float timer = -1f;
-
- private bool active;
-
- public void PlayClip(AudioClip clip, float volume, float pitchVariance)
- {
- audioS.Stop();
- audioS.clip = clip;
- audioS.pitch = 1f + Random.Range(0f - pitchVariance, pitchVariance);
- audioS.volume = volume;
- timer = clip.length + 0.1f;
- active = true;
- audioS.Play();
- }
-
- private void Update()
- {
- if (!active)
- {
- return;
- }
- timer -= Time.deltaTime;
- if (timer <= 0f)
- {
- active = false;
- if (base.transform.parent != null)
- {
- base.transform.parent = null;
- }
- SFXManager.instance.sources.Add(this);
- }
- }
-}