public static void Main(string[] args) { bool fullScreen = false; SdlHardware.Init(960, 750, 24, fullScreen); WelcomeScreen w = new WelcomeScreen(); do { w.Run(); if (w.GetChosenOption() == 1) { Game g = new Game(); g.Run(); } else if (w.GetChosenOption() == 2) { HelpScreen help = new HelpScreen(); help.Run(); } else if (w.GetChosenOption() == 3) { CreditsScreen credits = new CreditsScreen(); credits.Run(); } } while (w.GetChosenOption() != 4); }
static void Main(string[] args) { bool fullScreen = false; Hardware.Init(1024, 768, 24, fullScreen); bool finished = false; while (!finished) { WelcomeScreen welcome = new WelcomeScreen(); welcome.Run(); if (welcome.GetOptionChosen() == WelcomeScreen.options.Credits) { CreditsScreen credits = new CreditsScreen(); credits.Run(); } if (welcome.GetOptionChosen() == WelcomeScreen.options.Play) { Game myGame = new Game(); myGame.Run(); GameOverScreen gameEnd = new GameOverScreen(); gameEnd.Run(); } if (welcome.GetOptionChosen() == WelcomeScreen.options.Quit) { finished = true; } } }
static void Main(string[] args) { bool fullScreen = false; Hardware.Init(1024, 768, 24, fullScreen); bool finished = false; while (!finished) { WelcomeScreen welcome = new WelcomeScreen(); welcome.Run(); if (welcome.GetOptionChosen() == WelcomeScreen.options.Credits) { CreditsScreen credits = new CreditsScreen(); credits.Run(); } if (welcome.GetOptionChosen() == WelcomeScreen.options.Play) { // Matrix myMatrix = new Matrix(); //myMatrix.Run(); } if (welcome.GetOptionChosen() == WelcomeScreen.options.Quit) { finished = true; } } }
public static void Main() { bool fullScreen = false; SdlHardware.Init(1024, 720, 24, fullScreen); WelcomeScreen w = new WelcomeScreen(); do { w.Run(); if (w.GetChosenOption() == 1) { Game g = new Game(); g.Run(); } else if (w.GetChosenOption() == 2) { CreditsScreen credits = new CreditsScreen(); credits.Run(); } else if (w.GetChosenOption() == 3) { HelpScreen help = new HelpScreen(); help.Run(); } else if (w.GetChosenOption() == 4) { ScoreBoard sb = new ScoreBoard(); sb.Run(); } } while (w.GetChosenOption() != 5); }
static void Main() { bool fullScreen = false; SdlHardware.Init(1024, 768, 24, fullScreen); WelcomeScreen w = new WelcomeScreen(); do { w.Run(); if (w.GetChosenOption() == WelcomeScreen.OPTION_PLAY) { Game g = new Game(); g.Run(); } else if (w.GetChosenOption() == WelcomeScreen.OPTION_HELP) { HelpScreen help = new HelpScreen(); help.Run(); } else if (w.GetChosenOption() == WelcomeScreen.OPTION_CREDITS) { CreditsScreen credits = new CreditsScreen(); credits.Run(); } }while (w.GetChosenOption() != WelcomeScreen.OPTION_QUIT); }
public void Run() { ConfigureConsole(); bool exit = false; do { PrintBorders(); int option = 1; bool selectedOption = false; do { PrintMenu(option, Spanish); GetChosenOption(ref option, ref selectedOption); } while (!selectedOption); switch (option) { case 1: Calendar calendar = new Calendar(); calendar.Run(); break; case 2: Contacts contacts = new Contacts(); contacts.Run(); break; case 3: TaskToDo tasks = new TaskToDo(); tasks.Run(); break; case 4: Notes notes = new Notes(); notes.Run(); break; case 5: ConfigurationConsole config = new ConfigurationConsole(); config.Run(); break; case 6: CreditsScreen credits = new CreditsScreen(); credits.Run(); break; case 7: Spanish = !Spanish; break; case 0: exit = true; break; default: break; } } while (!exit); }
public void Start() { Hardware hardware = new Hardware(1024, 720, 24, false); WelcomeScreen welcome = new WelcomeScreen(hardware); LanguageSelectScreen languaje = new LanguageSelectScreen(hardware); welcome.Run(); languaje.Run(); MenuScreen menu = new MenuScreen(hardware, languaje.languaje); do { GameScreen game = new GameScreen(hardware); HelpScreen help = new HelpScreen(hardware, languaje.languaje); StatsScreen stats = new StatsScreen(hardware, languaje.languaje); CreditsScreen credits = new CreditsScreen(hardware, languaje.languaje); Player p = Player.GetPlayer(); DateTime begin; DateTime timeEnd; hardware.ClearScreen(); menu.exit = false; menu.option = -1; Console.WriteLine("Menu"); menu.Run(); switch (menu.option) { case 0: help.Run(); begin = DateTime.Now; game.Run(); timeEnd = DateTime.Now; TimeSpan time = timeEnd - begin; GameOverScreen end = new GameOverScreen(hardware, time, languaje.languaje); end.Run(); break; case 1: stats.Run(); break; case 2: credits.Run(); break; } Thread.Sleep(50); } while (menu.option != 3 || hardware.IsKeyPressed(Hardware.KEY_ESC)); }
public void Run() { Hardware hardware = new Hardware(1000, 600, 24, false); WelcomeScreen welcome = new WelcomeScreen(hardware); MenuScreen menu = new MenuScreen(hardware); welcome.Run(); bool exit = false; do { menu.Run(); switch (menu.GetChosenOption()) { case MenuScreen.MenuOption.Game: NumPlayersScreen nps = new NumPlayersScreen(hardware); nps.Run(); GameScreen game = new GameScreen(hardware, nps.NumPlayers, nps.NumsToken); game.Run(); break; case MenuScreen.MenuOption.Load: LoadScreen ls = new LoadScreen(hardware); ls.Run(); break; case MenuScreen.MenuOption.Credits: CreditsScreen cs = new CreditsScreen(hardware); cs.Run(); break; case MenuScreen.MenuOption.ChangeLenguage: ChangeLenguageScreen cls = new ChangeLenguageScreen(hardware); cls.Run(); break; case MenuScreen.MenuOption.Exit: exit = true; break; } }while (!exit); }
static void Main() { bool fullScreen = false; SdlHardware.Init(1024, 700, 24, fullScreen); ChooseLanguage l = new ChooseLanguage(); WelcomeScreen w = new WelcomeScreen(); do { if (l.GetChosenOption() == 0) { l.Run(); } if (l.GetChosenOption() != 0) { w.Run(); if (w.GetChosenOption() == 1) { Game g = new Game(); g.Run(); } else if (w.GetChosenOption() == 2) { Controls controls = new Controls(); controls.Run(); } else if (w.GetChosenOption() == 3) { CreditsScreen credits = new CreditsScreen(); credits.Run(); } else if (w.GetChosenOption() == 5) { Tricks tricks = new Tricks(); tricks.Run(); } } }while (w.GetChosenOption() != 4); }
public void Run() { // TO DO: Create a real Menu, instead of showing all the screens IntroScreen intro = new IntroScreen(); intro.Run(); MenuScreen menu = new MenuScreen(); do { menu.Run(); switch (menu.GetChosenOption()) { case MenuScreen.MenuOption.Game: Game g = new Game(menu.RetroLook); g.Run(); break; case MenuScreen.MenuOption.Help: HelpScreen help = new HelpScreen(menu.RetroLook); help.Run(); break; case MenuScreen.MenuOption.Credits: CreditsScreen credits = new CreditsScreen(menu.RetroLook); credits.Run(); break; case MenuScreen.MenuOption.Scores: HiScoresScreen hiScores = new HiScoresScreen(menu.RetroLook); hiScores.Run(); break; } } while (menu.GetChosenOption() != MenuScreen.MenuOption.Exit); }
public static void Main(string[] args) { SdlHardware.Init(1280, 720, 24, false); LoadingScreen ls = new LoadingScreen(); ls.Run(); WelcomeScreen welcome = new WelcomeScreen(); do { welcome.Run(); if (welcome.GetChosenOption() == WelcomeScreen.OPTION_PLAY) { Game g = new Game(); g.Run(); EndScreen end = new EndScreen(); end.Run(); } else if (welcome.GetChosenOption() == WelcomeScreen.OPTION_HELP) { HelpScreen help = new HelpScreen(); help.Run(); } else if (welcome.GetChosenOption() == WelcomeScreen.OPTION_CREDITS) { CreditsScreen credits = new CreditsScreen(); credits.Run(); } else if (welcome.GetChosenOption() == WelcomeScreen.OPTION_CONFIG) { ConfigScreen config = new ConfigScreen(); config.Run(); } }while (welcome.GetChosenOption() != WelcomeScreen.OPTION_QUIT); }
public void Run() { Console.ForegroundColor = ConsoleColor.Red; string text = "Welcome To DamMan!"; Console.SetCursorPosition(40 - text.Length / 2, 12); Console.WriteLine(text); Console.ReadKey(); Console.Clear(); do { Console.SetCursorPosition(40, 12); Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine("D. Demo"); Console.SetCursorPosition(40, 13); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("H. HighScore"); Console.SetCursorPosition(40, 14); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("C. Credits"); Console.SetCursorPosition(40, 15); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("G. Game"); Console.ResetColor(); char option = Convert.ToChar(Console.ReadLine().ToLower()); switch (option) { case 'd': Console.Clear(); myDemoScreen = new DemoScreen(); myDemoScreen.Run(); Console.Clear(); break; case 'h': Console.Clear(); myHiScoresScreen = new HiScoresScreen(); myHiScoresScreen.Run(); Console.Clear(); break; case 'c': Console.Clear(); myCreditsScreen = new CreditsScreen(); myCreditsScreen.Run(); Console.Clear(); break; case 'g': Console.Clear(); Console.SetCursorPosition(40, 15); Console.ForegroundColor = ConsoleColor.Red; //Console.WriteLine("Bye!"); exit = true; break; default: Console.WriteLine("Wrong Option!"); break; } }while (!exit); }
// The user enter the name player with will be play public void Display() { GameScreen Game; CreditsScreen Credits; HiScoreScreen HiScore; RulesScreen Rules; string option; bool exit = false; do { Console.Clear(); Title(); ShowMenu(); option = Console.ReadLine(); switch (option.ToUpper()) { case "1": Console.Clear(); Game = new GameScreen(); string[] name = UserName(); Game.Run(name); Console.Clear(); break; case "2": Console.Clear(); Console.WriteLine("Not available yet..."); Console.Clear(); Display(); break; case "3": Console.Clear(); Rules = new RulesScreen(); Rules.Display(); Console.Clear(); break; case "4": Console.Clear(); Credits = new CreditsScreen(); Credits.Run(); Console.Clear(); break; case "5": Console.Clear(); HiScore = new HiScoreScreen(); HiScore.Run(); Console.Clear(); break; case "6": DisplayEsp(); break; case "Q": exit = true; Console.WriteLine("See you soon!"); Console.WriteLine(); break; default: Console.Clear(); Title(); ShowMenu(); Console.WriteLine(); Console.WriteLine("Enter a correct option!"); option = Console.ReadLine(); break; } } while (!exit); }