diff --git a/isometric-park-fna/FNAGame.cs b/isometric-park-fna/FNAGame.cs --- a/isometric-park-fna/FNAGame.cs +++ b/isometric-park-fna/FNAGame.cs @@ -75,6 +75,7 @@ private bool showGrid; + private bool showTrees; private Grammar grammar; private string output; private GraphicsDeviceManager gdm; @@ -139,6 +140,7 @@ showForest = false; showNews = false; showGrid = true; + showTrees = true; this.Window.Title = "Isometric Park"; @@ -367,6 +369,13 @@ this.showGrid = !this.showGrid; } +#if DEBUG + if (keyboardCur.IsKeyDown(Keys.T) && keyboardPrev.IsKeyUp(Keys.T)) + { + this.showTrees = !this.showTrees; + + } +#endif if (keyboardCur.IsKeyDown(Keys.B) && keyboardPrev.IsKeyUp(Keys.B)) { this.showBudget = !this.showBudget; @@ -756,27 +765,29 @@ }//*/ #region draw_trees - for (int i = 0; i < this.simulation.map.MapHeight; i++) - { - for (int j = 0; j < this.simulation.map.MapWidth; j += 1) + if (this.showTrees) { + for (int i = 0; i < this.simulation.map.MapHeight; i++) { + for (int j = 0; j < this.simulation.map.MapWidth; j += 1) + { - if (this.simulation.map.cells[i][j].hasTree) - { //until we actually simulate: - drawTileAt(i, j, 142, 2); - // if ((i + j) % 8 == 0) - // { - // drawTileAt(i, j, 141, 2); - // } - // else - // { - // drawTileAt(i, j, 142, 2); - // } - } - else if (this.simulation.map.cells[i][j].status == CellStatus.DeadTree) { - drawTileAt(i, j, 141, 2); - // System.Console.WriteLine(String.Format("Drew Dead Tree at {0},{1}", i, j)); + if (this.simulation.map.cells[i][j].hasTree) + { //until we actually simulate: + drawTileAt(i, j, 142, 2); + // if ((i + j) % 8 == 0) + // { + // drawTileAt(i, j, 141, 2); + // } + // else + // { + // drawTileAt(i, j, 142, 2); + // } + } + else if (this.simulation.map.cells[i][j].status == CellStatus.DeadTree) { + drawTileAt(i, j, 141, 2); + // System.Console.WriteLine(String.Format("Drew Dead Tree at {0},{1}", i, j)); + } } } }