protected override void customMenuActivate(Microsoft.Xna.Framework.Content.ContentManager content) { // Load GameState GameState = new savegame(); GameState.LoadGameState(); // Load Highscore Highscore = new highscore(); if (Highscore.isInHighscore(GameState.ts, GameState.LevelID)) { Highscore.addHighscoreEntry(GameState.LevelID, GameState.ts); } GameState.ResetGameState(); base.customMenuActivate(content); }
/// <summary> /// The Method which is call if the user hits the next button /// </summary> public void OnCancel() { // Switch through the levels switch (levelID) { case 1: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level2()); break; case 2: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level3()); break; case 3: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level4()); break; case 4: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level5()); break; case 5: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level6()); break; case 6: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level7()); break; case 7: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level8()); break; case 8: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level9()); break; case 9: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level10()); break; case 10: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level11()); break; //case 11: // LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new level12()); // break; case 11: LoadingScreen.Load(ScreenManager, false, PlayerIndex.One, new BackgroundScreen(), new lastLevel()); break; default: Highscore = new highscore(); if (Highscore.isInHighscore(SaveGame.ts, SaveGame.LevelID)) { Highscore.addHighscoreEntry(SaveGame.LevelID, SaveGame.ts); } SaveGame.ResetGameState(); LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new PhoneMainMenuScreen()); break; } }