From 2af83e98005a14c439b360a5b9ac636f594d9f0c Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Tue, 12 Nov 2013 06:44:55 -0600 Subject: Implements polarity system --- Super Polarity/ParticleEngine.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Super Polarity/ParticleEngine.cs') diff --git a/Super Polarity/ParticleEngine.cs b/Super Polarity/ParticleEngine.cs index 5cf6bdb..0fced25 100644 --- a/Super Polarity/ParticleEngine.cs +++ b/Super Polarity/ParticleEngine.cs @@ -11,6 +11,7 @@ namespace SuperPolarity { private Random random; public Vector2 EmitterLocation { get; set; } + public Color Color; private List particles; private List textures; @@ -20,6 +21,7 @@ namespace SuperPolarity this.textures = textures; this.particles = new List(); random = new Random(); + Color = Color.Red; } private Particle GenerateNewParticle() @@ -31,10 +33,7 @@ namespace SuperPolarity 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()); + Color color = Color; float size = (float)random.NextDouble(); int ttl = 20 + random.Next(40); -- cgit