ParticleSystem(Texture texture, { double life: 1.5, double lifeVar: 1.0, Point posVar: Point.origin, double startSize: 2.5, double startSizeVar: 0.5, double endSize: 0.0, double endSizeVar: 0.0, double startRotation: 0.0, double startRotationVar: 0.0, double endRotation: 0.0, double endRotationVar: 0.0, bool rotateToMovement: false, double direction: 0.0, double directionVar: 360.0, double speed: 100.0, double speedVar: 50.0, double radialAcceleration: 0.0, double radialAccelerationVar: 0.0, double tangentialAcceleration: 0.0, double tangentialAccelerationVar: 0.0, int maxParticles: 100, double emissionRate: 50.0, ColorSequence colorSequence, int alphaVar: 0, int redVar: 0, int greenVar: 0, int blueVar: 0, TransferMode transferMode: TransferMode.plus, int numParticlesToEmit: 0, bool autoRemoveOnFinish: true, Offset gravity })

Creates a new particle system with the given properties. The only required parameter is the texture, all other parameters are optional.

Source

ParticleSystem(this.texture,
               {this.life: 1.5,
                this.lifeVar: 1.0,
                this.posVar: Point.origin,
                this.startSize: 2.5,
                this.startSizeVar: 0.5,
                this.endSize: 0.0,
                this.endSizeVar: 0.0,
                this.startRotation: 0.0,
                this.startRotationVar: 0.0,
                this.endRotation: 0.0,
                this.endRotationVar: 0.0,
                this.rotateToMovement : false,
                this.direction: 0.0,
                this.directionVar: 360.0,
                this.speed: 100.0,
                this.speedVar: 50.0,
                this.radialAcceleration: 0.0,
                this.radialAccelerationVar: 0.0,
                this.tangentialAcceleration: 0.0,
                this.tangentialAccelerationVar: 0.0,
                this.maxParticles: 100,
                this.emissionRate: 50.0,
                this.colorSequence,
                this.alphaVar: 0,
                this.redVar: 0,
                this.greenVar: 0,
                this.blueVar: 0,
                this.transferMode: TransferMode.plus,
                this.numParticlesToEmit: 0,
                this.autoRemoveOnFinish: true,
                Offset gravity
}) {
  this.gravity = gravity;
  _particles = new List<_Particle>();
  _emitCounter = 0.0;
  // _elapsedTime = 0.0;
  if (_gravity == null)
    _gravity = new Vector2.zero();
  if (colorSequence == null)
    colorSequence = new ColorSequence.fromStartAndEndColor(new Color(0xffffffff), new Color(0x00ffffff));
}