protected override void Draw(GameTime time) { GraphicsDevice.SetRenderTarget(null); GraphicsDevice.Viewport = Viewport; //GraphicsDevice.Clear(new Color(30, 30, 30)); GraphicsDevice.Clear(new Color(5, 5, 5)); Screen.Update(); Time.UpdateDraw(time); if (CurrentScene != null) { //MDraw.Begin(); //CurrentScene.Draw(); //MDraw.End(); } //Physics.Draw(); GuiManager.Draw(); DebugGUI_Inputs.Draw(); quickTest.Draw(); //DrawWindowDebugPoints(); //DrawFPS(); base.Draw(time); lastTimeOfDraw = Time.ExactTimeSinceStartup; }
protected override void Update(GameTime time) { Time.Update(time); InputManager.Update(); DebugGUI_Inputs.Update(); DebugCameraController.Update(); GuiManager.Update(); if (InputManager.Quit.JustPressed) { Exit(); } if (InputManager.Any.Enter.JustPressed) { IsPaused = !IsPaused; } if (InputManager.ClearConsole.JustPressed) { Console.Clear(); } if (InputManager.TestLoadBindings.JustPressed) { InputManager.LoadBindings(); } if (InputManager.TestLoadBindingsDef.JustPressed) { InputManager.LoadDefaultBindings(); } if (InputManager.TestSaveBindings.JustPressed) { InputManager.SaveBindings(); } quickTest.Update(); if (IsPaused) { base.Update(time); return; } if (CurrentScene != null) { CurrentScene.PreUpdate(); CurrentScene.Update(); CurrentScene.PostUpdate(); } if (Time.TotalTime > 0.5f) { //Physics.Update(); } base.Update(time); }