Пример #1
0
 private void ExecuteClick(JoyButtonState state, int i)
 {
     switch (state)
     {
     case JoyButtonState.Pressed:
         SimulatorMethods.KeyDown(keyCode[i]);
         CoroutineMaster.ExecuteAfterNFrames(
             1, delegate { SimulatorMethods.KeyUp(keyCode[i]); }
             );
         break;
     }
 }
Пример #2
0
    private void ExecuteHold(JoyButtonState state, int i)
    {
        switch (state)
        {
        case JoyButtonState.Pressed:
            SimulatorMethods.KeyDown(keyCode[i]);
            break;

        case JoyButtonState.Hold:
            SimulatorMethods.KeyDown(keyCode[i]);
            break;

        case JoyButtonState.Realesed:
            SimulatorMethods.KeyUp(keyCode[i]);
            break;

        case JoyButtonState.None:
            break;
        }
    }
Пример #3
0
    private void ExecuteReleaseOnSecondClick(JoyButtonState state, int i)
    {
        switch (state)
        {
        case JoyButtonState.Pressed:
            isPressed = !isPressed;
            if (isPressed)
            {
                SimulatorMethods.KeyDown(keyCode[i]);
            }
            else
            {
                SimulatorMethods.KeyUp(keyCode[i]);
            }
            break;

        default:
            if (isPressed)
            {
                SimulatorMethods.KeyDown(keyCode[i]);
            }
            break;
        }
    }