示例#1
0
文件: MazeBase.cs 项目: bsgg/TheMaze
 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);
 }
示例#2
0
文件: MazeBase.cs 项目: bsgg/TheMaze
 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);
 }
示例#3
0
文件: MazeBase.cs 项目: bsgg/TheMaze
 public MazeSettings(int sizeX, int sizeZ)
 {
     ListHoles = new List <HoleData>();
     MazeSize  = new IVector2(sizeX, sizeZ);
 }