コード例 #1
0
ファイル: InputManager.cs プロジェクト: Skittss/Hex
 public bool IsKeyPressed(Keybinds.Actions action)
 {
     if (currentKeyboardState.IsKeyDown(Keybinds.GetKey(action)))
     {
         return(true);
     }
     return(false);
 }
コード例 #2
0
ファイル: InputManager.cs プロジェクト: Skittss/Hex
 public bool IsKeyToggled(Keybinds.Actions action)
 {
     //toggle from up to down
     if (currentKeyboardState.IsKeyDown(Keybinds.GetKey(action)) && previousKeyboardState.IsKeyUp(Keybinds.GetKey(action)))
     {
         return(true);
     }
     return(false);
 }