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