Example #1
0
        char GetSymbol(IIMapObject type)
        {
            Console.BackgroundColor = ConsoleColor.DarkGray;
            Console.OutputEncoding  = Encoding.Unicode;
            if (type != null)
            {
                switch (type.GetType().FullName)
                {
                default:
                    break;

                case "Logic.Classes.Player":
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    return('\u263B');    //Player

                case "Logic.Classes.Walls.Tree":
                    Console.ForegroundColor = ConsoleColor.White;
                    return('\u25B2');    //tree

                case "Logic.Classes.Walls.Rock":
                    Console.ForegroundColor = ConsoleColor.Black;
                    return('\u25B2');    //rock

                case "Logic.Classes.Items.Cherry":
                    Console.ForegroundColor = ConsoleColor.Cyan;
                    return('\u058D');    //cherry

                case "Logic.Classes.Items.Apple":
                    Console.ForegroundColor = ConsoleColor.Blue;
                    return('\u058D');    //apple

                case "Logic.Classes.Enemies.Wolf":
                    Console.ForegroundColor = ConsoleColor.DarkRed;
                    return('\u25BC');    //wolf

                case "Logic.Classes.Enemies.Bear":
                    Console.ForegroundColor = ConsoleColor.Red;
                    return('\u25BC');    //bear
                }
            }
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            return(' ');
        }
Example #2
0
 void WriteSymbol(IIMapObject type)
 {
     Console.Write(GetSymbol(type));
     Console.BackgroundColor = ConsoleColor.Black;
     Console.ForegroundColor = ConsoleColor.Gray;
 }