aboutsummaryrefslogtreecommitdiff
path: root/source/game/input/InputManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'source/game/input/InputManager.cs')
-rw-r--r--source/game/input/InputManager.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/source/game/input/InputManager.cs b/source/game/input/InputManager.cs
new file mode 100644
index 0000000..1bd3e38
--- /dev/null
+++ b/source/game/input/InputManager.cs
@@ -0,0 +1,33 @@
+using Microsoft.Xna.Framework;
+
+namespace Celesteia.Game.Input {
+ public class InputManager : GameComponent {
+ private new GameInstance Game => (GameInstance) base.Game;
+ public InputManager(GameInstance Game) : base(Game) {}
+
+ public override void Initialize()
+ {
+ base.Initialize();
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ base.Dispose(disposing);
+ }
+
+ public override void Update(GameTime gameTime)
+ {
+ if (!Enabled) return;
+
+ KeyboardHelper.Update();
+ GamepadHelper.Update();
+ MouseHelper.Update();
+
+ base.Update(gameTime);
+ }
+
+ public bool GetAny() {
+ return KeyboardHelper.AnyKey() || GamepadHelper.AnyButton();
+ }
+ }
+} \ No newline at end of file