public RegionBoundedTileStack(IEnumerable<IRenderable> layers, TileSet connectedWallTileSet, Color outlineColor, string northWall, string eastWall, string southWall, string westWall)
			: base(layers)
		{
			OutlineColor = outlineColor;
			_connectedWallTiles = connectedWallTileSet;
			_northWall = northWall;
			_eastWall = eastWall;
			_southWall = southWall;
			_westWall = westWall;
		}
Esempio n. 2
0
		public override void LoadContent(ContentManager content)
		{
			base.LoadContent(content);

			_ascii = content.Load<TileSet>("TileSets/ASCII.xml");

			//_writer = new GLTextWriter(new Font("Consolas", 64, FontStyle.Bold));

			//var size = _writer.Measure(PAUSE_MESSAGE);
			//_writer.Position = new Vector2(Manager.GameWindow.Width - size.Width, Manager.GameWindow.Height - size.Height) / 2.0f;
			//_writer.Color = Color.White;
		}
		public override void LoadContent(ContentManager content)
		{
			base.LoadContent(content);

			_ascii = content.Load<TileSet>("TileSets/ASCII.xml");
			
			var progress = new Progress<string>(message => _progressMessages.Push(message));
			content.Load<BlockRegistry>("Blocks/SampleBlockRegistry.xml");
			ItemRegistry.Instance.Initialize();

			_loadingTask = Task.Run(() =>
			{
				_level = new Level(ChunkType.Overworld);
				var chunk = _level[ChunkLayer.Floor, 0, 0]; // generate the first chunk
			}).ContinueWith(x => Thread.Sleep(100));
		}
Esempio n. 4
0
		public Tile(TileSet tileSet, string name)
		{
			_tileSet = tileSet;
			Name = name;
			TileIndex = tileSet.GetTileIndexFromName(Name);
		}
Esempio n. 5
0
		public Tile(TileSet tileSet, int tileIndex)
		{
			_tileSet = tileSet;
			TileIndex = tileIndex;
			Name = tileSet.GetNameFromTileIndex(TileIndex);
		}