コード例 #1
0
        public void Look()
        {
            Console.ForegroundColor = ConsoleColor.Magenta;
            Graphics.LookSeperator(this.name);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.White;
            Graphics.PrintPadded(this.description, 4);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.ForegroundColor = ConsoleColor.Magenta;
            Graphics.PrintPadded("In this room:", 4);
            foreach (IEntity entity in entities)
            {
                switch (entity.EntityType)
                {
                case EntityType.Character:
                    Console.ForegroundColor = ConsoleColor.Cyan;
                    Graphics.PrintSpace(4);
                    break;

                case EntityType.Thing:
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    Graphics.PrintPaddedN(NLP.Article(entity.Name, true), 5);
                    break;

                case EntityType.Item:
                    Console.ForegroundColor = ConsoleColor.Green;
                    Graphics.PrintPaddedN(NLP.Article(entity.Name, true), 5);
                    break;
                }
                Console.WriteLine(" " + entity.Name, 5);
            }
            Console.ResetColor();
        }
コード例 #2
0
        public void Look()
        {
            Console.ForegroundColor = ConsoleColor.Cyan;
            Graphics.LookSeperator(this.Name);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.White;
            Graphics.PrintPadded(this.charData.nd.Description, 4);
            Console.ResetColor();

            Console.ForegroundColor = ConsoleColor.Magenta;
            Graphics.PrintPadded(NLP.ExpandText("{E} has:", this.personalityData.genderData), 4);
            for (int i = 0; i < this.Slots.Length; i++)
            {
                if (this.Slots[i] != null)
                {
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    try
                    {
                        switch (this.Slots[i].ItemData.EquipmentType)
                        {
                        case EquipmentType.Weapon:
                            Console.ForegroundColor = ConsoleColor.Cyan;
                            break;

                        case EquipmentType.Gear:
                            Console.ForegroundColor = ConsoleColor.Green;
                            break;
                        }
                    }
                    catch { }

                    Graphics.PrintPaddedN(" " + NLP.Article(this.Slots[i].Name, true) + " " + this.Slots[i].Name, 5);
                    if (i == 0)
                    {
                        Console.Write(NLP.ExpandText(" ({s} weapon)", this.personalityData.genderData));
                    }
                    else if (i == 1)
                    {
                        Console.Write(NLP.ExpandText(" ({s} gear)", this.personalityData.genderData));
                    }
                    Console.WriteLine();
                }
                else
                {
                    if (i == 0)
                    {
                        Console.ForegroundColor = ConsoleColor.Cyan;
                        Graphics.PrintPadded("<No weapon>", 5);
                    }
                    else if (i == 1)
                    {
                        Console.ForegroundColor = ConsoleColor.Green;
                        Graphics.PrintPadded("<No gear>", 5);
                    }
                }
            }
            Console.ResetColor();
        }