AnimatedFollowerGameObject constructor
AnimatedFollowerGameObject({
- required FutureOr<
SpriteAnimation> ? animation, - required Vector2 size,
- required GameComponent target,
- LightingConfig? lightingConfig,
- bool loop = true,
- VoidCallback? onFinish,
- VoidCallback? onStart,
- double angle = 0,
- bool removeOnFinish = true,
- Vector2? offset,
- int? objectPriority,
- 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);
}