moving method

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

Wraps this particle with a MovingParticle.

Allowing it to move from one Vector2 to another one.

Implementation

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