AnimatedObjectOnce constructor

AnimatedObjectOnce({
  1. required Vector2Rect position,
  2. Future<SpriteAnimation>? animation,
  3. VoidCallback? onFinish,
  4. VoidCallback? onStartAnimation,
  5. double? rotateRadAngle,
  6. 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;
}