Tile constructor
Tile({
- required double x,
- required double y,
- double offsetX = 0.0,
- double offsetY = 0.0,
- required double width,
- required double height,
- String? tileClass,
- Map<
String, dynamic> ? properties, - TileSprite? sprite,
- Color? color,
- TilelAnimation? animation,
- List<
ShapeHitbox> ? collisions, - double angle = 0,
- double opacity = 1.0,
- bool isFlipVertical = false,
- bool isFlipHorizontal = false,
Implementation
Tile({
required this.x,
required this.y,
this.offsetX = 0.0,
this.offsetY = 0.0,
required this.width,
required this.height,
this.tileClass,
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}';
}