protected override void Update(GameTime gameTime) { lastGameTime = gameTime; lastDT = (float)lastGameTime.ElapsedGameTime.TotalSeconds; // update our input OnBeforeInputUpdate?.Invoke(); Input.Update(); // update the UI UI.UpdateUI(); // update our game logic OnBeforeLogicUpdate?.Invoke(); Behavior.UpdateAllBehaviorSystems(); // update physics stuff OnBeforePhysicsUpdate?.Invoke(); Physics.World.Step(lastDT); DynamicBody.UpdateAllBodies(); OnEndUpdate?.Invoke(); base.Update(gameTime); }