GameControllerExtensions Class
Namespace: Stride.InputAssembly: Stride.Input.dll
System.Object →
GameControllerExtensions
Derived from GameControllerExtensions:
public static class GameControllerExtensions
| Name | Description | |
|---|---|---|
| Methods | ||
| GetAxisCount(IGameControllerDevice) | Gets the number of axes on this gamepad |
|
| GetButtonCount(IGameControllerDevice) | Gets the number of buttons on this gamepad |
|
| GetDirectionCount(IGameControllerDevice) | Gets the number of direction inputs on this gamepad |
|
| GetDPad(IGameControllerDevice, Int32) | Returns the value of a direction controller converted to a GamePadButton which has the matching Pad flags set |
|
Methods
GetAxisCount(IGameControllerDevice)
Gets the number of axes on this gamepad
public static int GetAxisCount(this IGameControllerDevice device)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameControllerDevice | device | The gamepad |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of axes |
GetButtonCount(IGameControllerDevice)
Gets the number of buttons on this gamepad
public static int GetButtonCount(this IGameControllerDevice device)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameControllerDevice | device | The gamepad |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of buttons |
GetDirectionCount(IGameControllerDevice)
Gets the number of direction inputs on this gamepad
public static int GetDirectionCount(this IGameControllerDevice device)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameControllerDevice | device | The gamepad |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of direction controllers |
GetDPad(IGameControllerDevice, Int32)
Returns the value of a direction controller converted to a GamePadButton which has the matching Pad flags set
public static GamePadButton GetDPad(this IGameControllerDevice device, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameControllerDevice | device | The gamepad |
| System.Int32 | index | The index of the direction controller |
Returns
| Type | Description |
|---|---|
| GamePadButton |