Ejemplo n.º 1
0
    private void SpawnKruskalMaze(SpawnMazeEventArgs spawnMazeEventArgs)
    {
        Debug.Log("Called");
        Vector2Int mazeDimensions = new Vector2Int(spawnMazeEventArgs.MazeDimensions.x * 2, spawnMazeEventArgs.MazeDimensions.y * 2);

        MazeGenerationStarted?.Invoke(this, new MazeGenerationEventArgs(mazeDimensions));
        CalculateMaze = MazeCalculatingAlgorithms.CalculateKruskalMaze;
    }
Ejemplo n.º 2
0
    private void SpawnBackTrackingRecursiveMaze(SpawnMazeEventArgs spawnMazeEventArgs)
    {
        Vector2Int mazeDimensions = new Vector2Int(spawnMazeEventArgs.MazeDimensions.x, spawnMazeEventArgs.MazeDimensions.y);

        MazeGenerationStarted?.Invoke(this, new MazeGenerationEventArgs(mazeDimensions));
        CalculateMaze = MazeCalculatingAlgorithms.CalculateRecursiveBacktrackingMaze;
        SpawnMazeWalls(spawnMazeEventArgs.MazeDimensions, mazeSpawnPoint.transform);
        SpawnMazeGround(spawnMazeEventArgs.MazeDimensions, mazeSpawnPoint.transform);
    }