Ejemplo n.º 1
0
        public void PlaySound3D(SoundEvent sound, Vector3 position)
        {
            if (sound == null)
            {
                return;
            }

            _soundPlayer.PlaySound3D(sound, position);
        }
Ejemplo n.º 2
0
        public void PlaySound2D(SoundEvent sound)
        {
            if (sound == null)
            {
                return;
            }

            _soundPlayer.PlaySound2D(sound);
        }
Ejemplo n.º 3
0
        public void PlaySound3D(SoundEvent sound3D, Vector3 position)
        {
            AudioSource newSource = _sound2DPool.Get();

            // setup
            newSource.clip   = sound3D.Clip;
            newSource.volume = sound3D.Volume;
            newSource.pitch  = sound3D.Pitch;

            ActivatePooledSound3D(newSource, position);
        }
Ejemplo n.º 4
0
        public void PlaySound2D(SoundEvent sound2D)
        {
            AudioSource newSource = _sound2DPool.Get();

            // setup
            newSource.clip   = sound2D.Clip;
            newSource.volume = sound2D.Volume;
            newSource.pitch  = sound2D.Pitch;

            ActivatePooledSound2D(newSource);
        }