TileComponent.fromAnimation constructor

TileComponent.fromAnimation({
  1. required ControlledUpdateAnimation animation,
  2. required Vector2 position,
  3. required Vector2 size,
  4. String? tileClass,
  5. Map<String, dynamic>? properties,
  6. double offsetX = 0,
  7. double offsetY = 0,
})

Implementation

TileComponent.fromAnimation({
  required ControlledUpdateAnimation animation,
  required Vector2 position,
  required Vector2 size,
  this.tileClass,
  Map<String, dynamic>? properties,
  double offsetX = 0,
  double offsetY = 0,
}) {
  properties = properties;
  id = '${position.x}/${position.y}';
  _animation = animation;
  applyBleedingPixel(
    position: position,
    size: size,
    offsetX: offsetX,
    offsetY: offsetY,
    calculatePosition: true,
  );
}