/// <summary> /// Draw the actors on the current map to the console buffer /// </summary> protected void DrawActorsToConsole() { // Draw characters to Console Buffer foreach (var actor in Game.CurrentDungeon.Actors) { // Tile to draw var drawCell = CellToScreen.GetActorCell(actor); // Only show character if visible if (Game.CurrentDungeon.GetVisibility(actor.Location) == Dungeon.CellVisibility.VISIBLE) { ConsoleBuffer[actor.Location.X, actor.Location.Y] = drawCell; } } }
/// <summary> /// Draw the current map to the console buffer /// </summary> protected void DrawMapToConsole() { // Draw map to Console Buffer for (var ix = 0; ix < Game.CurrentDungeon.Width; ++ix) { for (var iy = 0; iy < Game.CurrentDungeon.Height; ++iy) { // Tile to draw var currentcell = Game.CurrentDungeon.GetCell(new XY(ix, iy)); var visibility = Game.CurrentDungeon.GetVisibility(new XY(ix, iy)); // If visible or seen, we're drawing. // Check for visible and pass to GetTileCell. if ((visibility == Dungeon.CellVisibility.VISIBLE) || (visibility == Dungeon.CellVisibility.SEEN)) { ConsoleBuffer[ix, iy] = CellToScreen.GetTileCell(currentcell, visibility == Dungeon.CellVisibility.VISIBLE); } } } }