Table of Contents

Class GamepadExtensions

Namespace
MLEM.Input
Assembly
MLEM.dll

A set of extension methods for dealing with Microsoft.Xna.Framework.Input.GamePad, Microsoft.Xna.Framework.Input.GamePadState and Microsoft.Xna.Framework.Input.Buttons.

public static class GamepadExtensions
Inheritance
GamepadExtensions
Inherited Members

Methods

GetAnalogValue(GamePadState, Buttons)

Returns the given Microsoft.Xna.Framework.Input.Buttons's value as an analog value between 0 and 1, where 1 is fully down and 0 is not down at all. For non-analog buttons, like Microsoft.Xna.Framework.Input.Buttons.X or Microsoft.Xna.Framework.Input.Buttons.Start, only 0 and 1 will be returned and no inbetween values are possible.

public static float GetAnalogValue(this GamePadState state, Buttons button)

Parameters

state GamePadState

The gamepad state to query.

button Buttons

The button to query.

Returns

float

The button's state as an analog value.