This commit is contained in:
Regalis
2015-10-31 15:16:49 +02:00
parent bcc96cee97
commit b0deba514e
29 changed files with 348 additions and 81 deletions

View File

@@ -18,6 +18,15 @@ namespace Barotrauma
Keys keyBinding;
int? mouseButton;
public Keys Key
{
get { return keyBinding; }
}
public int? MouseButton
{
get { return mouseButton; }
}
public KeyOrMouse(Keys keyBinding)
{
this.keyBinding = keyBinding;
@@ -258,6 +267,16 @@ namespace Barotrauma
return doubleClicked;
}
public static bool KeyHit(InputType inputType)
{
return GameMain.Config.KeyBind(inputType).IsHit();
}
public static bool KeyDOwn(InputType inputType)
{
return GameMain.Config.KeyBind(inputType).IsDown();
}
public static bool KeyHit(Keys button)
{
return (oldKeyboardState.IsKeyDown(button) && keyboardState.IsKeyUp(button));