예제 #1
0
        private static void CheckInput(Game1 game)
        {
            GamePadState state = Game1.input.GetGamePadState();

            if (Game1.IsPressEvent(ref state, Buttons.LeftStick))
            {
                if (_metrics != null)
                {
                    _metrics.Visible = !_metrics.Visible;
                }
                Console.WriteLine("Toggling Metrics ({0})", (_metrics == null) ? "[null]" : _metrics.Visible.ToString());
            }
            if (Game1.IsPressEvent(ref state, Buttons.RightStick) && state.IsButtonDown(Buttons.LeftStick))
            {
                _noFpsCap = !_noFpsCap;
                ApplyNoFpsCap(_noFpsCap);
            }
        }