public void CheckCollisions() { foreach (Ghost g in Enemies) { if (EnemyPlayerCollision(g)) { if (Player.Super) { g.Dead = true; } else if (!g.Dead) { Lost(); break; } } } if (State == PlayState.Lost) { //LoadLevel(); LoadObjects(); Show(); int y = System.Console.BufferHeight / 2 - 5; FigletText go = new FigletText(36, y, "lo", false, ConsoleColor.Magenta); Drawing.DrawBorder(new Point(35, y - 1), new Size(40, 8), ConsoleColor.White, ConsoleColor.DarkMagenta); } }
public void Show() { System.Console.Clear(); FigletText pacman = new FigletText(35, 1, "pacman", true, ConsoleColor.Yellow); Entrys[0] = new MenuEntry("New game", 25, true); Entrys[1] = new MenuEntry("Settings", 26, false); Entrys[2] = new MenuEntry("Hall of Fame", 27, false); Entrys[3] = new MenuEntry("Help", 28, false); Entrys[4] = new MenuEntry("Exit", 30, false); ShowMain(); }
public void Pause() { State = PlayState.Pause; WriteLevelInfo(); int y = System.Console.BufferHeight / 2 - 5; FigletText Plogo = new FigletText(40, y, "pause", false, ConsoleColor.DarkMagenta); Drawing.DrawBorder(new Point(39, y-1), new Size(31, 8), ConsoleColor.Blue, ConsoleColor.DarkBlue); }
public void GameOver() { Console.ResetColor(); State = PlayState.Dead; WriteInfo(); int y = System.Console.BufferHeight / 2 - 5; FigletText go = new FigletText(28, y, "go", false, ConsoleColor.Red); Drawing.DrawBorder(new Point(27, y - 1), new Size(54, 8), ConsoleColor.White, ConsoleColor.DarkRed); WriteLevelInfo(); NewRecord(); }