Пример #1
0
 private void GenMaze()
 {
     if (maze.IsGenerated())
     {
         UnDrawMaze();
         maze.DeleteMaze();
     }
     maze.SetMazeDepth(1);
     maze.GenerateNewMaze(MazeWidth, MazeHeight);
     DrawMaze();
 }
Пример #2
0
 private void GenMaze()
 {
     if (maze.IsGenerated())
     {
         UnDrawMaze();
         maze.DeleteMaze();
     }
     maze.SetRoomCreating(CreateRooms);
     maze.SetRoomParams(RoomCount, RoomWidth, RoomHeight);
     maze.SetMazeDepth(1);
     maze.SetUseSeed(UseSeed);
     maze.SetSeedForRandom(MazeSeed);
     maze.SetStartPosition(startPos);
     maze.GenerateNewMaze(MazeWidth, MazeHeight);
     DrawMaze();
 }
Пример #3
0
    void Start()
    {
        roomCells    = new List <Vector3[]>();
        wallPosArray = new List <Vector3>();
        endWallPos   = new List <Vector3>();
        startWallPos = new List <Vector3>();
        mazeWalls    = new List <GameObject>();

        maze = new MazeSkeleton(new Vector3(0, 0, 0), MazeWidth, MazeHeight, TunnelWidth, WallWidth, 1, UseSeed, MazeSeed, IsCreateMazeOnStart, CreateRooms, RoomCount, RoomHeight, RoomHeight);
        maze.SetRoomCreating(CreateRooms);
        maze.SetRoomParams(RoomCount, RoomWidth, RoomHeight);
        maze.SetMazeDepth(1);
        if (IsCreateMazeOnStart)
        {
            DrawMaze();
        }
        else
        {
            maze.GenerateNewMaze(MazeWidth, MazeHeight);
            DrawMaze();
        }
    }