Example #1
0
        protected override void Update(GameTime gameTime)
        {
            inputManager.Update(gameTime);
            if (inputManager.IsExit)
            {
                Exit();
            }

            var deltaTimes = GetDeltaTimes(gameTime);

            if (Config.DebugMode)
            {
                _debugOverlay.Update(deltaTimes);
            }
            state?.Update(deltaTimes);
            base.Update(gameTime);
        }
Example #2
0
        protected override void Update(GameTime gameTime)
        {
            var deltaTimes = GetDeltaTimes(gameTime);

            _input.Update(deltaTimes.DeltaTime);
            if (false)
            {
                Exit();
            }

            if (Config.DebugMode)
            {
                _debugOverlay.Update(deltaTimes);
            }
            state?.Update(deltaTimes);
            base.Update(gameTime);
        }
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            // TODO: Add your update logic here

            base.Update(gameTime);
            inputManager.CaptureInput(gameTime);
            GameParameters.Update(gameTime);
            map.Update(gameTime);
            debugInfo.Update(recto, map, resolution, _graphics, GraphicsDevice.DisplayMode);
            elapsedMiliseconds += gameTime.ElapsedGameTime.TotalMilliseconds;
            debugOverlay.Update(debugInfo);

            if (elapsedMiliseconds > 1000)
            {
                RefreshFPSVariables();
            }

            ++updateCounter;
        }