aboutsummaryrefslogtreecommitdiff
path: root/V3/Input/IInputManager.cs
diff options
context:
space:
mode:
authorThomas Leyh <leyh.thomas@web.de>2016-07-24 08:14:18 +0200
committerThomas Leyh <leyh.thomas@web.de>2016-07-24 08:14:18 +0200
commitced3d03bdb3ce866d832e03fb212865140905a9a (patch)
tree2a16c2063a46d3c354ce1585029dda3124f6ad93 /V3/Input/IInputManager.cs
parent0394dccaf06e1009e591a6ff4d645895574724c1 (diff)
downloadV3-release.tar.gz
V3-release.tar.bz2
Add project files.v1.0release
Diffstat (limited to 'V3/Input/IInputManager.cs')
-rw-r--r--V3/Input/IInputManager.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/V3/Input/IInputManager.cs b/V3/Input/IInputManager.cs
new file mode 100644
index 0000000..b092ebb
--- /dev/null
+++ b/V3/Input/IInputManager.cs
@@ -0,0 +1,34 @@
+using System.Collections.Generic;
+
+namespace V3.Input
+{
+ /// <summary>
+ /// Watches the state of the mouse and keyboard and creates events if a
+ /// change (key pressed or released) is detected. To use this class, call
+ /// Update in every update round. After the update, you may access the
+ /// generated events in KeyEvents and MouseEvents. The input manager only
+ /// watches the mouse buttons and keys listed in sWatchedKeys and
+ /// sWatchedButtons.
+ /// </summary>
+ public interface IInputManager
+ {
+ /// <summary>
+ /// The key events that were generated during the last update. Reset
+ /// in the next update.
+ /// </summary>
+ ICollection<IKeyEvent> KeyEvents { get; }
+
+ /// <summary>
+ /// The mouse events that were generated during the last update. Reset in
+ /// the next update.
+ /// </summary>
+ ICollection<IMouseEvent> MouseEvents { get; }
+
+ /// <summary>
+ /// Updates the keyboard and mouse status and generates the key and mouse
+ /// events in KeyEvents and MouseEvents if changes were detected. Should
+ /// be called once every update, before doing something else.
+ /// </summary>
+ void Update();
+ }
+} \ No newline at end of file