Add new methods to input handler, add RectangleShape2d, modify test game.

This commit is contained in:
2023-09-25 17:31:33 +02:00
parent 0b018e081e
commit ddf62f1834
12 changed files with 318 additions and 77 deletions

View File

@@ -4,6 +4,7 @@ namespace DaggerFramework
{
public abstract bool IsDown(InputHandler inputHandler);
public abstract bool IsPressed(InputHandler inputHandler);
public abstract bool IsReleased(InputHandler inputHandler);
}
public class KeyInputAction : InputAction
@@ -24,6 +25,12 @@ namespace DaggerFramework
return inputHandler.KeyboardKeyJustPressed(_keyboardKey);
}
public override bool IsReleased(InputHandler inputHandler)
{
return inputHandler.KeyboardKeyJustReleased(_keyboardKey);
}
private KeyboardKey _keyboardKey;
}
}