2012-08-09 09:45:04 +00:00
|
|
|
#region Using Statements
|
2011-11-08 20:52:48 +00:00
|
|
|
using System;
|
|
|
|
using ANX.Framework.NonXNA;
|
2011-11-09 08:56:37 +00:00
|
|
|
using ANX.Framework.Graphics;
|
2011-11-08 20:52:48 +00:00
|
|
|
|
|
|
|
#endregion // Using Statements
|
|
|
|
|
2012-08-09 09:45:04 +00:00
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2011-11-08 20:52:48 +00:00
|
|
|
|
|
|
|
#if XNAEXT
|
|
|
|
|
2011-11-09 08:56:37 +00:00
|
|
|
namespace ANX.Framework.Input.MotionSensing
|
2011-11-08 20:52:48 +00:00
|
|
|
{
|
|
|
|
public class MotionSensingDevice
|
|
|
|
{
|
|
|
|
private static IMotionSensingDevice motionSensingDevice;
|
|
|
|
|
|
|
|
static MotionSensingDevice()
|
|
|
|
{
|
2011-11-11 15:21:41 +00:00
|
|
|
motionSensingDevice = AddInSystemFactory.Instance.GetDefaultCreator<IInputSystemCreator>().MotionSensingDevice;
|
2011-11-08 20:52:48 +00:00
|
|
|
}
|
|
|
|
|
2011-11-11 07:29:49 +00:00
|
|
|
public static GraphicsDevice GraphicsDevice
|
2011-11-09 08:56:37 +00:00
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
2012-01-17 05:55:36 +00:00
|
|
|
if (motionSensingDevice != null)
|
|
|
|
{
|
|
|
|
return motionSensingDevice.GraphicsDevice;
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
2011-11-09 08:56:37 +00:00
|
|
|
}
|
|
|
|
set
|
|
|
|
{
|
2012-01-17 05:55:36 +00:00
|
|
|
if (motionSensingDevice != null)
|
|
|
|
{
|
|
|
|
motionSensingDevice.GraphicsDevice = value;
|
|
|
|
}
|
2011-11-09 08:56:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static MotionSensingDeviceType DeviceType
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return motionSensingDevice.DeviceType;
|
|
|
|
}
|
|
|
|
}
|
2011-11-08 20:52:48 +00:00
|
|
|
|
|
|
|
public static MotionSensingDeviceState GetState()
|
|
|
|
{
|
|
|
|
return motionSensingDevice.GetState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|