TileModel constructor
TileModel({
- required double x,
- required double y,
- double offsetX = 0.0,
- double offsetY = 0.0,
- required double width,
- required double height,
- String? type,
- Map<
String, dynamic> ? properties, - TileModelSprite? sprite,
- Color? color,
- TileModelAnimation? animation,
- List<
CollisionArea> ? collisions, - double angle = 0,
- double opacity = 1.0,
- bool isFlipVertical = false,
- 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}';
}