public CellMapViewWithMapData(CellManager cellMgr, int radius)
 {
     m_Radius             = radius;
     m_CellMgr            = cellMgr;
     m_CellNumPerCellView = 2 * radius - 1;
     m_MaxRowCount        = m_CellMgr.GetMaxRow() / m_CellNumPerCellView;
     m_MaxColCount        = m_CellMgr.GetMaxCol() / m_CellNumPerCellView;
     m_RadiusLength       = (2 * m_Radius - 1) * m_CellMgr.GetCellWidth() / 2;
     m_CellAttrs          = new byte[m_MaxRowCount, m_MaxColCount];
     InitCellAttr();
 }
Esempio n. 2
0
 public CellMapView(CellManager cellMgr, int radius)
 {
     m_Radius             = radius;
     m_CellNumPerCellView = 2 * radius - 1;
     m_CellMgr            = cellMgr;
     m_MaxRowCount        = m_CellMgr.GetMaxRow() / m_CellNumPerCellView;
     m_MaxColCount        = m_CellMgr.GetMaxCol() / m_CellNumPerCellView;
     m_RadiusLength       = (2 * m_Radius - 1) * m_CellMgr.GetCellWidth() / 2;
     if (radius > 1)
     {
         m_Delegation = new CellMapViewWithMapData(cellMgr, radius);
     }
 }