Tile.fromFutureSprite constructor
Tile.fromFutureSprite(})
Implementation
Tile.fromFutureSprite(
Future<Sprite> sprite,
Vector2 position, {
this.width = 32,
this.height = 32,
this.type,
this.properties,
double offsetX = 0,
double offsetY = 0,
}) {
id = '${position.x}/${position.y}';
_loader = AssetsLoader();
_loader?.add(AssetToLoad(sprite, (value) => this._sprite = value));
this.position = generateRectWithBleedingPixel(
position,
width,
height,
offsetX: offsetX,
offsetY: offsetY,
);
_positionText = position;
}