Esempio n. 1
0
        /// <summary> Set all cells to blank if unknown, or 'unseen' color of terrain if known. </summary>
        public void SetInitialConsoleCells(ScrollingConsole console, ISpaceMap spaceMap)
        {
            var unknownCell = new Cell(Color.Black, Color.Black, ' ');
            var knownCell   = new Cell(Color.DarkGray, Color.Black, 'i');

            for (int y = 0; y < spaceMap.Height; y++)
            {
                for (int x = 0; x < spaceMap.Width; x++)
                {
                    var space = spaceMap.GetItem((x, y));
                    if (space.IsKnown)
                    {
                        knownCell.Glyph = space.Terrain.Cell.Glyph;
                        console.SetCellAppearance(x, y, knownCell);
                    }
                    else
                    {
                        console.SetCellAppearance(x, y, unknownCell);
                    }
                }
            }

            EffectsManager = new EffectsManager(console);
        }
Esempio n. 2
0
 public void Start()
 {
     map = new SpaceNoise(); //LoadFromJson("resources/maps/map1");
 }