setup method

void setup({
  1. GameComponent? target,
  2. Vector2? offset,
})

Sets up the follower behavior.

target - the component to follow. If null, keeps the current target. offset - the offset to apply. If null, keeps the current offset.

Implementation

void setup({
  GameComponent? target,
  Vector2? offset,
}) {
  _target = target ?? _target;
  _offset = offset ?? _offset;
}