GameDecoration.withAnimation constructor

GameDecoration.withAnimation({
  1. required FutureOr<SpriteAnimation> animation,
  2. required Vector2 position,
  3. required Vector2 size,
  4. Anchor anchor = Anchor.topLeft,
  5. double angle = 0,
  6. LightingConfig? lightingConfig,
  7. bool renderAboveComponents = false,
})

Implementation

GameDecoration.withAnimation({
  required FutureOr<SpriteAnimation> animation,
  required super.position,
  required super.size,
  super.anchor,
  super.angle,
  super.lightingConfig,
  super.renderAboveComponents,
}) {
  loader?.add(AssetToLoad(animation, (value) => setAnimation(value)));
  applyBleedingPixel(position: position, size: size);
}