예제 #1
0
 private void InitializeSimulatedInputSource()
 {
     if (InputSourceSimulated != null)
     {
         Input.Sources.Clear();
         Input.Sources.Add(InputSourceSimulated);
         MouseSimulated    = InputSourceSimulated.AddMouse();
         KeyboardSimulated = InputSourceSimulated.AddKeyboard();
     }
 }
예제 #2
0
        public GameTestingSystem(IServiceRegistry registry) : base(registry)
        {
            DrawOrder = int.MaxValue;
            Enabled   = true;
            Visible   = true;

            // Switch to simulated input
            var input = registry.GetSafeServiceAs <InputManager>();

            input.Sources.Clear();
            input.Sources.Add(inputSourceSimulated = new InputSourceSimulated());
            keyboardSimulated = inputSourceSimulated.AddKeyboard();
            mouseSimulated    = inputSourceSimulated.AddMouse();
        }