destroyParticle method

void destroyParticle(
  1. Particle particle, {
  2. required bool callDestructionListener,
})

Implementation

void destroyParticle(
  Particle particle, {
  required bool callDestructionListener,
}) {
  var flags = ParticleType.zombieParticle;
  if (callDestructionListener) {
    flags |= ParticleType.destroyListener;
  }
  particle.flags |= flags;
}