Command Window class for Debug purpose.
Debug command UI that runs in the Game. You can type commands by keyboard. This works Xbox 360 too. You just need to connect USB keyboard. How to Use: 1) Add this component to the game. 2) Register command by RegisterCommand method. 3) Open/Close Debug window by Tab key.
Inheritance: Microsoft.Xna.Framework.DrawableGameComponent, IDebugCommandHost
示例#1
0
        public static void Initialize(Game g)
        {
            _debugManager = new DebugManager(g);
            g.Components.Add(_debugManager);

            _debugCommandUI = new DebugCommandUI(g);
            _debugCommandUI.DrawOrder = int.MaxValue;
            g.Components.Add(_debugCommandUI);

            _fpsCounter = new FpsCounter(g);
            g.Components.Add(_fpsCounter);

            _memTracker = new MemoryTracker(g);
            g.Components.Add(_memTracker);

            _currentRuler = new TimeRuler(g);
            g.Components.Add(_currentRuler);

            _timeHistory = new TimeHistory(g, _currentRuler);
            g.Components.Add(_timeHistory);
        }
示例#2
0
    public static void InitializeWithGame(Game g)
    {
        // Initialize debug manager and add it to components.
        _debugManager = new DebugManager(g);
        g.Components.Add(_debugManager);

        // Initialize debug command UI and add it to compoents.
        _debugCommandUI = new DebugCommandUI(g);

        // Change DrawOrder for render debug command UI on top of other compoents.
        _debugCommandUI.DrawOrder = int.MaxValue;

        g.Components.Add(_debugCommandUI);

        // Initialize FPS counter and add it to compoentns.
        _fpsCounter = new FpsCounter(g);
        g.Components.Add(_fpsCounter);

        // Initialize TimeRuler and add it to compoentns.
        _currentRuler = new TimeRuler(g);
        g.Components.Add(_currentRuler);
    }