/// <summary> /// Bunnyhop /// </summary> private void BunnyhopLoop() { while (_turned) { if (KeyboardControl.GetAsyncKeyState(_key) != 0 && GetPositionStatement() == 257) { KeyboardControl.keybd_event(0x20, 0x39, 0, 0); Thread.Sleep(20); KeyboardControl.keybd_event(0x20, 0x39, 0x02, 0); } else { Thread.Sleep(10); } } }
/// <summary> /// Detecting if any hotkey is pressed to switch functionality /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HotkeyDetection(object sender, EventArgs e) { if (KeyboardControl.GetAsyncKeyState(_triggerbotHotkey) != 0 && !_settingHotkey) { TriggerbotSwitch(); Thread.Sleep(200); } else if (KeyboardControl.GetAsyncKeyState(_glowHotkey) != 0 && !_settingHotkey) { GlowSwitch(); Thread.Sleep(200); } else if (KeyboardControl.GetAsyncKeyState(_noFlashHotkey) != 0 && !_settingHotkey) { NoFlashSwitch(); Thread.Sleep(200); } }