update(time, index) {
    if (!this.sleep) {
      this.age += time;
      this.applyBehaviours(time, index);
    }

    if (this.age < this.life) {
      const scale = this.easing(this.age / this.life);
      this.energy = Math.max(1 - scale, 0);
    } else {
      this.destroy();
    }
  }
Updates the particle's state.
@param {number} time The time elapsed since the last update
@param {number} index The index of the particle in its parent system