void Update() { if (isLocalPlayer) { inputState.Update(input); } }
/// <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); }
/// <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); }