m_Particles.Add(new Particle(new Vector2d(-2f, -2f), new Vector2d(velXbl, velYbl)));//bottom left
m_Particles.Add(new Particle(new Vector2d(2f, 2f), new Vector2d(velXtr, velYtr))); //top right
m_TimeToNewParticle += 2f / m_ParticlesPerSecond; //* and if there are too many, remove the oldest ones */
if (m_Particles.Count > 2000)
{
m_Particles.RemoveAt(0);
}
second part of my particle code:
public Vector2d m_Position = new Vector2d(1.0f, 0.0f);
public Vector2d m_Velocity = new Vector2d(0.0f, 0.0f);
Sry, couldn't really see anything that could cause an error, but maybe I missed something - the code you posted is hard to read since the formatting wasn't preserved. Please repost using the [code][/code] tags (note: these won't format the code, but will preserve existing formatting).
Also, it would help us help you if you provided more detail on the error. Is it a compiler error, an exception, a bug? On what line of code? Is there an error message, and what does it say? If the code runs, what did you expect to happen, and what is actually happening? How did you test it?
Bookmarks