Struct JoystickState
Describes current joystick state.
public struct JoystickState
- Inherited Members
Properties
Axes
Gets the joystick axis values.
public readonly int[] Axes { get; }
Property Value
- int[]
An array list of ints that indicate axis values.
Buttons
Gets the joystick button values.
public readonly ButtonState[] Buttons { get; }
Property Value
- ButtonState[]
An array list of ButtonState that indicate button values.
Hats
Gets the joystick hat values.
public readonly JoystickHat[] Hats { get; }
Property Value
- JoystickHat[]
An array list of JoystickHat that indicate hat values.
IsConnected
Gets a value indicating whether the joystick is connected.
public readonly bool IsConnected { get; }
Property Value
- bool
trueif the joystick is connected; otherwise,false.
Methods
Equals(object)
Determines whether the specified object is equal to the current JoystickState.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current JoystickState.
Returns
- bool
trueif the specified object is equal to the current JoystickState; otherwise,false.
GetHashCode()
Serves as a hash function for a JoystickState object.
public override int GetHashCode()
Returns
- int
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table.
ToString()
Returns a string that represents the current JoystickState.
public override string ToString()
Returns
- string
A string that represents the current JoystickState.
Operators
operator ==(JoystickState, JoystickState)
Determines whether a specified instance of JoystickState is equal to another specified JoystickState.
public static bool operator ==(JoystickState left, JoystickState right)
Parameters
leftJoystickStateThe first JoystickState to compare.
rightJoystickStateThe second JoystickState to compare.
Returns
- bool
trueifleftandrightare equal; otherwise,false.
operator !=(JoystickState, JoystickState)
Determines whether a specified instance of JoystickState is not equal to another specified JoystickState.
public static bool operator !=(JoystickState left, JoystickState right)
Parameters
leftJoystickStateThe first JoystickState to compare.
rightJoystickStateThe second JoystickState to compare.
Returns
- bool
trueifleftandrightare not equal; otherwise,false.