C# Class fliXNA_xbox.FlxGamepad

Datei anzeigen Open project: jlorek/flxSharp Class Usage Examples

Public Properties

Property Type Description
buttons Buttons
leftAnalogX float
leftAnalogY float
leftTrigger float
rightAnalogX float
rightAnalogY float
rightTrigger float

Public Methods

Method Description
FlxGamepad ( PlayerIndex IndexOfPlayer ) : System
justPressed ( Buttons Button ) : bool

Returrns true if the specified button was just pressed

justReleased ( Buttons button ) : bool

Returrns true if the specified button was just released

leftAnalogPushedDown ( ) : bool

Returns true if the Left Analog is pushed down by any amount

leftAnalogPushedLeft ( ) : bool

Returns true if the Left Analog is pushed left by any amount

leftAnalogPushedRight ( ) : bool

Returns true if the Left Analog is pushed right by any amount

leftAnalogPushedUp ( ) : bool

Returns true if the Left Analog is pushed up by any amount

leftAnalogStill ( ) : bool

Returns true if the Left Analog is centered and not being pushed in any direction

pressed ( Buttons button ) : bool

Returrns true if the specified button is held down

rightAnalogPushedDown ( ) : bool

Returns true if the Right Analog is pushed down by any amount

rightAnalogPushedLeft ( ) : bool

Returns true if the Right Analog is pushed left by any amount

rightAnalogPushedRight ( ) : bool

Returns true if the Right Analog is pushed right by any amount

rightAnalogPushedUp ( ) : bool

Returns true if the Right Analog is pushed up by any amount

rightAnalogStill ( ) : bool

Returns true if the Right Analog is centered and not being pushed in any direction

update ( ) : void
vibrate ( float Duration = 0.5f ) : void

Simple Controller vibration

vibrate ( float Duration = 0.5f, float Intensity = 0.15f ) : void

Simple Controller vibration

vibrate ( float Duration = 0.5f, float IntensityLeftMotor = 0.15f, float IntensityRightMotor = 0.15f, bool ShakeScreen = false ) : void

Simple Controller vibration

Method Details

FlxGamepad() public method

public FlxGamepad ( PlayerIndex IndexOfPlayer ) : System
IndexOfPlayer PlayerIndex
return System

justPressed() public method

Returrns true if the specified button was just pressed
public justPressed ( Buttons Button ) : bool
Button Buttons Buttons Button
return bool

justReleased() public method

Returrns true if the specified button was just released
public justReleased ( Buttons button ) : bool
button Buttons
return bool

leftAnalogPushedDown() public method

Returns true if the Left Analog is pushed down by any amount
public leftAnalogPushedDown ( ) : bool
return bool

leftAnalogPushedLeft() public method

Returns true if the Left Analog is pushed left by any amount
public leftAnalogPushedLeft ( ) : bool
return bool

leftAnalogPushedRight() public method

Returns true if the Left Analog is pushed right by any amount
public leftAnalogPushedRight ( ) : bool
return bool

leftAnalogPushedUp() public method

Returns true if the Left Analog is pushed up by any amount
public leftAnalogPushedUp ( ) : bool
return bool

leftAnalogStill() public method

Returns true if the Left Analog is centered and not being pushed in any direction
public leftAnalogStill ( ) : bool
return bool

pressed() public method

Returrns true if the specified button is held down
public pressed ( Buttons button ) : bool
button Buttons
return bool

rightAnalogPushedDown() public method

Returns true if the Right Analog is pushed down by any amount
public rightAnalogPushedDown ( ) : bool
return bool

rightAnalogPushedLeft() public method

Returns true if the Right Analog is pushed left by any amount
public rightAnalogPushedLeft ( ) : bool
return bool

rightAnalogPushedRight() public method

Returns true if the Right Analog is pushed right by any amount
public rightAnalogPushedRight ( ) : bool
return bool

rightAnalogPushedUp() public method

Returns true if the Right Analog is pushed up by any amount
public rightAnalogPushedUp ( ) : bool
return bool

rightAnalogStill() public method

Returns true if the Right Analog is centered and not being pushed in any direction
public rightAnalogStill ( ) : bool
return bool

update() public method

public update ( ) : void
return void

vibrate() public method

Simple Controller vibration
public vibrate ( float Duration = 0.5f ) : void
Duration float The length in seconds the vibration should last
return void

vibrate() public method

Simple Controller vibration
public vibrate ( float Duration = 0.5f, float Intensity = 0.15f ) : void
Duration float The length in seconds the vibration should last
Intensity float The intensity of the vibration for both Motors
return void

vibrate() public method

Simple Controller vibration
public vibrate ( float Duration = 0.5f, float IntensityLeftMotor = 0.15f, float IntensityRightMotor = 0.15f, bool ShakeScreen = false ) : void
Duration float The length in seconds the vibration should last
IntensityLeftMotor float The intensity of the Left Motor vibration
IntensityRightMotor float The intensity of the Right Motor vibration
ShakeScreen bool Should the screen shake in unison with the controller vibration
return void

Property Details

buttons public_oe static_oe property

public static Buttons buttons
return Buttons

leftAnalogX public_oe property

public float leftAnalogX
return float

leftAnalogY public_oe property

public float leftAnalogY
return float

leftTrigger public_oe property

public float leftTrigger
return float

rightAnalogX public_oe property

public float rightAnalogX
return float

rightAnalogY public_oe property

public float rightAnalogY
return float

rightTrigger public_oe property

public float rightTrigger
return float