Go back to C# stoneage to please Unity

This commit is contained in:
Andy Chabalier 2018-05-31 13:18:13 +02:00
parent 7bf9f39301
commit bf5855afa3
2 changed files with 76 additions and 25 deletions

View File

@ -110,7 +110,11 @@ namespace SpaceNavWrapper
#region Properties
public double Sensitivity
{
get => _sensitivity;
get
{
return _sensitivity;
}
set
{
_sensitivity = value;
@ -120,7 +124,11 @@ namespace SpaceNavWrapper
public int Threshold
{
get => _threshold;
get
{
return _threshold;
}
set
{
_threshold = value;
@ -130,7 +138,11 @@ namespace SpaceNavWrapper
public bool Nonblocking
{
get => _nonblocking;
get
{
return _nonblocking;
}
set
{
_nonblocking = value;

View File

@ -13,23 +13,62 @@ namespace SpaceNavWrapper
public MotionEventArgs(int x, int y, int z, int rx, int ry, int rz)
{
axisValues = new Dictionary<SpaceNavAxis, int>
{
[SpaceNavAxis.X] = x,
[SpaceNavAxis.Y] = y,
[SpaceNavAxis.Z] = y,
[SpaceNavAxis.Rx] = rx,
[SpaceNavAxis.Ry] = ry,
[SpaceNavAxis.Rz] = rz
};
axisValues = new Dictionary<SpaceNavAxis, int>();
axisValues[SpaceNavAxis.X] = x;
axisValues[SpaceNavAxis.Y] = y;
axisValues[SpaceNavAxis.Z] = y;
axisValues[SpaceNavAxis.Rx] = rx;
axisValues[SpaceNavAxis.Ry] = ry;
axisValues[SpaceNavAxis.Rz] = rz;
}
public int X => axisValues[SpaceNavAxis.X];
public int Y => axisValues[SpaceNavAxis.Y];
public int Z => axisValues[SpaceNavAxis.Z];
public int Rx => axisValues[SpaceNavAxis.Rx];
public int Ry => axisValues[SpaceNavAxis.Ry];
public int Rz => axisValues[SpaceNavAxis.Rz];
public int X
{
get
{
return axisValues[SpaceNavAxis.X];
}
}
public int Y
{
get
{
return axisValues[SpaceNavAxis.Y];
}
}
public int Z
{
get
{
return axisValues[SpaceNavAxis.Z];
}
}
public int Rx
{
get
{
return axisValues[SpaceNavAxis.Rx];
}
}
public int Ry
{
get
{
return axisValues[SpaceNavAxis.Ry];
}
}
public int Rz
{
get
{
return axisValues[SpaceNavAxis.Rz];
}
}
public override string ToString()
{