IGameControllerDevice Interface
Namespace: Stride.InputAssembly: Stride.Input.dll
This interface is used for interacting with game controller devices.
public interface IGameControllerDevice : IInputDevice
Name | Description | |
---|---|---|
Properties | ||
AxisInfos | Information about the axes on this game controller |
|
ButtonInfos | Information about the buttons on this game controller |
|
DirectionInfos | Information about the direction controllers on this game controller |
|
DownButtons | The buttons that are down |
|
PressedButtons | The buttons that have been pressed since the last frame |
|
ProductId | Product Id of the device |
|
ReleasedButtons | The buttons that have been released since the last frame |
|
Methods | ||
GetAxis(Int32) | Retrieves the state of a single axis |
|
GetDirection(Int32) | Retrieves the state of a single point of direction controller |
Properties
AxisInfos
Information about the axes on this game controller
IReadOnlyList<GameControllerAxisInfo> AxisInfos { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<GameControllerAxisInfo> |
ButtonInfos
Information about the buttons on this game controller
IReadOnlyList<GameControllerButtonInfo> ButtonInfos { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<GameControllerButtonInfo> |
DirectionInfos
Information about the direction controllers on this game controller
IReadOnlyList<GameControllerDirectionInfo> DirectionInfos { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<GameControllerDirectionInfo> |
DownButtons
The buttons that are down
IReadOnlySet<int> DownButtons { get; }
Property Value
Type | Description |
---|---|
IReadOnlySet<System.Int32> |
PressedButtons
The buttons that have been pressed since the last frame
IReadOnlySet<int> PressedButtons { get; }
Property Value
Type | Description |
---|---|
IReadOnlySet<System.Int32> |
ProductId
Product Id of the device
Guid ProductId { get; }
Property Value
Type | Description |
---|---|
System.Guid |
ReleasedButtons
The buttons that have been released since the last frame
IReadOnlySet<int> ReleasedButtons { get; }
Property Value
Type | Description |
---|---|
IReadOnlySet<System.Int32> |
Methods
GetAxis(Int32)
Retrieves the state of a single axis
float GetAxis(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The axis' index, as exposed in AxisInfos |
Returns
Type | Description |
---|---|
System.Single | The value read directly from the axis |
GetDirection(Int32)
Retrieves the state of a single point of direction controller
Direction GetDirection(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The direction controller's index, as exposed in DirectionInfos |
Returns
Type | Description |
---|---|
Direction | The current state of the direction controller |