コード例 #1
0
		public void Update(ScanResult result)
		{
			if (result.Updates != null)
			{
				var charUpdate = result.Updates
									   .Where(x => x.Character != null)
									   .LastOrDefault(x => x.Character.Id == Id);
				if (charUpdate != null)
				{
					Update(charUpdate.Character);
				}

				var inventoryUpdate = result.Updates.LastOrDefault(x => x.Inventory != null);
				if (inventoryUpdate != null) Inventory = inventoryUpdate.Inventory;
			}


			XPos = result.XPos;
			YPos = result.YPos;
			CurrentMap = result.Map;

			_visibleItems = result.Items;
			_visibleEntities = result.Entities;
			_visibleArea = result.ConvertAreaToPositions().Select(x => x.Item1);
		}
コード例 #2
0
        public void Update(ScanResult result)
        {
            foreach (var tuple in result.ConvertAreaToPositions())
            {
                UpdatePosition(tuple.Item1, tuple.Item2);
            }

            UpdatePosition(result.StairsDown, (uint)TileFlags.STAIR_DOWN);
            UpdatePosition(result.StairsUp, (uint)TileFlags.STAIR_UP);
        }
コード例 #3
0
		public void Update(ScanResult result)
		{
			foreach (var tuple in result.ConvertAreaToPositions())
			{
				UpdatePosition(tuple.Item1, tuple.Item2);
			}

			UpdatePosition(result.StairsDown, (uint) TileFlags.STAIR_DOWN);
			UpdatePosition(result.StairsUp, (uint) TileFlags.STAIR_UP);
		}