public MazeCell GetCell(IVector2 coords) { if ( (coords.Row >= 0) && (coords.Row < m_MazeSettings.MazeSize.Row) && (coords.Column >= 0) && (coords.Column < m_MazeSettings.MazeSize.Column)) { if (m_Cells != null) { return(m_Cells[coords.Column, coords.Row]); } } return(null); }
public MazeCell GetCellFromList(IVector2 coords) { if ( (coords.Row >= 0) && (coords.Row < m_MazeSettings.MazeSize.Row) && (coords.Column >= 0) && (coords.Column < m_MazeSettings.MazeSize.Column)) { if (m_ListCells != null) { int index = coords.Row + (coords.Column * m_MazeSettings.MazeSize.Column); return(m_ListCells[index]); } } return(null); }
public MazeSettings(int sizeX, int sizeZ) { ListHoles = new List <HoleData>(); MazeSize = new IVector2(sizeX, sizeZ); }