TileComponent constructor
TileComponent({})
Implementation
TileComponent({
required String spritePath,
required Vector2 position,
required Vector2 size,
this.tileClass,
this.color,
Map<String, dynamic>? properties,
double offsetX = 0,
double offsetY = 0,
}) {
this.properties = properties;
applyBleedingPixel(
position: position,
size: size,
offsetX: offsetX,
offsetY: offsetY,
calculatePosition: true,
);
if (spritePath.isNotEmpty) {
loader?.add(
AssetToLoad(Sprite.load(spritePath), (value) => _sprite = value),
);
}
}