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
true
if 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
obj
objectThe object to compare with the current JoystickState.
Returns
- bool
true
if 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
left
JoystickStateThe first JoystickState to compare.
right
JoystickStateThe second JoystickState to compare.
Returns
- bool
true
ifleft
andright
are 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
left
JoystickStateThe first JoystickState to compare.
right
JoystickStateThe second JoystickState to compare.
Returns
- bool
true
ifleft
andright
are not equal; otherwise,false
.