AnimatedObjectOnce constructor
AnimatedObjectOnce({
- required Vector2 position,
- required Vector2 size,
- FutureOr<
SpriteAnimation> ? animation, - VoidCallback? onFinish,
- VoidCallback? onStart,
- double rotateRadAngle = 0,
- LightingConfig? lightingConfig,
Implementation
AnimatedObjectOnce({
required Vector2 position,
required Vector2 size,
FutureOr<SpriteAnimation>? animation,
this.onFinish,
this.onStart,
double rotateRadAngle = 0,
LightingConfig? lightingConfig,
}) {
loader?.add(AssetToLoad(animation, (value) {
this.animation = value..loop = false;
}));
setupLighting(lightingConfig);
this.position = position;
this.size = size;
angle = rotateRadAngle;
}