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