public void Draw(TCODConsole cons) { cons.setForegroundColor(TCODColor.white); for (int i = 0; i < MAP_WIDTH; i++) { for (int j = 0; j < MAP_HEIGHT; j++) { cons.putChar(i, j, this[i, j] ? '#' : '.'); } } _stair.Draw(cons); cons.putChar(StartPosX, StartPosY, '<'); foreach (Item item in _items) { item.Draw(cons); } foreach (Monster mons in _monsters) { mons.Draw(cons); } Player.Draw(cons); for (int i = 0; i < MAP_WIDTH; i++) { for (int j = 0; j < MAP_HEIGHT; j++) { /*int intens; * Light light = LightAt(i, j); * * if (light == null) * intens = 0; * else * { * intens = light.IntensityAt(i, j); * color = color.Multiply(light.Color); * } * float value = (float)intens / 20 + (Game.ShowWall ? 0.05f : 0f); * color.setValue(System.Math.Min(value, 1f));//*/ TCODColor color = cons.getCharForeground(i, j); TCODColor newCol = ColorAt(i, j); if (newCol.NotEqual(TCODColor.black)) { _known[i, j] = true; } color = color.Multiply(newCol); cons.setCharForeground(i, j, color); } } }
public void Draw(TCODConsole cons) { cons.setForegroundColor(TCODColor.white); for (int i = 0; i < MAP_WIDTH; i++) for (int j = 0; j < MAP_HEIGHT; j++) { cons.putChar(i, j, this[i, j] ? '#' : '.'); } _stair.Draw(cons); cons.putChar(StartPosX, StartPosY, '<'); foreach (Item item in _items) { item.Draw(cons); } foreach (Monster mons in _monsters) { mons.Draw(cons); } Player.Draw(cons); for (int i = 0; i < MAP_WIDTH; i++) for (int j = 0; j < MAP_HEIGHT; j++) { /*int intens; Light light = LightAt(i, j); if (light == null) intens = 0; else { intens = light.IntensityAt(i, j); color = color.Multiply(light.Color); } float value = (float)intens / 20 + (Game.ShowWall ? 0.05f : 0f); color.setValue(System.Math.Min(value, 1f));//*/ TCODColor color = cons.getCharForeground(i, j); TCODColor newCol = ColorAt(i, j); if (newCol.NotEqual(TCODColor.black)) _known[i, j] = true; color = color.Multiply(newCol); cons.setCharForeground(i, j, color); } }