Class VInputController
The controller class of VInput which contains Buttons and Axes.
VInput 控制器類別,包含按鈕群及軸群。
Inherited Members
Namespace: Votanic.vIO.VInput
Assembly: Votanic.vIO.dll
Syntax
[Serializable]
public class VInputController : Device
Fields
id
ID of controller.
控制器的識別碼。
Declaration
public string id
Field Value
Type | Description |
---|---|
System.String |
Properties
axes
Axes of controller.
控制器的軸群。
Declaration
public VInputAxes axes { get; }
Property Value
Type | Description |
---|---|
VInputAxes |
buttons
Buttons of controller.
控制器的按鈕群。
Declaration
public VInputButtons buttons { get; }
Property Value
Type | Description |
---|---|
VInputButtons |
isActive
Return true if the controller is active now. 當控制器現在是活動狀態時傳回 true。
Declaration
public bool isActive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
isXboxController
Return true if the controller is Xbox controller. 當控制器為 Xbox 時傳回 true。
Declaration
public bool isXboxController { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
isXInput
Return true if the controller is XInput mode. 當控制器為 XInput mode 時傳回 true。
Declaration
public bool isXInput { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
numberOfAxis
Return the number of axis of current input mode.
傳回目前輸入模式的軸數量
Declaration
public int numberOfAxis { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
numberOfButton
Return the number of button of current input mode.
傳回目前輸入模式的按鈕數量
Declaration
public int numberOfButton { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
BindAddress(String)
Bind an address to VInput controller.
為 VInput 控制器綁定位址。
BindAddress("Hand.Tracker")
Declaration
public void BindAddress(string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | Address for finding controller |
InputMode(Boolean)
Switch the input mode of controller.
切換控制器的輸入模式。
InputMode(true)
Declaration
public void InputMode(bool xInput)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | xInput | XInput mode if true |
Vibrate(Single, Single)
Vibrate the controller.
使控制器震動。
Vibrate(1, 1)
Declaration
public void Vibrate(float left, float right)
Parameters
Type | Name | Description |
---|---|---|
System.Single | left | Left side strength |
System.Single | right | Right side strength |