public void AddParticle(Vector2 position, Particle prototype, ParticleTextureType textureType) { Particle particle = prototype.Clone(); particle.Texture = particleTextures[textureType]; particle.Position = position; particle.Angle = particle.Direction; particles.Add(particle); }
public void GeneratePattern(Vector2 position, ParticlePatternType index, ParticleTextureType texture) { Particle temp; float randomAmount; foreach (Particle particle in patterns[index].Particles) { temp = particle.Clone(); temp.Position += position; temp.Texture = particleTextures[texture]; randomAmount = (float)(1 - 0.1 * random.NextDouble()); temp.Speed *= randomAmount; temp.Scale *= randomAmount; temp.DeltaSpeed *= randomAmount; temp.DeltaAlpha *= randomAmount; temp.DeltaScale *= randomAmount; particles.Add(temp); } }
public Texture2D_Ross GetTexture(ParticleTextureType tex) { return(texture[(int)tex]); }