C# 클래스 XboxCtrlrInput.XCI

파일 보기 프로젝트 열기: JISyed/Unity-XboxCtrlrInput 1 사용 예제들

공개 메소드들

메소드 설명
DEBUG_LogControllerNames ( ) : void

DEBUG function. Log all controller names to Unity's console.

GetAxis ( XboxAxis axis ) : float

Returns the analog number of the specified axis from any controller.

GetAxis ( XboxAxis axis, XboxController controller ) : float

Returns the float number of the specified axis from a specified controller.

GetAxisRaw ( XboxAxis axis ) : float

Returns the float number of the specified axis from any controller without Unity's smoothing filter.

GetAxisRaw ( XboxAxis axis, XboxController controller ) : float

Returns the float number of the specified axis from a specified controller without Unity's smoothing filter.

GetButton ( XboxButton button ) : bool

Returns true if the specified button is held down by any controller.

GetButton ( XboxButton button, XboxController controller ) : bool

Returns true if the specified button is held down by a specified controller.

GetButtonDown ( XboxButton button ) : bool

Returns true at the frame the specified button starts to press down (not held down) by any controller.

GetButtonDown ( XboxButton button, XboxController controller ) : bool

Returns true at the frame the specified button starts to press down (not held down) by a specified controller.

GetButtonUp ( XboxButton button ) : bool

Returns true at the frame the specified button is released by any controller.

GetButtonUp ( XboxButton button, XboxController controller ) : bool

Returns true at the frame the specified button is released by a specified controller.

GetDPad ( XboxDPad padDirection ) : bool

Returns true if the specified D-Pad direction is pressed down by any controller.

GetDPad ( XboxDPad padDirection, XboxController controller ) : bool

Returns true if the specified D-Pad direction is pressed down by a specified controller.

GetDPadDown ( XboxDPad padDirection ) : bool

Returns true at the frame the specified button is Pressed. Does NOT work on Linux with Wired Controllers.

GetDPadDown ( XboxDPad padDirection, XboxController controller ) : bool

Returns true at the frame the specified button is Pressed by a specified controller. Does NOT work on Linux with Wired Controllers.

GetDPadUp ( XboxDPad padDirection ) : bool

Returns true at the frame the specified button is released. Does NOT work on Linux with Wired Controllers.

GetDPadUp ( XboxDPad padDirection, XboxController controller ) : bool

Returns true at the frame the specified button is released by a specified controller. Does NOT work on Linux with Wired Controllers.

GetNumPluggedCtrlrs ( ) : int

Returns the number of Xbox controllers plugged to the computer.

IsPluggedIn ( int controllerNumber ) : bool

Determines if the controller is plugged in the specified controllerNumber. CAUTION: Only works on Windows Native (Desktop and Editor, not Web)!

비공개 메소드들

메소드 설명
AdjustAxisValues ( float axisValue, XboxAxis axis, int ctrlrNum ) : float
DetermineAxisCode ( XboxAxis axs, int ctrlrNum ) : string
DetermineButtonCode ( XboxButton btn, int ctrlrNum ) : string
DetermineDPad ( XboxDPad padDir, int ctrlrNum ) : string
DetermineDPadMac ( XboxDPad padDir, int ctrlrNum ) : string
DetermineDPadWirelessLinux ( XboxDPad padDir, int ctrlrNum ) : string
IsControllerNumberValid ( int ctrlrNum ) : bool
IsControllerWireless ( ) : bool
IsControllerWireless ( int ctrlNum ) : bool
OnLinux ( ) : bool
OnMac ( ) : bool
OnWindows ( ) : bool
OnWindowsNative ( ) : bool
RefactorRange ( float oldRangeValue, int ctrlrNum, XboxAxis axis ) : float
XInputApplyDeadzone ( float rawAxisValue, XboxAxis axis, XboxController controller ) : float
XInputGetAxisState ( GamePadThumbSticks xiThumbSticks, XboxAxis xciAxis ) : float
XInputGetAxisState ( GamePadTriggers xiTriggers, XboxAxis xciAxis ) : float
XInputGetButtonState ( GamePadButtons xiButtons, XboxButton xciBtn ) : ButtonState
XInputGetDPadState ( GamePadDPad xiDPad, XboxDPad xciDPad ) : ButtonState
XInputGetPaticularState ( int ctrlNum ) : GamePadState
XInputGetPaticularStatePrev ( int ctrlNum ) : GamePadState
XInputGetSingleState ( ) : GamePadState
XInputGetSingleStatePrev ( ) : GamePadState
XInputStillInCurrFrame ( ) : bool
XInputUpdateAllStates ( ) : void

메소드 상세

DEBUG_LogControllerNames() 공개 정적인 메소드

DEBUG function. Log all controller names to Unity's console.
public static DEBUG_LogControllerNames ( ) : void
리턴 void

GetAxis() 공개 정적인 메소드

Returns the analog number of the specified axis from any controller.
public static GetAxis ( XboxAxis axis ) : float
axis XboxAxis /// An identifier for the specified Xbox axis to be tested. ///
리턴 float

GetAxis() 공개 정적인 메소드

Returns the float number of the specified axis from a specified controller.
public static GetAxis ( XboxAxis axis, XboxController controller ) : float
axis XboxAxis /// An identifier for the specified Xbox axis to be tested. ///
controller XboxController /// An identifier for the specific controller on which to test the axis. ///
리턴 float

GetAxisRaw() 공개 정적인 메소드

Returns the float number of the specified axis from any controller without Unity's smoothing filter.
public static GetAxisRaw ( XboxAxis axis ) : float
axis XboxAxis /// An identifier for the specified Xbox axis to be tested. ///
리턴 float

GetAxisRaw() 공개 정적인 메소드

Returns the float number of the specified axis from a specified controller without Unity's smoothing filter.
public static GetAxisRaw ( XboxAxis axis, XboxController controller ) : float
axis XboxAxis /// An identifier for the specified Xbox axis to be tested. ///
controller XboxController /// An identifier for the specific controller on which to test the axis. ///
리턴 float

GetButton() 공개 정적인 메소드

Returns true if the specified button is held down by any controller.
public static GetButton ( XboxButton button ) : bool
button XboxButton /// Identifier for the Xbox button to be tested. ///
리턴 bool

GetButton() 공개 정적인 메소드

Returns true if the specified button is held down by a specified controller.
public static GetButton ( XboxButton button, XboxController controller ) : bool
button XboxButton /// Identifier for the Xbox button to be tested. ///
controller XboxController /// An identifier for the specific controller on which to test the button. ///
리턴 bool

GetButtonDown() 공개 정적인 메소드

Returns true at the frame the specified button starts to press down (not held down) by any controller.
public static GetButtonDown ( XboxButton button ) : bool
button XboxButton /// Identifier for the Xbox button to be tested. ///
리턴 bool

GetButtonDown() 공개 정적인 메소드

Returns true at the frame the specified button starts to press down (not held down) by a specified controller.
public static GetButtonDown ( XboxButton button, XboxController controller ) : bool
button XboxButton /// Identifier for the Xbox button to be tested. ///
controller XboxController /// An identifier for the specific controller on which to test the button. ///
리턴 bool

GetButtonUp() 공개 정적인 메소드

Returns true at the frame the specified button is released by any controller.
public static GetButtonUp ( XboxButton button ) : bool
button XboxButton /// Identifier for the Xbox button to be tested. ///
리턴 bool

GetButtonUp() 공개 정적인 메소드

Returns true at the frame the specified button is released by a specified controller.
public static GetButtonUp ( XboxButton button, XboxController controller ) : bool
button XboxButton /// Identifier for the Xbox button to be tested. ///
controller XboxController /// An identifier for the specific controller on which to test the button. ///
리턴 bool

GetDPad() 공개 정적인 메소드

Returns true if the specified D-Pad direction is pressed down by any controller.
public static GetDPad ( XboxDPad padDirection ) : bool
padDirection XboxDPad /// An identifier for the specified D-Pad direction to be tested. ///
리턴 bool

GetDPad() 공개 정적인 메소드

Returns true if the specified D-Pad direction is pressed down by a specified controller.
public static GetDPad ( XboxDPad padDirection, XboxController controller ) : bool
padDirection XboxDPad /// An identifier for the specified D-Pad direction to be tested. ///
controller XboxController /// An identifier for the specific controller on which to test the D-Pad. ///
리턴 bool

GetDPadDown() 공개 정적인 메소드

Returns true at the frame the specified button is Pressed. Does NOT work on Linux with Wired Controllers.
public static GetDPadDown ( XboxDPad padDirection ) : bool
padDirection XboxDPad
리턴 bool

GetDPadDown() 공개 정적인 메소드

Returns true at the frame the specified button is Pressed by a specified controller. Does NOT work on Linux with Wired Controllers.
public static GetDPadDown ( XboxDPad padDirection, XboxController controller ) : bool
padDirection XboxDPad
controller XboxController /// An identifier for the specific controller on which to test the button. ///
리턴 bool

GetDPadUp() 공개 정적인 메소드

Returns true at the frame the specified button is released. Does NOT work on Linux with Wired Controllers.
public static GetDPadUp ( XboxDPad padDirection ) : bool
padDirection XboxDPad
리턴 bool

GetDPadUp() 공개 정적인 메소드

Returns true at the frame the specified button is released by a specified controller. Does NOT work on Linux with Wired Controllers.
public static GetDPadUp ( XboxDPad padDirection, XboxController controller ) : bool
padDirection XboxDPad
controller XboxController /// An identifier for the specific controller on which to test the button. ///
리턴 bool

GetNumPluggedCtrlrs() 공개 정적인 메소드

Returns the number of Xbox controllers plugged to the computer.
public static GetNumPluggedCtrlrs ( ) : int
리턴 int

IsPluggedIn() 공개 정적인 메소드

Determines if the controller is plugged in the specified controllerNumber. CAUTION: Only works on Windows Native (Desktop and Editor, not Web)!
public static IsPluggedIn ( int controllerNumber ) : bool
controllerNumber int /// An identifier for the specific controller on which to test the axis. An int between 1 and 4. ///
리턴 bool