Change map
This commit is contained in:
@@ -9,9 +9,11 @@ namespace Hallucinate.GameSetup.Maze
|
||||
/// </summary>
|
||||
public class MazeGrid
|
||||
{
|
||||
public int Width { get; private set; }
|
||||
public int Depth { get; private set; }
|
||||
public int Width { get; set; }
|
||||
public int Depth { get; set; }
|
||||
public int Level { get; set; }
|
||||
public MazePieceData[,] piecePlace;
|
||||
public float scale = 1f;
|
||||
|
||||
private readonly MazeCellType[,] _cells;
|
||||
|
||||
@@ -25,12 +27,20 @@ namespace Hallucinate.GameSetup.Maze
|
||||
{
|
||||
Width = width;
|
||||
Depth = depth;
|
||||
piecePlace = new MazePieceData[width, depth];
|
||||
|
||||
_cells = new MazeCellType[width, depth];
|
||||
|
||||
// Initialize all as walls
|
||||
for (int z = 0; z < depth; z++)
|
||||
{
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
_cells[x, z] = MazeCellType.Wall;
|
||||
piecePlace[x, z].piece = PieceType.Wall;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void SetCell(int x, int z, MazeCellType type)
|
||||
|
||||
Reference in New Issue
Block a user