internal void Update(GameTime gameTime) { if (IsMouseVisible != Game.IsMouseVisible) { Game.IsMouseVisible = IsMouseVisible; } Cursor.Current = ActualCursor; if (ToggleFullScreenRequested) { SynchronizeGraphicsDeviceManager(); ToggleFullScreenRequested = false; Viewer.DefaultViewport = GraphicsDevice.Viewport; } if (gameTime.TotalRealTime.TotalSeconds > 0.001) { Game.UpdaterProcess.WaitTillFinished(); // Must be done in XNA Game thread. UserInput.Update(Game); // Swap frames and start the next update (non-threaded updater does the whole update). SwapFrames(ref CurrentFrame, ref NextFrame); Game.UpdaterProcess.StartUpdate(NextFrame, gameTime.TotalRealTime.TotalSeconds); } }
void Update() { input.Update(); UpdatePhysics(); UpdateAnimation(); ResetVariables(); }
protected override void Update(GameTime gameTime) { UserInput.Update(gameTime); Sounds.Update(gameTime); GameScreen newScreen = GameScreen.Current.Update(gameTime); if (newScreen != GameScreen.Current) { GameScreen.SwitchTo(newScreen); } base.Update(gameTime); }
protected override void Update(GameTime gameTime) { GV.WindowFocused = this.IsActive; GV.GameTime = gameTime; //Update Screens scrnMngr.Update(); //Update Input UserInput.Update(); base.Update(gameTime); }