Tile constructor
Tile(})
Implementation
Tile(
String spritePath,
Vector2 position, {
this.width = 32,
this.height = 32,
this.type,
this.properties,
}) {
this.position = generateRectWithBleedingPixel(position, width, height);
if (spritePath.isNotEmpty) {
_loader = AssetsLoader();
_loader?.add(
AssetToLoad(Sprite.load(spritePath), (value) => this._sprite = value),
);
}
_positionText = position;
}