TileWithCollision.fromSprite constructor

TileWithCollision.fromSprite({
  1. required Sprite? sprite,
  2. required Vector2 position,
  3. required Vector2 size,
  4. String? tileClass,
  5. Iterable<ShapeHitbox>? collisions,
  6. double offsetX = 0,
  7. double offsetY = 0,
  8. Color? color,
  9. Map<String, dynamic>? properties,
})

Implementation

TileWithCollision.fromSprite({
  required Sprite? sprite,
  required Vector2 position,
  required Vector2 size,
  String? tileClass,
  this.collisions,
  double offsetX = 0,
  double offsetY = 0,
  Color? color,
  Map<String, dynamic>? properties,
}) : super.fromSprite(
        sprite: sprite,
        position: position,
        size: size,
        tileClass: tileClass,
        offsetX: offsetX,
        offsetY: offsetY,
        properties: properties,
        color: color,
      );