示例#1
0
        public void EmitAudioSource()
        {
            if (isActiveAndEnabled)
            {
                var audioSphere = AudioSourceManager2D.CreateAudioSourcePooled(transform.position, gameObject);
                audioSphere.maxGrowthSize = config.emitRange;

                audioSphere.Emit();
            }
        }
        public override void Emit()
        {
            if (AudioSourceManager2D.instance.activeAudioSources.Contains(this))
            {
                Debug.LogWarning("Audio source has already been emitted! You can create a new audio source by using the AudioSourceManager.Get / Create methods", gameObject);
                return;
            }

            AudioSourceManager2D.AddAudioSource(this);
        }