예제 #1
0
        protected override void Draw(GameTime gameTime)
        {
            PerformanceManager.StartStopwatch(PerformanceStopwatchType.GlobalDraw);

            PerformanceManager.StartStopwatch(PerformanceStopwatchType.ClearColorDraw);
            GraphicsDevice.Clear(Color.CornflowerBlue);
            PerformanceManager.StopStopwatch(PerformanceStopwatchType.ClearColorDraw);

            PerformanceManager.StartStopwatch(PerformanceStopwatchType.SpriteBatchManagerDraw);
            SpriteBatchManager.Draw(gameTime);
            PerformanceManager.StopStopwatch(PerformanceStopwatchType.SpriteBatchManagerDraw);

            base.Draw(gameTime);

            if (GameConfig.DebugPhysics)
            {
                GameManager.CollisionWorld.Draw();
            }

            PerformanceManager.StartStopwatch(PerformanceStopwatchType.PerformanceManagerDraw);
            PerformanceManager.Draw(gameTime);
            PerformanceManager.StopStopwatch(PerformanceStopwatchType.PerformanceManagerDraw);

            PerformanceManager.StopStopwatch(PerformanceStopwatchType.GlobalDraw);

            if (Pause)
            {
                _computeNextFrame = false;
            }
        }