Table of Contents

Struct GamePadTriggers

Namespace
Microsoft.Xna.Framework.Input
Assembly
MonoGame.Framework.dll

A struct that contains information on the left and the right trigger buttons.

public struct GamePadTriggers
Inherited Members

Constructors

GamePadTriggers(float, float)

Initializes a new instance of the GamePadTriggers struct.

public GamePadTriggers(float leftTrigger, float rightTrigger)

Parameters

leftTrigger float

The position of the left trigger, the value will get clamped between 0.0f and 1.0f.

rightTrigger float

The position of the right trigger, the value will get clamped between 0.0f and 1.0f.

Properties

Left

Gets the position of the left trigger.

public readonly float Left { get; }

Property Value

float

A value from 0.0f to 1.0f representing left trigger.

Right

Gets the position of the right trigger.

public readonly float Right { get; }

Property Value

float

A value from 0.0f to 1.0f representing right trigger.

Methods

Equals(object)

Returns a value indicating whether this instance is equal to a specified object.

public override bool Equals(object obj)

Parameters

obj object

An object to compare to this instance.

Returns

bool

true if obj is a GamePadTriggers and has the same value as this instance; otherwise, false.

GetHashCode()

Serves as a hash function for a GamePadTriggers 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 GamePadTriggers.

public override string ToString()

Returns

string

A string that represents the current GamePadTriggers.

Operators

operator ==(GamePadTriggers, GamePadTriggers)

Determines whether two specified instances of GamePadTriggers are equal.

public static bool operator ==(GamePadTriggers left, GamePadTriggers right)

Parameters

left GamePadTriggers

The first object to compare.

right GamePadTriggers

The second object to compare.

Returns

bool

true if left and right are equal; otherwise, false.

operator !=(GamePadTriggers, GamePadTriggers)

Determines whether two specified instances of GamePadTriggers are not equal.

public static bool operator !=(GamePadTriggers left, GamePadTriggers right)

Parameters

left GamePadTriggers

The first object to compare.

right GamePadTriggers

The second object to compare.

Returns

bool

true if left and right are not equal; otherwise, false.