예제 #1
0
 public void Draw(int[,] Map, PositionStruct playerPositin)
 {
     Console.Clear();
     Console.CursorVisible = false;
     DrawMargin();
     DrawMap(Map);
     DrawAtPosition(playerPositin, ConsoleColor.Yellow, PlayerChar);
 }
예제 #2
0
        /// <summary>
        /// draw text at position with specific color
        /// </summary>
        /// <param name="position"></param>
        /// <param name="color"></param>
        /// <param name="text"></param>
        private void DrawAtPosition(PositionStruct position, ConsoleColor color, char text)
        {
            Console.CursorVisible = false;
            var previousColor = Console.ForegroundColor;

            Console.ForegroundColor = color;
            SetCursore(position.Width, position.Height);
            Console.Write(text);
            Console.ForegroundColor = previousColor;
        }