AnimatedObjectOnce constructor
AnimatedObjectOnce({
- required Vector2Rect position,
- Future<
SpriteAnimation> ? animation, - VoidCallback? onFinish,
- VoidCallback? onStartAnimation,
- double? rotateRadAngle,
- LightingConfig? lightingConfig,
Implementation
AnimatedObjectOnce({
required Vector2Rect position,
Future<SpriteAnimation>? animation,
this.onFinish,
this.onStartAnimation,
this.rotateRadAngle,
LightingConfig? lightingConfig,
}) {
_loader.add(AssetToLoad(animation, (value) {
this.animation = value..loop = false;
}));
setupLighting(lightingConfig);
this.position = position;
}