public static void ShowHighScoresMenu(this Game game)
 {
     game.CleanupComponents();
     var menu = new HighScoresMenu(game);
     menu.Back += game.ShowMainMenu;
     game.Components.Add(menu);
 }
 public static void ResumeGame(this Game game)
 {
     game.CleanupComponents();
     var mainGame = new MainGameComponent(game, false, GameDifficulty.Easy);
     mainGame.Back += game.ShowMainMenu;
     game.Components.Add(mainGame);
 }
 public static void ShowEndMenu(this Game game, bool isWinner)
 {
     game.CleanupComponents();
     var endMenu = new EndGameMenu(game, isWinner);
     endMenu.restart += game.ShowNewGameMenu;
     endMenu.menu += game.ShowMainMenu;
     game.Components.Add(endMenu);
 }
 public static void StartGame(this Game game)
 {
     game.CleanupComponents();
     var mainGame = new Manager(game);
     mainGame.win += () => game.EndGame(true);
     mainGame.loose += () => game.EndGame(false);
     game.Components.Add(mainGame);
 }
 public static void EndGame(this Game game, bool win)
 {
     game.CleanupComponents();
     var endMenu = new EndGameMenu(game, win);
     endMenu.restart += game.StartGame;
     endMenu.menu += game.ShowMainMenu;
     game.Components.Add(endMenu);
 }
 public static void ShowMainMenu(this Game game)
 {
     game.CleanupComponents();
     var menu = new MainMenu(game);
     menu.loadContent();
     menu.playGame += game.StartGame;
     menu.quit += game.Exit;
     game.Components.Add(menu);
 }
Exemple #7
0
        public static void ShowCredits(this MainGame game)
        {
            game.CleanupComponents();

            var menu = new CreditsMenu(game);
            menu.Back += game.ShowMainMenu;

            game.Components.Add(menu);
        }
        public static void ShowLogoScreen(this Game game, SpriteBatch spriteBatch)
        {
            var isTrial = Guide.IsTrialMode;

            game.CleanupComponents();
            var logo_screen = new LogoScreen(game, () => { game.ShowMainMenu();
                if (isTrial) game.Components.Add(new TrialComponent(game, spriteBatch, 120, "triangleshooter")); },
                "Textures/vst_logo");
            game.Components.Add(logo_screen);
        }
 public static void ShowNewGameMenu(this Game game)
 {
     game.CleanupComponents();
     var menu = new NewGameMenu(game);
     menu.Back += game.ShowMainMenu;
     menu.Easy += () => game.StartGame(GameDifficulty.Easy);
     menu.Medium += () => game.StartGame(GameDifficulty.Normal);
     menu.Hard += () => game.StartGame(GameDifficulty.Hard);
     game.Components.Add(menu);
 }
 public static void ShowMainMenu(this Game game)
 {
     game.CleanupComponents();
     var menu = new MainMenu(game);
     menu.Exit += game.Exit;
     menu.NewGame += game.ShowNewGameMenu;
     menu.ResumeGame += game.ResumeGame;
     menu.HighScores += game.ShowHighScoresMenu;
     game.Components.Add(menu);
 }
Exemple #11
0
        public static void ResumeGame(this MainGame game)
        {
            game.CleanupComponents();

            var mainGame = new MainGameComponent(game, false, 0);
            mainGame.Back += game.ShowMainMenu;
            mainGame.Win += () => game.ShowEndMenu(true);

            game.Components.Add(mainGame);
        }
Exemple #12
0
        public static void ShowEndMenu(this MainGame game, bool isWinner)
        {
            game.CleanupComponents();

            var endMenu = new EndGameMenu(game, isWinner);
            endMenu.restart += () => game.StartGame(false, 0);
            endMenu.menu += game.ShowMainMenu;
            endMenu.Exit += game.Exit;

            game.Components.Add(endMenu);
        }
Exemple #13
0
        public static void ShowLevelMenu(this MainGame game)
        {
            game.CleanupComponents();
            var menu = new SelectionLevelMenu(game);

            menu.Back += game.ShowMainMenu;
            menu.Exit += game.Exit;

            for (int i = 0; i < menu.action_Levels.Count(); ++i)
            {
                menu.action_Levels[i] += () => game.StartGame(true, i);
            }
            game.Components.Add(menu);
        }
Exemple #14
0
        public static void ShowMainMenu(this MainGame game)
        {
            game.CleanupComponents();
            var menu = new MainMenu(game);

            menu.Exit += game.Exit;
            menu.NewGame += () => game.ShowLevelMenu();
            menu.ResumeGame += game.ResumeGame;
            menu.Credits += game.ShowCredits;

            game.Components.Add(menu);
        }
Exemple #15
0
 public static void ShowLogoScreen(this MainGame game, SpriteBatch spriteBatch)
 {
     game.CleanupComponents();
 }
Exemple #16
0
 public static void StartGame(this Game game, GameDifficulty difficulty)
 {
     game.CleanupComponents();
     var mainGame = new MainGameComponent(game, true, difficulty);
     mainGame.Back += game.ShowMainMenu;
     game.Components.Add(mainGame);
 }
Exemple #17
0
        public static void StartGame(this MainGame game, bool forceNewgame, int selcetedLevel)
        {
            game.CleanupComponents();

            var mainGame = new MainGameComponent(game, forceNewgame, selcetedLevel);
            mainGame.Back += game.ShowMainMenu;
            mainGame.Win += () => game.ShowEndMenu(true);

            game.Components.Add(mainGame);
        }
 public static void StartGame(this Game game, GameDifficulty difficulty)
 {
     game.CleanupComponents();
     var mainGame = new MainGameComponent(game, true, difficulty);
     mainGame.Back += game.ShowMainMenu;
     mainGame.Win += () => game.ShowEndMenu(true);
     mainGame.Lose += () => game.ShowEndMenu(false);
     game.Components.Add(mainGame);
 }