Beispiel #1
0
        protected override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
            _inputSystem.Update();
            _collisionManager.Update();

            if (!_screenManager.Update(gameTime))
            {
                Exit();
            }
            _notificationBarOverlay.Update(gameTime);
        }
Beispiel #2
0
        public override StateChangeInformation OnUpdate(float elapsedTime)
        {
            base.OnUpdate(elapsedTime);

            _stateChangeInformation = StateChangeInformation.Empty;

            _splash.Update(elapsedTime);
            if (!_splash.Running)
            {
                _mainOverlay.Update(new GameTime(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(elapsedTime)));
            }

            return(_stateChangeInformation);
        }
Beispiel #3
0
        public void OnUpdate(GameTime gameTime)
        {
            ActiveWorld.Update(gameTime);
            _renderStatisticsOverlay.Update(gameTime);

            lock (_uiElements)
                _uiElements.ForEach(e => { if (e.IsActive)
                                           {
                                               e.Update(gameTime);
                                           }
                                    });

            if (_inputSystem.Keyboard.IsKeyDown(Keys.Escape))
            {
                _screenManager.SetScreen(typeof(MainMenuScreen), typeof(BlendTransition));
            }

            if (_inputSystem.Keyboard.IsKeyDownOnce(Keys.L))
            {
                _sceneRenderer.EnablePostProcessing = !_sceneRenderer.EnablePostProcessing;
            }

            if (_inputSystem.Keyboard.IsKeyDownOnce(Keys.F12))
            {
                _showRenderStatistics = !_showRenderStatistics;
                if (_showRenderStatistics)
                {
                    _renderStatisticsOverlay.Show();
                }
                else
                {
                    _renderStatisticsOverlay.Hide();
                }
            }

            if (_inputSystem.Keyboard.IsKeyDownOnce(Keys.X) || _inputSystem.GamePad.IsButtonDownOnce(Buttons.X))
            {
                _screenManager.SetScreen(typeof(GameMenu.GameMenuScreen));
            }
        }
Beispiel #4
0
 public void OnUpdate(GameTime gameTime)
 {
     _mainOverlay.Update(gameTime);
 }