AnimatedFollowerGameObject constructor

AnimatedFollowerGameObject({
  1. required FutureOr<SpriteAnimation>? animation,
  2. required Vector2 size,
  3. required GameComponent target,
  4. LightingConfig? lightingConfig,
  5. bool loop = true,
  6. VoidCallback? onFinish,
  7. VoidCallback? onStart,
  8. double angle = 0,
  9. bool removeOnFinish = true,
  10. Vector2? offset,
  11. int? objectPriority,
  12. bool renderAboveComponents = false,
})

Implementation

AnimatedFollowerGameObject({
  required super.animation,
  required super.size,
  required GameComponent target,
  super.lightingConfig,
  super.loop = true,
  super.onFinish,
  super.onStart,
  super.angle,
  super.removeOnFinish = true,
  Vector2? offset,
  super.objectPriority,
  super.renderAboveComponents,
}) : super(
        position: target.position + (offset ?? Vector2.zero()),
      ) {
  setupFollower(target: target, offset: offset);
}