moving method

Particle moving({
  1. Vector2? from,
  2. required Vector2 to,
  3. Curve curve = Curves.linear,
})

Wraps this particle with a MovingParticle.

Allowing it to move from one Vector2 to another one.

Implementation

Particle moving({
  Vector2? from,
  required Vector2 to,
  Curve curve = Curves.linear,
}) {
  return MovingParticle(
    from: from ?? Vector2.zero(),
    to: to,
    curve: curve,
    child: this,
    lifespan: _lifespan,
  );
}