Exemplo n.º 1
0
        public void ApplyModifier(Modifier mod)
        {
            _modifiers.Add(mod);

            foreach (Emitter emitter in _emitters)
            {
                emitter.ApplyModifier(mod);
            }
        }
        public bool RemoveModifier(Modifier mod)
        {
            foreach (EmitterGroup group in _groups.Values)
            {
                group.RemoveModifier(mod);
            }

            return _modifiers.Remove(mod);
        }
        public void ApplyModifier(Modifier mod)
        {
            _modifiers.Add(mod);

            foreach(EmitterGroup group in _groups.Values)
            {
                group.ApplyModifier(mod);
            }
        }
Exemplo n.º 4
0
 public bool RemoveModifier(Modifier mod)
 {
     return _modifiers.Remove(mod);
 }
Exemplo n.º 5
0
 public void ApplyModifier(Modifier mod)
 {
     _modifiers.Add(mod);
 }
        /// <summary>
        /// Removes a Modifier from each Emitter within the ParticleSystem.
        /// </summary>
        /// <param name="mod">MercuryParticleEngine.Modifiers.Modifier object to remove.</param>
        /// <returns>True if the Modifier was successfully removed, else false.</returns>
        public bool RemoveModifier(Modifier mod)
        {
            if (!_modifiers.Contains(mod)) { return false; }

            _modifiers.Remove(mod);

            _emitters.ForEach(delegate(Emitter emitter)
            {
                emitter.RemoveModifier(mod);
            });

            return true;
        }
        /// <summary>
        /// Applies a Modifier to each Emitter within the ParticleSystem.
        /// </summary>
        /// <param name="mod">MercuryParticleEngine.Modifiers.Modifier object to add.</param>
        /// <returns>True if the Modifier was successfully added, else false.</returns>
        /// <remarks>The system is smart enough to prevent the same Modifier being applied
        /// multiple times.</remarks>
        public bool ApplyModifier(Modifier mod)
        {
            if (_modifiers.Contains(mod)) { return false; }

            _modifiers.Add(mod);

            _emitters.ForEach(delegate(Emitter emitter)
            {
                emitter.ApplyModifier(mod);
            });

            return true;
        }
Exemplo n.º 8
0
        public bool RemoveModifier(Modifier mod)
        {
            foreach (Emitter emitter in _emitters)
            {
                emitter.RemoveModifier(mod);
            }

            return _modifiers.Remove(mod);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Applies a Modifier to the Emitter.
        /// </summary>
        /// <param name="mod">Modifier to apply.</param>
        /// <returns>True if the Modifier was successfully applied, else false.</returns>
        /// <remarks>The engine is smart enough to prevent the same Modifier being applied
        /// multiple times.</remarks>
        public bool ApplyModifier(Modifier mod)
        {
            if (_modifiers.Contains(mod)) { return false; }

            _modifiers.Add(mod);
            return true;
        }