private void LoadNextLevel() { if (levelIndex == MaxLevelIndex) { SimpleScreen s = new SimpleScreen(ScreenType.GameOver); s.score = level.Score; s.prevScore = level.PreviousScore; ScreenManager.AddScreen(s, null); return; } if (!loadedScoreScreen && level != null) { loadedScoreScreen = true; SimpleScreen s = new SimpleScreen(ScreenType.Inter); s.score = level.Score; s.prevScore= level.PreviousScore; ScreenManager.AddScreen(s, null); return; } loadedScoreScreen = false; timeToLoadNextLevel = 0; int previousScore = 0; // Unloads the content for the current level before loading the next one. if (level != null) { previousScore = level.PreviousScore + level.Score; level.Dispose(); } // Load the level. level = new Level(ScreenManager.GameContent, levelIndex, (int)previousScore); ++levelIndex; }
private void LoadNextLevel() { if (level != null) level.Dispose(); // Load the level. level = new Level(ScreenManager.GameContent); load = true; }
private void LoadNextLevel() { if (levelIndex == MaxLevelIndex) { LoadingScreen.Load(ScreenManager, false, null, new QuickMenuScreen()); return; } // Unloads the content for the current level before loading the next one. if (level != null) level.Dispose(); // Load the level. level = new Level(gameContent, levelIndex); gameContent.levelIndex = levelIndex; ++levelIndex; load = true; ScreenManager.AddScreen(new PauseMenuScreen(), ControllingPlayer); }
private void LoadNextLevel() { // Unloads the content for the current level before loading the next one. if (level != null) { // Update Score prevScore += level.Score + level.Bonus; tempScore = 0; level.Dispose(); } // Load the level. level = new Level(ScreenManager, levelIndex); levelIndex += 1; m = null; }
private void LoadNextLevel() { if (levelIndex == MaxLevelIndex) { //LoadingScreen.Load(ScreenManager, false, null, new QuickMenuScreen()); //LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen()); LevelUpScreen l = new LevelUpScreen(true, false); l.totalScore = prevScore; l.totalStar = starCount; l.Accepted += GameOverAccepted; ScreenManager.AddScreen(l, null); return; } // Unloads the content for the current level before loading the next one. if (level != null) level.Dispose(); // Load the level. level = new Level(ScreenManager, levelIndex); ++levelIndex; load = true; //ScreenManager.AddScreen(new PauseMenuScreen(), ControllingPlayer); }
private void LoadNextLevel() { if (levelIndex == maxLevelIndex) { score = level.Score; if (!gameOverOverlayIsUp) { gameOverOverlayIsUp = true; return; } ScreenManager.AddScreen(new BackgroundScreen(), ControllingPlayer); ScreenManager.AddScreen(new MainMenuScreen(), ControllingPlayer); ExitScreen(); return; } score = 0; // Unloads the content for the current level before loading the next one. if (level != null) { score = level.Score; level.Dispose(); } // Load the level. level = new Level(content, levelIndex, (int)score); ++levelIndex; }
private void LoadNextLevel() { if (levelIndex == MaxLevelIndex) { score = level.Score; LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen()); return; } score = 0; // Unloads the content for the current level before loading the next one. if (level != null) { score = level.Score; level.Dispose(); } // Load the level. level = new Level(ScreenManager.GameContent, levelIndex, (int)score); ++levelIndex; }
public override void LoadContent() { base.LoadContent(); gameContent = ScreenManager.GameContent; maxEntries = gameContent.labEquipButtons.Length; gameContent.levelIndex = -1; level = new Level(gameContent); eqipFooters = gameContent.content.Load<List<string>>("Graphics/labEquipFooters"); AddEntries(); }
private void LoadNextLevel() { // Unloads the content for the current level before loading the next one. if (level != null) { // Update Score prevScore = Score; tempScore = prevScore; level.Dispose(); } // Load the level. level = new Level(ScreenManager, levelIndex); levelIndex += 1; m = null; ScreenManager.AddScreen(new PauseMenuScreen(), ControllingPlayer); }