示例#1
0
 private void HandleInputManagerCreated(InputButtons sender, InputButtonManager input)
 {
     if (input.Which.Type == InputButtonType.Keyboard)
     { // Track all created keyboard events...
         _keys[_keyCount] = input;
         _keyCount++;
     }
 }
示例#2
0
 private void HandleInputChanged(InputButtonManager sender, InputButtonArgs args)
 {
     this.OnButtonStateChanged?.Invoke(sender, args);
     this.OnButtonState[args.State]?.Invoke(sender, args);
 }
示例#3
0
 private void UpdateKey(InputButtonManager key, ref KeyboardState kState)
 => key.TrySetState(kState.IsKeyDown(key.Which.KeyboardKey) ? ButtonState.Pressed : ButtonState.Released);