C# 클래스 SGDE.Input.GamePad

A gamepad input device.
상속: InputComponent
파일 보기 프로젝트 열기: sgdc/sgdc-old

공개 메소드들

메소드 설명
GetCurrentState ( ) : GamePadState

Get the current GamePad input state.

GetGamePadCapability ( ) : Microsoft.Xna.Framework.Input.GamePadCapabilities

Get what the GamePad is capable of.

GetPastState ( ) : GamePadState

Get the past GamePad input state.

GetPastThumbstickPosition ( GamePadComponent com ) : Vector2

Get the past position of the thumbstick control as a 2D vector.

GetPastTrigger ( GamePadComponent com ) : float

Get the past trigger position.

GetThumbstickPosition ( GamePadComponent com ) : Vector2

Get the position of the thumbstick control as a 2D vector.

GetThumbstickPositionDifference ( GamePadComponent com ) : Vector2

Get the difference of the thumbstick between the current and previous state.

GetTrigger ( GamePadComponent com ) : float

Get the trigger position.

GetTriggerDifference ( GamePadComponent com ) : float

Get the difference of the trigger between the current and previous state.

IsButtonClicked ( GamePadComponent com ) : bool

Determine if the specified button is clicked. This means that the button is down right now but wasn't always pressed down.

IsButtonPressed ( GamePadComponent com ) : bool

Determine if the specified button is pressed.

SetVibration ( float motor, bool leftMotor ) : bool

Set the game pad's vibration.

SetVibration ( float leftMotor, float rightMotor ) : bool

Set the game pad's vibration.

비공개 메소드들

메소드 설명
Component2Button ( GamePadComponent com ) : Buttons
GamePad ( InputManager manager ) : System
GetThumbStick ( int index, bool cur ) : GamePadThumbSticks
GetTriggers ( int index, bool cur ) : GamePadTriggers

메소드 상세

GetCurrentState() 공개 메소드

Get the current GamePad input state.
public GetCurrentState ( ) : GamePadState
리턴 Microsoft.Xna.Framework.Input.GamePadState

GetGamePadCapability() 공개 메소드

Get what the GamePad is capable of.
public GetGamePadCapability ( ) : Microsoft.Xna.Framework.Input.GamePadCapabilities
리턴 Microsoft.Xna.Framework.Input.GamePadCapabilities

GetPastState() 공개 메소드

Get the past GamePad input state.
public GetPastState ( ) : GamePadState
리턴 Microsoft.Xna.Framework.Input.GamePadState

GetPastThumbstickPosition() 공개 메소드

Get the past position of the thumbstick control as a 2D vector.
public GetPastThumbstickPosition ( GamePadComponent com ) : Vector2
com GamePadComponent Which thumbstick to get, only support LeftStick, and RightStick.
리턴 Vector2

GetPastTrigger() 공개 메소드

Get the past trigger position.
public GetPastTrigger ( GamePadComponent com ) : float
com GamePadComponent Which trigger to get, only support LeftTrigger, and RightTrigger.
리턴 float

GetThumbstickPosition() 공개 메소드

Get the position of the thumbstick control as a 2D vector.
public GetThumbstickPosition ( GamePadComponent com ) : Vector2
com GamePadComponent Which thumbstick to get, only support LeftStick, and RightStick.
리턴 Vector2

GetThumbstickPositionDifference() 공개 메소드

Get the difference of the thumbstick between the current and previous state.
public GetThumbstickPositionDifference ( GamePadComponent com ) : Vector2
com GamePadComponent Which thumbstick to get, only support LeftStick, and RightStick.
리턴 Vector2

GetTrigger() 공개 메소드

Get the trigger position.
public GetTrigger ( GamePadComponent com ) : float
com GamePadComponent Which trigger to get, only support LeftTrigger, and RightTrigger.
리턴 float

GetTriggerDifference() 공개 메소드

Get the difference of the trigger between the current and previous state.
public GetTriggerDifference ( GamePadComponent com ) : float
com GamePadComponent Which trigger to get, only support LeftTrigger, and RightTrigger.
리턴 float

IsButtonClicked() 공개 메소드

Determine if the specified button is clicked. This means that the button is down right now but wasn't always pressed down.
public IsButtonClicked ( GamePadComponent com ) : bool
com GamePadComponent The button to check if pressed. Supports A, B, X, Y, Back, Start, BigButton, LeftShoulder, LeftStick, RightShoulder, RightStick, and the D-Pad.
리턴 bool

IsButtonPressed() 공개 메소드

Determine if the specified button is pressed.
public IsButtonPressed ( GamePadComponent com ) : bool
com GamePadComponent The button to check if pressed. Supports A, B, X, Y, Back, Start, BigButton, LeftShoulder, LeftStick, RightShoulder, RightStick, and the D-Pad.
리턴 bool

SetVibration() 공개 메소드

Set the game pad's vibration.
public SetVibration ( float motor, bool leftMotor ) : bool
motor float The speed of the motor, between 0.0 and 1.0.
leftMotor bool true if the vibration should be set on the left, low-frequency, motor. false if the vibration should be set on the right, high-frequency, motor.
리턴 bool

SetVibration() 공개 메소드

Set the game pad's vibration.
public SetVibration ( float leftMotor, float rightMotor ) : bool
leftMotor float The speed of the left motor, between 0.0 and 1.0. This motor is a low-frequency motor.
rightMotor float The speed of the right motor, between 0.0 and 1.0. This motor is a high-frequency motor.
리턴 bool