Example #1
0
 public InputState GetKeyState(Keys key)
 {
     if (KBState.IsKeyDown(key))
     {
         return(PrevKBState.IsKeyUp(key) ? InputState.Pressed : InputState.Down);
     }
     else
     {
         return(PrevKBState.IsKeyDown(key) ? InputState.Released : InputState.Up);
     }
 }
Example #2
0
 public bool KeyPress(params Keys[] keys) => keys.Any((key) => CurrKBState.IsKeyDown(key) && PrevKBState.IsKeyUp(key));