Ejemplo n.º 1
0
 public TileGenerator(MapConfig config)
 {
     _mapConfig       = config;
     _source          = ProviderFactory.CreateSourceProvider(config);
     _tilePathBuilder = _source.GetTilePathBuilder(config.SavePath);
     _worker          = new Core.QueueTaskWorker <TileCoordWrap>(config.RunThreadCount, GetTile, true);
     _totalTile       = _source.TileGrid.TotalTile;
 }
Ejemplo n.º 2
0
 public TileGenerator(MapConfig config)
 {
     _mapConfig      = config;
     _source         = ProviderFactory.CreateSourceProvider(config);
     _outputStrategy = ProviderFactory.CreateOutputStrategy(config);
     _outputStrategy.Init(config.SavePath);
     _worker           = new Core.QueueTaskWorker <TileCoordWrap>(config.RunThreadCount, GetTile, true);
     _totalTile        = _source.TileGrid.TotalTile;
     _lastTiles        = new Core.LimitedQueue <Core.TileCoord>(config.RunThreadCount);
     _successTileIndex = config.Result.SuccessTiles;
     _currTileIndex    = config.Result.LastTileIndex;
 }