示例#1
0
 protected void DestroyPusher(InputCodes key)
 {
     if (ActivePushers.FirstOrDefault(a => a.Code == key) != null)
     {
         ActivePushers.FirstOrDefault(a => a.Code == key).Instance.Dispose();
     }
 }
示例#2
0
    public static UnityEngine.KeyCode GetInput(InputCodes code)
    {
        //        switch(code)
        //        {
        //            //Input.
        //        }

        return KeyCode.End;
    }
示例#3
0
 public static void InputCombination(InputCodes modifier, InputCodes code)
 {
     if (IsMouseInput(code))
     {
         InputSimulator.Keyboard.KeyDown(InputToVirtualKeyCode(modifier));
         Input(code);
         InputSimulator.Keyboard.KeyUp(InputToVirtualKeyCode(modifier));
     }
     InputSimulator.Keyboard.ModifiedKeyStroke(InputToVirtualKeyCode(modifier).Yield(), InputToVirtualKeyCode(code).Yield());
 }
示例#4
0
 public static void Input(InputCodes code)
 {
     //if (!NativeApiWrapper.GameWindow.IsActivated)
     //    return;
     if (IsMouseInput(code))
     {
         if (code == InputCodes.LButton)
         {
             Mouse.ClickLeft();
         }
         if (code == InputCodes.RButton)
         {
             Mouse.ClickRight();
         }
         if (code == InputCodes.MButton)
         {
             Mouse.ClickMiddle();
         }
     }
     else
     {
         Keyboard.Press(InputToKey(code));
     }
 }
示例#5
0
 static VirtualKeyCode InputToVirtualKeyCode(InputCodes code)
 {
     return((VirtualKeyCode)Enum.ToObject(typeof(VirtualKeyCode), (int)code));
 }
示例#6
0
 static Keys InputToKey(InputCodes code)
 {
     return((Keys)Enum.ToObject(typeof(Keys), (int)code));
 }
示例#7
0
 static bool IsMouseInput(InputCodes code)
 {
     return(code == InputCodes.LButton || code == InputCodes.RButton || code == InputCodes.MButton);
 }