Exemple #1
0
 public void Update()
 {
     if (!SuppressEliminationMessage)
     {
         if (Players.Count == 1)
         {
             if (Players[0].IsDead && BaseLoc.TeamBed.destroyed)
             {
                 Eliminated = true;
                 CCM.WriteLineMultiColor(new string[] { "------------------\n\n >", DisplayColor.ToString(), " team has been eliminated!\n\n------------------" }, new ConsoleColor[] { ConsoleColor.White, DisplayColor, ConsoleColor.White });
             }
         }
         else
         {
             CCM.WriteLineMultiColor(new string[] { "------------------\n\n >", DisplayColor.ToString(), " team has been eliminated!\n\n------------------" }, new ConsoleColor[] { ConsoleColor.White, DisplayColor, ConsoleColor.White });
             Eliminated = true;
         }
     }
 }
Exemple #2
0
        public List <string> Search(string input)
        {
            List <string> results     = new List <string>();
            List <string> ItemStrings = new List <string>();
            List <char>   InputUpper  = new List <char>();

            try
            {
                foreach (char i in input.ToUpper())
                {
                    if (DebugMode)
                    {
                        Console.WriteLine(i);
                    }
                    InputUpper.Add(i);
                }
                foreach (string a in items)
                {
                    ItemStrings.Add(a.ToUpper());
                    if (DebugMode)
                    {
                        Console.WriteLine(a);
                    }
                }
                foreach (string a in items)
                {
                    if (DebugMode)
                    {
                        Console.WriteLine(a);
                    }
                    string first2input = input.Length >= 2 ? InputUpper[0] + InputUpper[1].ToString() : InputUpper[0].ToString();
                    string first2a     = a[0] + a[1].ToString();
                    if (DebugMode)
                    {
                        Console.WriteLine("first2input:{1}\nfirst2a:{0}", first2a, first2input);
                    }
                    bool test = (first2a.ToUpper() == first2input.ToUpper() || first2a.ToUpper()[0] == first2input.ToUpper()[0]);
                    if (first2a.ToUpper() == first2input.ToUpper() || first2a.ToUpper()[0] == first2input.ToUpper()[0])
                    {
                        if (DebugMode && test)
                        {
                            ConsoleColor[] foo2 = { ConsoleColor.White, ConsoleColor.Green };
                            string[]       foo  = { "first2a.ToUpper() == first2input.ToUpper() || first2a.ToUpper()[0] == first2input.ToUpper()[0] = ", string.Format("{0}", test) };
                            ColorConsoleMethods.WriteLineMultiColor(foo, foo2);
                        }
                        results.Add(a);
                    }
                    else
                    {
                        if (DebugMode)
                        {
                            ConsoleColor[] foo2 = { ConsoleColor.White, ConsoleColor.Red };
                            string[]       foo  = { "first2a.ToUpper() == first2input.ToUpper() || first2a.ToUpper()[0] == first2input.ToUpper()[0] = ", string.Format("{0}", test) };
                            ColorConsoleMethods.WriteLineMultiColor(foo, foo2);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                ColorConsoleMethods.WriteLineColor(e.Message, ConsoleColor.Red);
            }
            if (DebugMode)
            {
                Console.WriteLine("\n\n\nReturning results...\n\n\n");
            }
            return(results);
        }
Exemple #3
0
 public static void PrintPlayerNameWithFormattingPlusMoreText(Player p, string text)
 {
     CCM.WriteLineMultiColor(new string[] { "[" + p.Name + "]", "," + text }, new ConsoleColor[] { p.CurrentTeam.DisplayColor, ConsoleColor.White });
 }