예제 #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="gameTime"></param>
        public override void HandleInput(Microsoft.Xna.Framework.GameTime gameTime)
        {
            base.HandleInput(gameTime);
            foreach (var player in _level.Players)
                player.Controller.Update(gameTime);

            if (_pauseEnabled && this.InputManager.Keyboard.IsKeyReleased(Microsoft.Xna.Framework.Input.Keys.Escape))
            {
                _pause = new PauseScreen(_level);
                _pause.Exited += new EventHandler(_pause_Exited);
                _pauseEnabled = false;

                this.ScreenManager.AddScreen(_pause);
                this.AudioManager.Play("confirm");
            }
        }
예제 #2
0
        /// <summary>
        /// After screen is added to the screenmanager
        /// </summary>
        public override void PostProcessing()
        {
            base.PostProcessing();

            _hud = new HeadsUpDisplayPopup(_level);
            this.ScreenManager.AddScreen(_hud);
            this.Exiting += new EventHandler(PlayingScreen_Exiting);

            _pause = new PauseScreen(_level);
            _pauseEnabled = true;
        }