Example #1
0
        private void UpdateDebugScreen(Time time)
        {
            if (DebugKeyEnabled && Keyboard.GetKeyState(Key.F12) == ButtonState.Pressed)
            {
                DebugScreenVisible = !DebugScreenVisible;
            }

            DebugLayer.Update(time);

            if (!DebugScreenVisible)
            {
                return;
            }

            FPSDisplay.Text = fpsText;

            layerTextBuilder.Clear();
            layerTextBuilder.Append(layerTextTitle);

            for (int i = Layers.FirstIndex; i <= Layers.LastIndex; i++)
            {
                layerTextBuilder.Append("[");
                layerTextBuilder.Append(i);
                layerTextBuilder.Append("]: ");
                layerTextBuilder.Append(Layers[i].Objects.Count);
                layerTextBuilder.AppendLine();
            }

            LayerDisplay.Text = layerTextBuilder.ToString();
            LayerWindow.Size  = LayerDisplay.Size;
        }
Example #2
0
 protected override void Update(float deltaTime)
 {
     _deltaTime = deltaTime;
     DebugLayer.Update(deltaTime);
 }