TileModel constructor

TileModel({
  1. required double x,
  2. required double y,
  3. double offsetX = 0.0,
  4. double offsetY = 0.0,
  5. required double width,
  6. required double height,
  7. String? type,
  8. Map<String, dynamic>? properties,
  9. TileModelSprite? sprite,
  10. Color? color,
  11. TileModelAnimation? animation,
  12. List<CollisionArea>? collisions,
  13. double angle = 0,
  14. double opacity = 1.0,
  15. bool isFlipVertical = false,
  16. bool isFlipHorizontal = false,
})

Implementation

TileModel({
  required this.x,
  required this.y,
  this.offsetX = 0.0,
  this.offsetY = 0.0,
  required this.width,
  required this.height,
  this.type,
  this.properties,
  this.sprite,
  this.color,
  this.animation,
  this.collisions,
  this.angle = 0,
  this.opacity = 1.0,
  this.isFlipVertical = false,
  this.isFlipHorizontal = false,
}) {
  id = '$x/$y:${DateTime.now().microsecondsSinceEpoch}';
}