Struct JoystickHat
Describes joystick hat state.
public struct JoystickHat
- Inherited Members
Properties
Down
Gets if joysticks hat "down" is pressed.
public readonly ButtonState Down { get; }
Property Value
Left
Gets if joysticks hat "left" is pressed.
public readonly ButtonState Left { get; }
Property Value
Right
Gets if joysticks hat "right" is pressed.
public readonly ButtonState Right { get; }
Property Value
Up
Gets if joysticks hat "up" is pressed.
public readonly ButtonState Up { get; }
Property Value
Methods
Equals(object)
Determines whether the specified object is equal to the current JoystickHat.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current JoystickHat.
Returns
- bool
trueif the specified object is equal to the current JoystickHat; otherwise,false.
GetHashCode()
Serves as a hash function for a JoystickHat 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 JoystickHat in a format of 0000 where each number represents a boolean value of each respecting object property: Left, Up, Right, Down.
public override string ToString()
Returns
- string
A string that represents the current JoystickHat.
Operators
operator ==(JoystickHat, JoystickHat)
Determines whether a specified instance of JoystickHat is equal to another specified JoystickHat.
public static bool operator ==(JoystickHat left, JoystickHat right)
Parameters
leftJoystickHatThe first JoystickHat to compare.
rightJoystickHatThe second JoystickHat to compare.
Returns
- bool
trueifleftandrightare equal; otherwise,false.
operator !=(JoystickHat, JoystickHat)
Determines whether a specified instance of JoystickHat is not equal to another specified JoystickHat.
public static bool operator !=(JoystickHat left, JoystickHat right)
Parameters
leftJoystickHatThe first JoystickHat to compare.
rightJoystickHatThe second JoystickHat to compare.
Returns
- bool
trueifleftandrightare not equal; otherwise,false.