moveAlongThePath method

void moveAlongThePath(
  1. List<Vector2> path, {
  2. VoidCallback? onFinish,
})

Implementation

void moveAlongThePath(
  List<Vector2> path, {
  VoidCallback? onFinish,
}) {
  if (!hasGameRef) {
    return;
  }

  _onFinish = onFinish;
  _currentIndex = 0;
  _removeLinePathComponent();

  _currentPath = path;
  _addLinePathComponent();
}