TileComponent.fromSprite constructor
TileComponent.fromSprite({})
Implementation
TileComponent.fromSprite({
required Sprite? sprite,
required Vector2 position,
required Vector2 size,
this.tileClass,
Map<String, dynamic>? properties,
double offsetX = 0,
double offsetY = 0,
this.color,
}) {
this.properties = properties;
id = '${position.x}/${position.y}';
_sprite = sprite;
applyBleedingPixel(
position: position,
size: size,
offsetX: offsetX,
offsetY: offsetY,
calculatePosition: true,
);
}