moveAlongThePath method
Makes the component follow a previously calculated path.
Implementation
void moveAlongThePath(
List<Vector2> path, {
VoidCallback? onFinish,
}) {
if (!_comp.hasGameRef) {
return;
}
if (onFinish != null) {
_onFinishCallbacks.add(onFinish);
}
_currentIndex = 0;
_removeLinePathComponent();
_currentPath = path;
_addLinePathComponent();
}