コード例 #1
0
 private void DrawObstacle()
 {
     if (m_IsDebugObstacleCreated)
     {
         return;
     }
     m_IsDebugObstacleCreated = true;
     if (null != m_SpatialSystem && null != m_PlayerSelf)
     {
         CellManager cellMgr = m_SpatialSystem.GetCellManager();
         if (null != cellMgr)
         {
             int maxRows = cellMgr.GetMaxRow();
             int maxCols = cellMgr.GetMaxCol();
             for (int i = 0; i < maxRows; ++i)
             {
                 for (int j = 0; j < maxCols; ++j)
                 {
                     Vector3 pt     = cellMgr.GetCellCenter(i, j);
                     byte    status = cellMgr.GetCellStatus(i, j);
                     if (BlockType.GetBlockType(status) != BlockType.NOT_BLOCK)
                     {
                         GfxSystem.DrawCube(pt.X, pt.Y, pt.Z, true);
                     }
                 }
             }
         }
     }
 }