Exemplo n.º 1
0
 public void SetNeighbourRegionSizeInfo(List<GridRegion> regionsList)
 {
     lock (m_knownChildRegions)
     {
         m_knownChildRegionsSizeInfo.Clear();
         foreach (GridRegion region in regionsList)
         {
             spRegionSizeInfo sizeInfo = new spRegionSizeInfo();
             sizeInfo.sizeX = region.RegionSizeX;
             sizeInfo.sizeY = region.RegionSizeY;
             ulong regionHandle = region.RegionHandle;
             m_knownChildRegionsSizeInfo.Add(regionHandle, sizeInfo);
         }
     }
 }
Exemplo n.º 2
0
        public void AddNeighbourRegionSizeInfo(GridRegion region)
        {
            lock (m_knownChildRegions)
            {
                spRegionSizeInfo sizeInfo = new spRegionSizeInfo();
                sizeInfo.sizeX = region.RegionSizeX;
                sizeInfo.sizeY = region.RegionSizeY;
                ulong regionHandle = region.RegionHandle;

                if (!m_knownChildRegionsSizeInfo.ContainsKey(regionHandle))
                {
                    m_knownChildRegionsSizeInfo.Add(regionHandle, sizeInfo);

                }
                else
                    m_knownChildRegionsSizeInfo[regionHandle] = sizeInfo;
            }
        }