Пример #1
0
 void Update()
 {
     if (isLocalPlayer)
     {
         inputState.Update(input);
     }
 }
Пример #2
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            _inputState.Update(gameTime.ElapsedGameTime, Keyboard.GetState(), Mouse.GetState());
            _inputMapper.HandleInput(_inputState);

            //Debug.WriteLine(Stopwatch.StartNew().Measure(() => _mainPresenter.Update(gameTime.ElapsedGameTime)));
            _updateMarker.Begin();
            _mainPresenter.Update(gameTime.ElapsedGameTime);
            _updateMarker.End();

            base.Update(gameTime);
        }
Пример #3
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            _inputState.Update(gameTime.ElapsedGameTime, Keyboard.GetState(), Mouse.GetState());
            _inputMapper.HandleInput(_inputState);

            //Debug.WriteLine(Stopwatch.StartNew().Measure(() => _mainPresenter.Update(gameTime.ElapsedGameTime)));
            using (Markers.EnterSpan("Update pass"))
            {
                _mainPresenter.Update(gameTime.ElapsedGameTime);
            }

            base.Update(gameTime);
        }