From 567c422f8cd42eba2437f9a8c2522716a1649be7 Mon Sep 17 00:00:00 2001 From: hazel Date: Mon, 26 Jan 2026 22:04:39 +0100 Subject: celesteia archive, last updated april 9th 2024 Signed-off-by: hazel --- source/game/input/InputManager.cs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 source/game/input/InputManager.cs (limited to 'source/game/input/InputManager.cs') 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 -- cgit v1.2.3