public LandGeneratorController(ref MapBlock[,] map, LandGeneratorArguments args, int seed) : this(ref map, seed) { LandSourcePointsDensity = args.LandSourcePointsDensity; DistanceFromSourceLandBlockImpact = args.DistanceFromSourceBlockImpact; LandGenerationPower = args.LandGenerationPower; MinMaxLandSize = new Vector2i(args.MinSize, args.MaxSize); }
public void ShowWindow(LandGeneratorArguments args, int seed) { _tileMap = TileMapGeneratorController.GenerateTileMap(); var landGenerator = new LandGeneratorController(ref _tileMap, args, seed); landGenerator.GenerateLand(); _mainWindow = new RenderWindow(new VideoMode(WINDOW_WIDTH, WINDOW_HEIGHT), "Square Tiles terrain generator"); _mainWindow.Closed += mainWindow_Closed; _drawingTileMapManager = new DrawingTileMapController(ref _tileMap); while (_mainWindow.IsOpen) { _mainWindow.DispatchEvents(); _mainWindow.Clear(Color.Black); _mainWindow.Draw(_drawingTileMapManager); _mainWindow.Display(); } }