C# Class OVRGamepadController

OVRGamepadController is an interface class to a gamepad controller.
Inheritance: MonoBehaviour
显示文件 Open project: leapmotion/ImageGrid Class Usage Examples

Public Properties

Property Type Description
AndroidAxisNames string[]
AndroidButtonNames string[]
AxisNames string[]
ButtonNames string[]
DefaultButtonIds int[]
DesktopAxisNames string[]
DesktopButtonNames string[]
ReadAxis ReadAxisDelegate
ReadButton ReadButtonDelegate

Public Methods

Method Description
DefaultReadAxis ( Axis, axis ) : float

GPC_GetAxis The default delegate for retrieving axis info.

DefaultReadButton ( Button, button ) : bool

Uses XInput to check if the given Button is down.

GPC_Destroy ( ) : bool

GPC_Destroy

GPC_GetAxis ( Axis, axis ) : float

Returns the current value of the given Axis.

GPC_GetButton ( Button, button ) : bool

Returns true if the given Button is down.

GPC_GetButtonDown ( Button, button ) : bool

Returns true if the given Button was pressed this frame.

GPC_GetButtonUp ( Button, button ) : bool

Returns true if the given Button was released this frame.

GPC_Initialize ( ) : bool

GPC_Initialize.

GPC_IsAvailable ( ) : bool

Returns true if the gamepad controller is available.

GPC_Test ( ) : void
GPC_Update ( ) : bool

GPC_Update

LateUpdate ( ) : void
OnDestroy ( ) : void
SetAxisNames ( string axisNames ) : void

Sets the current names for all gamepad axes.

SetButtonNames ( string buttonNames ) : void

Sets the current Unity input names for all gamepad buttons.

SetReadAxisDelegate ( ReadAxisDelegate del ) : void
SetReadButtonDelegate ( ReadButtonDelegate del ) : void
Start ( ) : void
Update ( ) : void

Private Methods

Method Description
GPC_LateUpdate ( ) : void
OVRGamepadController ( ) : System
OVR_GamepadController_Destroy ( ) : bool
OVR_GamepadController_GetAxis ( int axis ) : float
OVR_GamepadController_GetButton ( int button ) : bool
OVR_GamepadController_Initialize ( ) : bool
OVR_GamepadController_Update ( ) : bool

Method Details

DefaultReadAxis() public static method

GPC_GetAxis The default delegate for retrieving axis info.
public static DefaultReadAxis ( Axis, axis ) : float
axis Axis, Axis.
return float

DefaultReadButton() public static method

Uses XInput to check if the given Button is down.
public static DefaultReadButton ( Button, button ) : bool
button Button,
return bool

GPC_Destroy() public static method

GPC_Destroy
public static GPC_Destroy ( ) : bool
return bool

GPC_GetAxis() public static method

Returns the current value of the given Axis.
public static GPC_GetAxis ( Axis, axis ) : float
axis Axis,
return float

GPC_GetButton() public static method

Returns true if the given Button is down.
public static GPC_GetButton ( Button, button ) : bool
button Button,
return bool

GPC_GetButtonDown() public static method

Returns true if the given Button was pressed this frame.
public static GPC_GetButtonDown ( Button, button ) : bool
button Button,
return bool

GPC_GetButtonUp() public static method

Returns true if the given Button was released this frame.
public static GPC_GetButtonUp ( Button, button ) : bool
button Button,
return bool

GPC_Initialize() public static method

GPC_Initialize.
public static GPC_Initialize ( ) : bool
return bool

GPC_IsAvailable() public static method

Returns true if the gamepad controller is available.
public static GPC_IsAvailable ( ) : bool
return bool

GPC_Test() public method

public GPC_Test ( ) : void
return void

GPC_Update() public static method

GPC_Update
public static GPC_Update ( ) : bool
return bool

LateUpdate() public method

public LateUpdate ( ) : void
return void

OnDestroy() public method

public OnDestroy ( ) : void
return void

SetAxisNames() public static method

Sets the current names for all gamepad axes.
public static SetAxisNames ( string axisNames ) : void
axisNames string
return void

SetButtonNames() public static method

Sets the current Unity input names for all gamepad buttons.
public static SetButtonNames ( string buttonNames ) : void
buttonNames string Button names.
return void

SetReadAxisDelegate() public static method

public static SetReadAxisDelegate ( ReadAxisDelegate del ) : void
del ReadAxisDelegate
return void

SetReadButtonDelegate() public static method

public static SetReadButtonDelegate ( ReadButtonDelegate del ) : void
del ReadButtonDelegate
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

AndroidAxisNames public_oe static_oe property

The default Android Unity input name for each gamepad Axis.
public static string[] AndroidAxisNames
return string[]

AndroidButtonNames public_oe static_oe property

The default Android Unity input name for each gamepad Button.
public static string[] AndroidButtonNames
return string[]

AxisNames public_oe static_oe property

The current Unity input names for all gamepad axes.
public static string[] AxisNames
return string[]

ButtonNames public_oe static_oe property

The current Unity input names for all gamepad buttons.
public static string[] ButtonNames
return string[]

DefaultButtonIds public_oe static_oe property

public static int[] DefaultButtonIds
return int[]

DesktopAxisNames public_oe static_oe property

The default Unity input name for each gamepad Axis.
public static string[] DesktopAxisNames
return string[]

DesktopButtonNames public_oe static_oe property

The default Unity input name for each gamepad Button.
public static string[] DesktopButtonNames
return string[]

ReadAxis public_oe static_oe property

Occurs when an axis has been read.
public static ReadAxisDelegate ReadAxis
return ReadAxisDelegate

ReadButton public_oe static_oe property

Occurs when a button has been read.
public static ReadButtonDelegate ReadButton
return ReadButtonDelegate