Beispiel #1
0
        public LiveMap()
        {
            m_visibilityManager = new LosManager(AVATAR_SIGHT);

            Blocks = new LiveMapBlock[SIZE_IN_BLOCKS, SIZE_IN_BLOCKS];
            Cells  = new LiveMapCell[SIZE_IN_CELLS, SIZE_IN_CELLS];

            CenterLiveBlock = Point.Zero;

            {
                var blockIds = new List <Point>();
                for (var i = 0; i < SIZE_IN_BLOCKS; i++)
                {
                    for (var j = 0; j < SIZE_IN_BLOCKS; j++)
                    {
                        blockIds.Add(new Point(i, j));
                    }
                }
                m_blockIds = blockIds.ToArray();
            }

            for (var index = 0; index < m_blockIds.Length; index++)
            {
                var id = m_blockIds[index];
                Blocks[id.X, id.Y] = new LiveMapBlock(this, id, index);
            }

            PathFinder = new PathFinder(SIZE_IN_CELLS);
        }
Beispiel #2
0
	    public LiveMap()
		{
			m_visibilityManager = new LosManager(AVATAR_SIGHT);

			Blocks = new LiveMapBlock[SIZE_IN_BLOCKS,SIZE_IN_BLOCKS];
			Cells = new LiveMapCell[SIZE_IN_CELLS,SIZE_IN_CELLS];

			CenterLiveBlock = Point.Zero;

			{
				var blockIds = new List<Point>();
				for (var i = 0; i < SIZE_IN_BLOCKS; i++) for (var j = 0; j < SIZE_IN_BLOCKS; j++) blockIds.Add(new Point(i, j));
				m_blockIds = blockIds.ToArray();
			}

			for (var index = 0; index < m_blockIds.Length; index++)
			{
				var id = m_blockIds[index];
				Blocks[id.X, id.Y] = new LiveMapBlock(this, id, index);
			}

			PathFinder = new PathFinder(SIZE_IN_CELLS);
		}
Beispiel #3
0
 public LiveMapCell(LiveMapBlock _liveMapBlock, Point _liveCoords)
 {
     LiveMapBlock = _liveMapBlock;
     m_liveCoords = _liveCoords;
 }