2011-10-31 05:36:24 +00:00
|
|
|
using ANX.Framework.NonXNA;
|
2012-09-01 16:20:44 +00:00
|
|
|
using ANX.Framework.NonXNA.Development;
|
2011-10-31 05:36:24 +00:00
|
|
|
|
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-10-31 05:36:24 +00:00
|
|
|
|
|
|
|
namespace ANX.Framework.Input
|
|
|
|
{
|
2012-10-16 20:41:17 +00:00
|
|
|
[PercentageComplete(100)]
|
|
|
|
[Developer("AstrorEnales")]
|
2012-09-01 16:20:44 +00:00
|
|
|
[TestState(TestStateAttribute.TestState.Tested)]
|
2012-08-25 17:27:45 +00:00
|
|
|
public static class GamePad
|
|
|
|
{
|
2012-09-30 07:43:41 +00:00
|
|
|
private static readonly IGamePad gamePad;
|
2012-08-25 17:27:45 +00:00
|
|
|
|
|
|
|
static GamePad()
|
|
|
|
{
|
|
|
|
gamePad = AddInSystemFactory.Instance.GetDefaultCreator<IInputSystemCreator>().GamePad;
|
|
|
|
}
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-08-25 17:27:45 +00:00
|
|
|
public static GamePadCapabilities GetCapabilities(PlayerIndex playerIndex)
|
|
|
|
{
|
|
|
|
return gamePad.GetCapabilities(playerIndex);
|
|
|
|
}
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-08-25 17:27:45 +00:00
|
|
|
public static GamePadState GetState(PlayerIndex playerIndex)
|
|
|
|
{
|
2012-09-01 16:20:44 +00:00
|
|
|
return gamePad.GetState(playerIndex);
|
2012-08-25 17:27:45 +00:00
|
|
|
}
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-08-25 17:27:45 +00:00
|
|
|
public static GamePadState GetState(PlayerIndex playerIndex, GamePadDeadZone deadZoneMode)
|
|
|
|
{
|
2012-09-01 16:20:44 +00:00
|
|
|
return gamePad.GetState(playerIndex, deadZoneMode);
|
2012-08-25 17:27:45 +00:00
|
|
|
}
|
2011-10-31 05:36:24 +00:00
|
|
|
|
2012-08-25 17:27:45 +00:00
|
|
|
public static bool SetVibration(PlayerIndex playerIndex, float leftMotor, float rightMotor)
|
|
|
|
{
|
|
|
|
return gamePad.SetVibration(playerIndex, leftMotor, rightMotor);
|
|
|
|
}
|
|
|
|
}
|
2011-10-31 05:36:24 +00:00
|
|
|
}
|