Пример #1
0
		public Tile(string type, Coordinate position, bool solid = false)
		{
			this.Type = type;
			this.position = new Coordinate(position);
			this.tags = new List<string>();
			this.Solid = solid;
		}
Пример #2
0
		public bool Remembers(ILevel level, Coordinate coordinate)
		{
			if (!this.tileMemory.ContainsKey(level))
			{
				return false;
			}

			return this.tileMemory[level][coordinate.X, coordinate.Y] != null;
		}
Пример #3
0
		private void RenderTile(Coordinate tilePosition)
		{
			var tile = this.Level.TileAt(tilePosition);

			if (tile == null)
			{
				return;
			}

			var tileType = this.GetTileType(tile);

			this.console
				.Cursor.SetPosition((short)tilePosition.X, (short)tilePosition.Y)
				.Cursor.SetColor(this.tileColors[tileType])
				.Write(this.tileAppearances[tileType]);
		}