public override void Update(GameTime gameTime) { KeyboardState keyboardState = Keyboard.GetState(); if (keyboardState.IsKeyDown(Keys.Space) && lastKeyboardState.IsKeyUp(Keys.Space) || MediaPlayer.State == MediaState.Stopped) { AudioManager.StopSoundTrack(); ScreenManager.Instance.AddScreen(new HistoriaScreen(graphics)); } particleText.Update(); lastKeyboardState = keyboardState; }
public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { //play title music for main menus screen //stop if other screens have focus if (otherScreenHasFocus.Equals(false)) { // if (AudioManager.IsInitialized.Equals(true)) // AudioManager.PlaySound("titlemusic"); //todo // MediaPlayer.Play(titlesong); } else { // AudioManager.StopSound("titlemusic"); // MediaPlayer.Stop(); } particleText.Update(); base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); }