A procedural Maze Generator the uses the Hunt and Kill Algorithm
- Can generate upto a 45 * 45 maze (more than that casues a stack overflow error because the algorithm uses recurssion)
_cells[x, z]
: is a 2 dimensional maxtrix representing all the cells of the mazesize
: is an Integer Vecotr2 (IntVector2
) representing the x and z size of the mazecellUnitSize
: is how wide a single cell is (a cell must be a square)cellPrefab
: is a prefab of a singular cell with all 4 walls
coordinate
: an Integer Vector2 that is the location of the cell in cell unitswalls
: a list of theWall
struct that contains theDirection
enum a wall is facing and transform of a wall