addTile method

  1. @override
Future addTile(
  1. TileModel tileModel
)
override

Implementation

@override
Future addTile(TileModel tileModel) async {
  await _loadTile(tileModel);
  tiles.add(tileModel);
  add(tileModel.getTile());
  quadTree?.insert(
    tileModel,
    Point(tileModel.x, tileModel.y),
    id: tileModel.id,
  );

  _calculateStartPosition();
  size = _calculateMapSize();
}