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; } }
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; } }
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; } }