GameControllerDeviceExtensions Class
Namespace: Stride.InputAssembly: Stride.Input.dll
Provides easier ways to set vibration levels on a controller, rather than setting 4 motors
public static class GameControllerDeviceExtensions
Name | Description | |
---|---|---|
Methods | ||
IsButtonDown(IGameControllerDevice, Int32) | Determines whether the specified button is being pressed down |
|
IsButtonPressed(IGameControllerDevice, Int32) | Determines whether the specified button is pressed since the previous update. |
|
IsButtonReleased(IGameControllerDevice, Int32) | Determines whether the specified button is released since the previous update. |
Methods
IsButtonDown(IGameControllerDevice, Int32)
Determines whether the specified button is being pressed down
public static bool IsButtonDown(this IGameControllerDevice controller, int button)
Parameters
Type | Name | Description |
---|---|---|
IGameControllerDevice | controller | The controller |
System.Int32 | button | The button |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsButtonPressed(IGameControllerDevice, Int32)
Determines whether the specified button is pressed since the previous update.
public static bool IsButtonPressed(this IGameControllerDevice controller, int button)
Parameters
Type | Name | Description |
---|---|---|
IGameControllerDevice | controller | The controller |
System.Int32 | button | The button |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsButtonReleased(IGameControllerDevice, Int32)
Determines whether the specified button is released since the previous update.
public static bool IsButtonReleased(this IGameControllerDevice controller, int button)
Parameters
Type | Name | Description |
---|---|---|
IGameControllerDevice | controller | The controller |
System.Int32 | button | The button |
Returns
Type | Description |
---|---|
System.Boolean |
|