protected override void LoadContent() { _gamePlaySong = Content.Load <Song>("Sounds\\battle"); _menuSong = Content.Load <Song>("Sounds\\menu_song2"); _dead = Content.Load <Song>("Sounds\\defeat"); MediaPlayer.IsRepeating = true; MediaPlayer.Play(_menuSong); _menuClickSelected = Content.Load <SoundEffect>("Sounds\\button-25"); _spriteBatch = new SpriteBatch(GraphicsDevice); _gameIsOn = false; SetScreenSize(); _gameOverScreen = new GameOverScreen(this, _spriteBatch, Content.Load <SpriteFont>("menufont"), Content.Load <Texture2D>("gameover_screen")); Components.Add(_gameOverScreen); _gameOverScreen.Hide(); _startScreen = new StartScreen(this, _spriteBatch, Content.Load <SpriteFont>("menufont"), Content.Load <Texture2D>("splash_screen")); Components.Add(_startScreen); _startScreen.Hide(); _actionScreen = new ActionScreen(this, _spriteBatch, Content.Load <Texture2D>("Levels\\level1_background")); Components.Add(_actionScreen); _actionScreen.Hide(); //_activeScreen = _gameOverScreen; //_gameOverScreen.SetScoreText(); _activeScreen = _startScreen; _activeScreen.Show(); }
void OnMouseUpAsButton() { GameOverScreen.Hide(); GameState.ResetPlayer(); GameState.LevelReset(); GameState.GameReset(); GameState.CurrentMode = GameState.PlayMode.Started; SoundBoard.PlayCard(); }
/// <summary> /// Setup screens and put them in their default state /// </summary> private void SetupScreens() { // Make sure that the screens are hidden but ready to be used RewardScreenManager.gameObject.SetActive(true); RewardScreenManager.Hide(); PlayerChoosingRewardsGameObject.SetActive(false); SwitchingRolesPrompt.SetActive(false); GameOverScreen.gameObject.SetActive(true); GameOverScreen.Hide(); GameOver = false; CharacterSelectionScreen.SetActive(false); HowToPlayScreen.SetActive(false); LessonSelectScreen.SetActive(false); WaitingForPlayersPrompt.gameObject.SetActive(false); LevelInfo.SetActive(true); TitleScreen.SetActive(false); }
public void CleanUpScene() { GameSlowMo = false; gameHUD.Hide(); for (int i = 0; i < m_enemies.Count; i++) { Destroy(m_enemies[i].gameObject); } m_enemies.Clear(); m_enemyCount = 0; maxNumOfEnemies = 1; if (player != null) { Destroy(player.gameObject); } gameOverScreen.Hide(); m_gameOver = false; m_gamePaused = false; CancelInvoke(); }
public void HideAllScreens() { introScreen.Hide(); gameOverScreen.Hide(); hudScreen.Hide(); }
void onBackToMenu() { _gameOverScreen.Hide(); _mainScreen.Show(); _gameScreen.Hide(); }