Cannot get keyboard input to function still.

This commit is contained in:
hellka7
2025-04-13 17:11:34 -07:00
parent d6842844d1
commit 409d602362
5 changed files with 112 additions and 80 deletions
+3 -3
View File
@@ -18,14 +18,14 @@ namespace LunaLightXMG
public bool KeyAttack { get; private set; }
public bool KeyWallClimb { get; private set; }
public void Update()
public void Update(KeyboardState keyboardState)
{
if (HasControl)
{
if (Controller)
{
// If using controller, switch to keyboard by pressing any key
if (Keyboard.GetState().GetPressedKeys().Length > 0)
if (keyboardState.GetPressedKeys().Length > 0)
{
// TODO: Insert logic to create the objMouseJoyStick instance
Controller = false;
@@ -72,7 +72,7 @@ namespace LunaLightXMG
}
// Keyboard input
KeyboardState keyboardState = Keyboard.GetState();
//KeyboardState keyboardState = Keyboard.GetState();
KeyLeft = keyboardState.IsKeyDown(Keys.A) ? 1 : 0;
KeyRight = keyboardState.IsKeyDown(Keys.D) ? 1 : 0;