aboutsummaryrefslogtreecommitdiff
path: root/Super Polarity/ParticleEngine.cs
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2013-11-12 06:44:55 -0600
committerBen Beltran <ben@nsovocal.com>2013-11-12 06:44:55 -0600
commit2af83e98005a14c439b360a5b9ac636f594d9f0c (patch)
tree5c219527947cb86a15e68ed379fbf0008929b77d /Super Polarity/ParticleEngine.cs
parentf8aec187ea7dc410a32996406109f290f3199ffa (diff)
Implements polarity system
Diffstat (limited to 'Super Polarity/ParticleEngine.cs')
-rw-r--r--Super Polarity/ParticleEngine.cs7
1 files changed, 3 insertions, 4 deletions
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<Particle> particles;
private List<Texture2D> textures;
@@ -20,6 +21,7 @@ namespace SuperPolarity
this.textures = textures;
this.particles = new List<Particle>();
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);