Struct GamepadState
Represents state of gamepad connected to PC
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Phoenix.Input
Assembly: Phoenix.Plugin.Input.dll
Syntax
public struct GamepadState
Properties
View SourceButtons
Gets the buttons state
Declaration
public readonly ushort Buttons { get; }
Property Value
Type | Description |
---|---|
System.UInt16 |
LeftThumbX
Gets or sets the left thumb X
Declaration
public short LeftThumbX { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
LeftThumbY
Gets or sets the left thumb Y
Declaration
public short LeftThumbY { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
LeftTrigger
Gets the left trigger value
Declaration
public readonly byte LeftTrigger { get; }
Property Value
Type | Description |
---|---|
System.Byte |
PacketNumber
Gets the packet number
Declaration
public readonly int PacketNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
RightThumbX
Gets or sets the right thumb X
Declaration
public short RightThumbX { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
RightThumbY
Gets or sets the right thumb Y
Declaration
public short RightThumbY { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
RightTrigger
Gets the right trigger value
Declaration
public readonly byte RightTrigger { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Methods
View SourceGetAnalogSigned(Int16)
Convert signed short to signed float
Declaration
public static float GetAnalogSigned(short signedValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | signedValue | Signed value to convert |
Returns
Type | Description |
---|---|
System.Single | Signed float result |
GetAnalogUnsigned(Byte)
Convert unsigned byte to unsigned float
Declaration
public static float GetAnalogUnsigned(byte unsignedValue)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | unsignedValue | Unsigned value to convert |
Returns
Type | Description |
---|---|
System.Single | Unsigned float result |
IsButtonPressed(GamepadState.ButtonValues)
Checks if a button is pressed
Declaration
public bool IsButtonPressed(GamepadState.ButtonValues button)
Parameters
Type | Name | Description |
---|---|---|
GamepadState.ButtonValues | button | Button to check |
Returns
Type | Description |
---|---|
System.Boolean | Whether button was pressed |