Exemplo n.º 1
0
    public void GenerateNewMap()
    {
        mapVisualizer.ClearMap();

        grid = new MapGrid(width, length);

        MapHelper.RandomlyChooseAndSetStartAndExit(grid, ref startPosition, ref exitPosition, randomPlacement, startEdge, exitEdge);

        map = new CandidateMap(grid, numberOfPieces);
        map.CreateMap(startPosition, exitPosition, autoRepair);
        mapVisualizer.VisualizeMap(grid, map.ReturnMapData(), visualizeUsingPrefabs);
    }
Exemplo n.º 2
0
    public void GenerateNewMap()
    {
        // Clears everything in our dictionary and map
        mapVisualizer.ClearMap();

        // Creates a new grid
        grid = new MapGrid(width, length);

        // Selects points
        MapHelper.RandomlyChooseAndSetStartAndExit(grid, ref startPosition, ref exitPosition, randomPlacement, startEdge, exitEdge);

        // Creates a map and visualizes it
        map = new CandidateMap(grid, numberOfPieces, enemyCount);
        map.CreateMap(startPosition, exitPosition, enemyCount, autoRepair);
        mapVisualizer.VisualizeMap(grid, map.ReturnMapData(), visualizeUsingPrefabs);
    }
Exemplo n.º 3
0
    private void GenerateNewMap()
    {
        int hqRadiusExpanded = hqRadius * 5;

        centerPosition = new Vector2(width / 2, length / 2);

        SetUpEverything(centerPosition);

        mapVisualizer.ClearMap();
        grid = new MapGrid(width, length);
        map  = new CandidateMap(grid, numberOfPieces, centerPosition, hqRadiusExpanded);
        map.CreateMap();
        mapVisualizer.VisualizeMap(grid, map.GetMapData(), visualizeUsingPrefabs);
    }