diff options
| author | Jacob Palecki <[email protected]> | 2020-09-22 13:08:31 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-22 13:08:31 -0700 |
| commit | 45285413a94c9c081098c672e69e9811ac5262b7 (patch) | |
| tree | 4c89d57a30226e2d1c007547fa5cf787118f3158 /grapher/Models/Mouse/MouseData.cs | |
| parent | Fix bug & rename x axis to input speed (diff) | |
| download | rawaccel-45285413a94c9c081098c672e69e9811ac5262b7.tar.xz rawaccel-45285413a94c9c081098c672e69e9811ac5262b7.zip | |
Rename experiment two to motivity
Diffstat (limited to 'grapher/Models/Mouse/MouseData.cs')
| -rw-r--r-- | grapher/Models/Mouse/MouseData.cs | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/grapher/Models/Mouse/MouseData.cs b/grapher/Models/Mouse/MouseData.cs new file mode 100644 index 0000000..e59a969 --- /dev/null +++ b/grapher/Models/Mouse/MouseData.cs @@ -0,0 +1,49 @@ +using System; + +namespace grapher.Models.Mouse +{ + public class MouseData + { + #region Constructors + + public MouseData() + { + Lock = new Object(); + X = 0; + Y = 0; + } + + #endregion Constructors + + #region Properties + + public Object Lock { get; } + + private int X { get; set; } + private int Y { get; set; } + + public void Set(int x, int y) + { + lock (Lock) + { + X = x; + Y = y; + } + } + + #endregion Properties + + #region Methods + + public void Get(out int x, out int y) + { + lock (Lock) + { + x = X; + y = Y; + } + } + + #endregion Methods + } +} |