resetParticle method

Particle resetParticle(
  1. int i
)

Resets a particle's values.

Implementation

Particle resetParticle(int i) {
  Particle p = particles[i]!;
  p.size = p.opacity = p.vx = p.vy = p.life = p.lifeLeft = 0;
  p.x = center.dx;
  p.y = center.dy;
  return p;
}