public override void Update(GameTime gameTime) { foreach (GameObject g in UpdateChildren) { g.Update(gameTime); } #if EDITOR && WINDOWS if (KeyboardManager.KeyJustPressed(Keys.F2)) { deferredControls.Cycle(); } #endif base.Update(gameTime); UpdateEditor(gameTime); }
public static void Update(GameTime gameTime) { if (performanceDisplay != PerformanceDisplay.None) { elapsedTime += gameTime.ElapsedGameTime; if (elapsedTime > TimeSpan.FromSeconds(1)) { elapsedTime -= TimeSpan.FromSeconds(1); frameRate = frameCounter; frameCounter = 0; } } #if WINDOWS if (KeyboardManager.KeyJustPressed(Keys.F1)) #endif #if XBOX if (PlayerProfile.getController(0) != null && PlayerProfile.getController(0).StartButton() && !PlayerProfile.getController(0).StartButton()) #endif performanceDisplay = performanceDisplay == PerformanceDisplay.Extended ? PerformanceDisplay.None : performanceDisplay + 1; }