GameDecoration.withAnimation constructor
GameDecoration.withAnimation({
- required FutureOr<
SpriteAnimation> animation, - required Vector2 position,
- required Vector2 size,
- Anchor anchor = Anchor.topLeft,
- double angle = 0,
- LightingConfig? lightingConfig,
- 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);
}