Exemplo n.º 1
0
		public virtual void AddedToBlock(BaseMapBlock _mapBlock)
		{
			BlockId = _mapBlock.BlockId;
			WorldRoomRectangle = new Rct
				(
				RoomRectangle.Left + BlockId.X*Constants.MAP_BLOCK_SIZE,
				RoomRectangle.Top + BlockId.Y*Constants.MAP_BLOCK_SIZE,
				RoomRectangle.Width,
				RoomRectangle.Height);
			RandomSeed = _mapBlock.RandomSeed + RoomRectangle.LeftTop.GetHashCode();
		}
Exemplo n.º 2
0
		public MapBlock(Point _blockId, BaseMapBlock _baseMapBlock) : this(_blockId)
		{
			foreach (var point in Rect.AllPoints)
			{
				Map[point.X, point.Y] = _baseMapBlock.Map[point.X, point.Y];
			}
			foreach (var room in _baseMapBlock.Rooms)
			{
				Rooms.Add(room);
			}
			RandomSeed = _baseMapBlock.RandomSeed;
		}