public Status(string s, int lvl, int tLft, ConsoleForeground cF, ConsoleBackground cB) { name = s; level = lvl; timeLeft = tLft; colorFore = cF; colorBack = cB; }
public Status(string s, int lvl, Boolean perm, ConsoleForeground cF, ConsoleBackground cB) { name = s; level = lvl; colorFore = cF; colorBack = cB; permanent = perm; if (perm) { timeLeft = 1; } }
public ConsoleForeground hungerColor(int x) { ConsoleForeground[] colors = new ConsoleForeground[] { ConsoleForeground.Maroon, ConsoleForeground.Maroon, ConsoleForeground.Red, ConsoleForeground.Red, ConsoleForeground.Red, ConsoleForeground.Green, ConsoleForeground.Green, ConsoleForeground.Olive, ConsoleForeground.Olive, ConsoleForeground.DarkGreen, ConsoleForeground.DarkGreen, ConsoleForeground.DarkGreen }; return(colors[x]); }
public static void TextColor(ConsoleForeground foreground, ConsoleBackground background) { CurrentConsolePen = (int)foreground + (int)background; SetConsoleTextAttribute(hConsoleOutput, CurrentConsolePen); }
public ConsoleForeground hungerColor(int x) { ConsoleForeground[] colors = new ConsoleForeground[] { ConsoleForeground.Maroon, ConsoleForeground.Maroon, ConsoleForeground.Red, ConsoleForeground.Red, ConsoleForeground.Red, ConsoleForeground.Green, ConsoleForeground.Green, ConsoleForeground.Olive, ConsoleForeground.Olive, ConsoleForeground.DarkGreen, ConsoleForeground.DarkGreen, ConsoleForeground.DarkGreen }; return colors[x]; }
/// <summary> /// Sets the console pen color to that specified. /// </summary> /// <param name="foreground">A foreground color specified from the /// ConsoleForeground enumeration</param> /// <param name="background">A background color specified from the /// ConsoleBackground enumeration</param> public static void TextColor(ConsoleForeground foreground, ConsoleBackground background) { CurrentConsolePen = (int)foreground + (int)background; SetConsoleTextAttribute(hConsoleOutput, CurrentConsolePen); }