Ejemplo n.º 1
0
        /// <summary>
        /// The update method is used by the emitter to apply the action
        /// to every particle. It is called within the emitter's update
        /// loop and need not be called by the user.
        /// </summary>
        /// <param name="emitter">The Emitter that created the particle.</param>
        /// <param name="particle">The particle to be updated.</param>
        /// <param name="elapsedTime">The duration of the frame - used for time based updates.</param>
        public override void Update(Emitter emitter, Particle particle, double elapsedTime)
        {
            bool inside = m_zone.CollideParticle(particle);

            if (m_invertZone)
            {
                inside = !inside;
            }

            if (inside)
            {
                particle.IsDead = true;
            }
        }