Beispiel #1
0
        /// <summary>
        /// Adds the sound emitter.
        /// </summary>
        /// <param name="em">The em.</param>
        /// <param name="play">if set to <c>true</c> [play].</param>
        public virtual void AddSoundEmitter(ISoundEmitter3D em, bool play = false)
        {
            if (em == null)
            {
                ActiveLogger.LogMessage("Emitter is Null " + em.ToString(), LogLevel.RecoverableError);
                return;
            }

            SoundEmiters3D.Add(em);
            em.Apply3D();
            if (play)
            {
                em.Play();
            }
        }