Exemplo n.º 1
0
 public KeyboardKeyInput(ButtonStates <Key> current, ButtonStates <Key> previous)
     : base(current, previous)
 {
 }
Exemplo n.º 2
0
 /// <summary>
 /// Copies the state of another <see cref="ButtonStates{TButton}"/> to ourselves.
 /// </summary>
 /// <param name="other">The <see cref="ButtonStates{TButton}"/> to copy.</param>
 public void Set(ButtonStates <TButton> other)
 {
     pressedButtons.Clear();
     pressedButtons.AddRange(other.pressedButtons);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Enumerates the differences between ourselves and a previous <see cref="ButtonStates{TButton}"/>.
 /// </summary>
 /// <param name="lastButtons">The previous <see cref="ButtonStates{TButton}"/>.</param>
 public (IEnumerable <TButton> Released, IEnumerable <TButton> Pressed) EnumerateDifference(ButtonStates <TButton> lastButtons)
 {
     return(lastButtons.pressedButtons.Except(pressedButtons), pressedButtons.Except(lastButtons.pressedButtons));
 }
Exemplo n.º 4
0
 public JoystickButtonInput(ButtonStates <JoystickButton> current, ButtonStates <JoystickButton> previous)
     : base(current, previous)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Enumerates the differences between ourselves and a previous <see cref="ButtonStates{TButton}"/>.
 /// </summary>
 /// <param name="lastButtons">The previous <see cref="ButtonStates{TButton}"/>.</param>
 public ButtonStateDifference EnumerateDifference(ButtonStates <TButton> lastButtons)
 {
     return(new ButtonStateDifference(lastButtons.Except(this).ToArray(), this.Except(lastButtons).ToArray()));
 }
Exemplo n.º 6
0
 public MouseButtonInput(ButtonStates <MouseButton> current, ButtonStates <MouseButton> previous)
     : base(current, previous)
 {
 }