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(); }
private void SetActiveScreen(GameScreen gameScreen) { _activeScreen.Hide(); _activeScreen = gameScreen; _activeScreen.Show(); }