FollowerGameObject constructor

FollowerGameObject({
  1. required GameComponent target,
  2. required Vector2 size,
  3. required FutureOr<Sprite>? sprite,
  4. Vector2? offset,
  5. int? objectPriority,
  6. LightingConfig? lightingConfig,
  7. bool renderAboveComponents = false,
})

Implementation

FollowerGameObject({
  required GameComponent target,
  required super.size,
  required super.sprite,
  Vector2? offset,
  super.objectPriority,
  super.lightingConfig,
  super.renderAboveComponents,
}) : super(position: target.position + (offset ?? Vector2.zero())) {
  setupFollower(target: target, offset: offset);
}