/// <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) { SettingsManager.Instance.Update(); ScreenManager.Instance.Update(gameTime); if (IsActive) { InputManager.Instance.Update(); } else { InputManager.Instance.ResetInputStates(); } fpsIndicator.Update(gameTime); cursor.Update(gameTime); 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) { LogManager.Instance.Update(gameTime.ElapsedGameTime); SettingsManager.Instance.Update(); ScreenManager.Instance.Update(gameTime); if (IsActive) { InputManager.Instance.Update(); } else // TODO: It shouldn't reset them every single tick when the window's not active { InputManager.Instance.ResetInputStates(); } fpsIndicator.Update(gameTime); cursor.Update(gameTime); base.Update(gameTime); }