C# Класс fliXNA_xbox.FlxGamepad

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
buttons Buttons
leftAnalogX float
leftAnalogY float
leftTrigger float
rightAnalogX float
rightAnalogY float
rightTrigger float

Открытые методы

Метод Описание
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

Описание методов

FlxGamepad() публичный Метод

public FlxGamepad ( PlayerIndex IndexOfPlayer ) : System
IndexOfPlayer PlayerIndex
Результат System

justPressed() публичный Метод

Returrns true if the specified button was just pressed
public justPressed ( Buttons Button ) : bool
Button Buttons Buttons Button
Результат bool

justReleased() публичный Метод

Returrns true if the specified button was just released
public justReleased ( Buttons button ) : bool
button Buttons
Результат bool

leftAnalogPushedDown() публичный Метод

Returns true if the Left Analog is pushed down by any amount
public leftAnalogPushedDown ( ) : bool
Результат bool

leftAnalogPushedLeft() публичный Метод

Returns true if the Left Analog is pushed left by any amount
public leftAnalogPushedLeft ( ) : bool
Результат bool

leftAnalogPushedRight() публичный Метод

Returns true if the Left Analog is pushed right by any amount
public leftAnalogPushedRight ( ) : bool
Результат bool

leftAnalogPushedUp() публичный Метод

Returns true if the Left Analog is pushed up by any amount
public leftAnalogPushedUp ( ) : bool
Результат bool

leftAnalogStill() публичный Метод

Returns true if the Left Analog is centered and not being pushed in any direction
public leftAnalogStill ( ) : bool
Результат bool

pressed() публичный Метод

Returrns true if the specified button is held down
public pressed ( Buttons button ) : bool
button Buttons
Результат bool

rightAnalogPushedDown() публичный Метод

Returns true if the Right Analog is pushed down by any amount
public rightAnalogPushedDown ( ) : bool
Результат bool

rightAnalogPushedLeft() публичный Метод

Returns true if the Right Analog is pushed left by any amount
public rightAnalogPushedLeft ( ) : bool
Результат bool

rightAnalogPushedRight() публичный Метод

Returns true if the Right Analog is pushed right by any amount
public rightAnalogPushedRight ( ) : bool
Результат bool

rightAnalogPushedUp() публичный Метод

Returns true if the Right Analog is pushed up by any amount
public rightAnalogPushedUp ( ) : bool
Результат bool

rightAnalogStill() публичный Метод

Returns true if the Right Analog is centered and not being pushed in any direction
public rightAnalogStill ( ) : bool
Результат bool

update() публичный Метод

public update ( ) : void
Результат void

vibrate() публичный Метод

Simple Controller vibration
public vibrate ( float Duration = 0.5f ) : void
Duration float The length in seconds the vibration should last
Результат void

vibrate() публичный Метод

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
Результат void

vibrate() публичный Метод

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
Результат void

Описание свойств

buttons публичное статическое свойство

public static Buttons buttons
Результат Buttons

leftAnalogX публичное свойство

public float leftAnalogX
Результат float

leftAnalogY публичное свойство

public float leftAnalogY
Результат float

leftTrigger публичное свойство

public float leftTrigger
Результат float

rightAnalogX публичное свойство

public float rightAnalogX
Результат float

rightAnalogY публичное свойство

public float rightAnalogY
Результат float

rightTrigger публичное свойство

public float rightTrigger
Результат float