TraceRacer.ParticleEngine.GenerateNewParticle C# (CSharp) Method

GenerateNewParticle() private method

private GenerateNewParticle ( ) : Particle
return Particle
        private Particle GenerateNewParticle()
        {
            Texture2D texture = textures[random.Next(textures.Count)];
            Vector2 position = EmitterLocation;
            //Vector2 velocity = new Vector2(
            //                        -Math.Abs(5f * (float)(random.NextDouble() * 2 - 1)),
            //                        1f * (float)(random.NextDouble() * 2 - 1));
            Vector2 velocity = new Vector2(
                                    -Math.Abs(5f * (float)(random.NextDouble() * 2 - 1)),
                                     1f * (float)(random.NextDouble() * 2 - 1));
            float angle = 0;
            float angularVelocity = 0.1f * (float)(random.NextDouble() * 2 - 1);
            Color color = new Color(
                        (float)random.NextDouble(),
                        (float)random.NextDouble(),
                        (float)random.NextDouble());
            float size = (float)random.NextDouble();
            // int ttl = 20 + random.Next(40);
            int ttl = 7;
            return new Particle(texture, position, velocity, angle, angularVelocity, color, size, ttl);
        }