moveParallax method

void moveParallax(
  1. Vector2 velocity,
  2. double dt
)

Implementation

void moveParallax(Vector2 velocity, double dt) {
  for (var layer in layers) {
    layer.update(
      _delta
        ..setFrom(
            Vector2(baseVelocity.x * velocity.x, baseVelocity.y * velocity.y))
        ..multiply(layer.velocityMultiplier)
        ..scale(dt),
      dt,
    );
  }
}