anchor.diff:  /// Particles are created and added to the system at [emissionRate], but the
   /// number of particles can never exceed the [maxParticles] limit.
   class ParticleSystem extends Node {
  -
  -  /// The texture used to draw each individual sprite.
  -  Texture texture;
  -
  -  /// The time in seconds each particle will be alive.
  -  double life;
  -
  -  /// Variance of the [life] property.
  -  double lifeVar;
  -
  -  /// The variance of a particles initial position.
  -  Point posVar;
  -
  -  /// The start scale of each individual particle.
  -  double startSize;
  -
  -  /// Variance of the [startSize] property.
  -  double startSizeVar;
  -
  -  /// The end scale of each individual particle.
  -  double endSize;
  -
  -  /// Variance of the [endSize] property.
  -  double endSizeVar;
  -
  -  /// The start rotation of each individual particle.
  -  double startRotation;
  -
  -  /// Variance of the [startRotation] property.
  -  double startRotationVar;
  -
  -  /// The end rotation of each individual particle.
  -  double endRotation;
  -
  -  /// Variance of the [endRotation] property.
  -  double endRotationVar;
  -
  -  /// If true, each particle will be rotated to the direction of the movement
  -  /// of the particle. The calculated rotation will be added to the current
  -  /// rotation as calculated by the [startRotation] and [endRotation]
  -  /// properties.
  -  bool rotateToMovement;
  -
  -  /// The direction in which each particle will be emitted in degrees.
  -  double direction;
  -
  -  /// Variance of the [direction] property.
  -  double directionVar;
  -
  -  /// The speed at which each particle will be emitted.
  -  double speed;
  -
  -  /// Variance of the [direction] property.
  -  double speedVar;
  -
  -  /// The radial acceleration of each induvidual particle.
  -  double radialAcceleration;
  -
  -  /// Variance of the [radialAcceleration] property.
  -  double radialAccelerationVar;
  -
  -  /// The tangential acceleration of each individual particle.
  -  double tangentialAcceleration;
  -
  -  /// Variance of the [tangentialAcceleration] property.
  -  double tangentialAccelerationVar;
  -
  -  /// The gravity vector of the particle system.
  -  Vector2 gravity;
  -
  -  /// The maximum number of particles the system can display at a single time.
  -  int maxParticles;
  -
  -  /// Total number of particles to emit, if the value is set to 0 the system
  -  /// will continue to emit particles for an indifinte period of time.
  -  int numParticlesToEmit;
  -
  -  /// The rate at which particles are emitted, defined in particles per second.
  -  double emissionRate;
  -
  -  /// If set to true, the particle system will be automatically removed as soon
  -  /// as there are no more particles left to draw.
  -  bool autoRemoveOnFinish;
  -
  -  /// The [ColorSequence] used to animate the color of each individual particle
  -  /// over the duration of its [life]. When applied to a particle the sequence's
  -  /// color stops modified in accordance with the [alphaVar], [redVar],
  -  /// [greenVar], and [blueVar] properties.
  -  ColorSequence colorSequence;
  -
  -  /// Alpha varience of the [colorSequence] property.
  -  int alphaVar;
  -
  -  /// Red varience of the [colorSequence] property.
  -  int redVar;
  -
  -  /// Green varience of the [colorSequence] property.
  -  int greenVar;
  -
  -  /// Blue varience of the [colorSequence] property.
  -  int blueVar;
  -
  -  /// The transfer mode used to draw the particle system. Default is
  -  /// [TransferMode.plus].
  -  TransferMode transferMode;
  -
  -  List<_Particle> _particles;
  -
  -  double _emitCounter;
  -  int _numEmittedParticles = 0;
  -
  -  double opacity = 1.0;
  -
  -  static Paint _paint = new Paint()
  -    ..filterQuality = FilterQuality.low
  -    ..isAntiAlias = false;
   
     ParticleSystem(this.texture,
                    {this.life: 1.5,
  
positive.code:                   this.radialAccelerationVar: 0.0,
                    this.tangentialAcceleration: 0.0,
                    this.tangentialAccelerationVar: 0.0,
                    this.gravity,
                    this.maxParticles: 100,
                    this.emissionRate: 50.0,
                    this.colorSequence,
  
negative.code:                   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));
    }
  
    /// The texture used to draw each individual sprite.
    Texture texture;
  
    /// The time in seconds each particle will be alive.
    double life;
  
    /// Variance of the [life] property.
    double lifeVar;
  
    /// The variance of a particles initial position.
    Point posVar;
  
    /// The start scale of each individual particle.
    double startSize;
  
    /// Variance of the [startSize] property.
    double startSizeVar;
  
    /// The end scale of each individual particle.
    double endSize;
  
    /// Variance of the [endSize] property.
    double endSizeVar;
  
    /// The start rotation of each individual particle.
    double startRotation;
  
    /// Variance of the [startRotation] property.
    double startRotationVar;
  
    /// The end rotation of each individual particle.
    double endRotation;
  
    /// Variance of the [endRotation] property.
    double endRotationVar;
  
    /// If true, each particle will be rotated to the direction of the movement
    /// of the particle. The calculated rotation will be added to the current
    /// rotation as calculated by the [startRotation] and [endRotation]
    /// properties.
    bool rotateToMovement;
  
    /// The direction in which each particle will be emitted in degrees.
    double direction;
  
    /// Variance of the [direction] property.
    double directionVar;
  
    /// The speed at which each particle will be emitted.
    double speed;
  
    /// Variance of the [direction] property.
    double speedVar;
  
    /// The radial acceleration of each induvidual particle.
    double radialAcceleration;
  
    /// Variance of the [radialAcceleration] property.
    double radialAccelerationVar;
  
    /// The tangential acceleration of each individual particle.
    double tangentialAcceleration;
  
    /// Variance of the [tangentialAcceleration] property.
    double tangentialAccelerationVar;
  
    /// The gravity vector of the particle system.
    Offset get gravity {
      if (_gravity == null)
        return null;
  
      return new Offset(_gravity.x, _gravity.y);
    }
  
    Vector2 _gravity;
  
    void set gravity(Offset gravity) {
      if (gravity == null)
        _gravity = null;
      else
        _gravity = new Vector2(gravity.dx, gravity.dy);
    }
  
    /// The maximum number of particles the system can display at a single time.
    int maxParticles;
  
    /// Total number of particles to emit, if the value is set to 0 the system
    /// will continue to emit particles for an indifinte period of time.
    int numParticlesToEmit;
  
    /// The rate at which particles are emitted, defined in particles per second.
    double emissionRate;
  
    /// If set to true, the particle system will be automatically removed as soon
    /// as there are no more particles left to draw.
    bool autoRemoveOnFinish;
  
    /// The [ColorSequence] used to animate the color of each individual particle
    /// over the duration of its [life]. When applied to a particle the sequence's
    /// color stops modified in accordance with the [alphaVar], [redVar],
    /// [greenVar], and [blueVar] properties.
    ColorSequence colorSequence;
  
    /// Alpha varience of the [colorSequence] property.
    int alphaVar;
  
    /// Red varience of the [colorSequence] property.
    int redVar;
  
    /// Green varience of the [colorSequence] property.
    int greenVar;
  
    /// Blue varience of the [colorSequence] property.
    int blueVar;
  
    /// The transfer mode used to draw the particle system. Default is
    /// [TransferMode.plus].
    TransferMode transferMode;
  
    List<_Particle> _particles;
  
    double _emitCounter;
    int _numEmittedParticles = 0;
  
    double opacity = 1.0;
  
    static Paint _paint = new Paint()
      ..filterQuality = FilterQuality.low
      ..isAntiAlias = false;
  
    @override
    void update(double dt) {
  