Пример #1
0
        public override void FTSUpdate(GameTime timeSpent)
        {
            //Show GUI debug interface
            if (_inputManager.ActionsManager.isTriggered(Actions.EngineShowDebugUI, CatchExclusiveActions))
            {
                if (_guiManager.Screen.Desktop.Children.Contains(_mainControl.DebugWindow))
                {
                    HideControl(this, null);
                }
                else
                {
                    //Show the GUI, and start the action exclusive mode
                    ShowControl(this, null);
                    this.CatchExclusiveActions = true; //The gui will automaticaly set the actionmanager in Exclusive mode
                    _wasMouseCaptured          = _inputManager.MouseManager.MouseCapture;
                    _inputManager.MouseManager.MouseCapture = false;
                }
            }

            //Relay Debug Component Update
            if (_displayInfo.Updatable)
            {
                _displayInfo.FTSUpdate(timeSpent);
            }
            if (_fps.Updatable)
            {
                _fps.FTSUpdate(timeSpent);
            }
            if (_game.ComponentsPerfMonitor.Updatable && _mainControl.DebugWindow.Children[0] == _mainControl.Dpc)
            {
                _chart.AddValue((float)_mainControl.Dpc.UpdateData());
                _chart.FTSUpdate(timeSpent);
            }
        }