public void Update()
        {
            if (Emitting)
            {
                if (_timer >= ParticleFrequency)
                {
                    for (int i = 0; i < Amount; i++)
                    {
                        GenerateParticle();
                    }
                    _timer = 0;
                }
            }

            foreach (var particle in Particles)
            {
                if (particle.LifeTime <= 0)
                {
                    ParticlesToRemove.Enqueue(particle);
                    continue;
                }
                particle.LifeTime--;
                particle.Velocity += LinearAccel;
                particle.Position += particle.Velocity * Time.DeltaTime;
                particle.Rotation += particle.AngularVelocity;
                particle.Scale    -= ScaleDecrease * Time.DeltaTime;
                if (particle.Scale <= 0f)
                {
                    ParticlesToRemove.Enqueue(particle);
                }
            }

            foreach (var particleToRemove in ParticlesToRemove)
            {
                Particles.Remove(particleToRemove);
            }

            ParticlesToRemove.Clear();

            if (Emitting)
            {
                _timer++;
            }
            else
            {
                _timer = 0;
            }
        }
        private void CheckCollisions(Particle particle)
        {
            if (ParticlesToRemove.Contains(particle))
            {
                return;
            }
            var particles    = GetNearbyParticles(particle, CollisionRadius);
            var particleList = new List <Particle>();

            foreach (var part in particles)
            {
                if (!ParticlesToRemove.Contains(part))
                {
                    particleList.Add(part);
                }
            }

            if (particleList.Count > 1)
            {
                React(particle, particleList);
            }
        }