Tile.fromAnimation constructor

Tile.fromAnimation(
  1. ControlledUpdateAnimation animation,
  2. Vector2 position, {
  3. double width = 32,
  4. double height = 32,
  5. String? type,
  6. Map<String, dynamic>? properties,
  7. double offsetX = 0,
  8. double offsetY = 0,
})

Implementation

Tile.fromAnimation(
  ControlledUpdateAnimation animation,
  Vector2 position, {
  this.width = 32,
  this.height = 32,
  this.type,
  this.properties,
  double offsetX = 0,
  double offsetY = 0,
}) {
  id = '${position.x}/${position.y}';
  this._animation = animation;
  this.position = generateRectWithBleedingPixel(
    position,
    width,
    height,
    offsetX: offsetX,
    offsetY: offsetY,
  );

  _positionText = position;
}