SpriteAnimationComponent constructor

SpriteAnimationComponent({
  1. SpriteAnimation? animation,
  2. bool? removeOnFinish,
  3. bool? playing,
  4. Paint? paint,
  5. Vector2? position,
  6. Vector2? size,
  7. Vector2? scale,
  8. double? angle,
  9. Anchor? anchor,
  10. int? priority,
})

Creates a component with an empty animation which can be set later

Implementation

SpriteAnimationComponent({
  this.animation,
  bool? removeOnFinish,
  bool? playing,
  Paint? paint,
  Vector2? position,
  Vector2? size,
  Vector2? scale,
  double? angle,
  Anchor? anchor,
  int? priority,
})  : removeOnFinish = removeOnFinish ?? false,
      playing = playing ?? true,
      super(
        position: position,
        size: size,
        scale: scale,
        angle: angle,
        anchor: anchor,
        priority: priority,
      ) {
  if (paint != null) {
    this.paint = paint;
  }
}