private void CheckKeyState(Keys key, Common.Inputs sendInputs) { if (keyboardState.IsKeyDown(key)) { if (!ThrottleInput || (ThrottleInput && lasKeyboardState.IsKeyUp(key))) { SendNewInput(sendInputs); lastKey = key; } } }
/// <summary> /// Initializes a new instance of the <see cref="T:System.EventArgs"/> class. /// </summary> public NewInputEventArgs(Common.Inputs inputs) { Inputs = inputs; }
protected void SendNewInput(Common.Inputs inputs) { newInput?.Invoke(this, new NewInputEventArgs(inputs)); }