C# Класс UniMoveController, UniMove

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

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

Метод Описание
Disconnect ( ) : void

Disconnect the controller

EnableOrientation ( ) : void
GetButton ( PSMoveButton b ) : bool

Returns true if "button" is currently down.

GetButtonDown ( PSMoveButton b ) : bool

Returns true if "button" is pressed down this instant.

GetButtonUp ( PSMoveButton b ) : bool

Returns true if "button" is released this instant.

GetNumConnected ( ) : int

Static function that returns the number of *all* controller connections. This count will tally both USB and Bluetooth connections. Note that one physical controller, then, might register multiple connections. To discern between different connection types, see the ConnectionType property below.

HasCalibration ( ) : bool
HasOrientation ( ) : bool
Init ( int index ) : bool

Returns whether the connecting succeeded or not. NOTE! This function does NOT pair the controller by Bluetooth. If the controller is not already paired, it can only be connected by USB. See README for more information.

InitOrientation ( ) : void
ResetOrientation ( ) : void
SetLED ( Color color ) : void

Sets the LED color

SetLED ( byte r, byte g, byte b ) : void

Sets the LED color

SetRumble ( float rumble ) : void

Sets the amount of rumble

Приватные методы

Метод Описание
OnApplicationQuit ( ) : void
ProcessData ( ) : void

Process all the raw data on the Playstation Move controller

Update ( ) : void
psmove_connect ( ) : IntPtr
psmove_connect_by_id ( int id ) : IntPtr
psmove_connection_type ( IntPtr move ) : PSMoveConnectionType
psmove_count_connected ( ) : int
psmove_disconnect ( IntPtr move ) : void
psmove_enable_orientation ( IntPtr move, int enabled ) : void
psmove_get_accelerometer ( IntPtr move, int &ax, int &ay, int &az ) : void
psmove_get_accelerometer_frame ( IntPtr move, PSMove_Frame frame, float &ax, float &ay, float &az ) : void
psmove_get_battery ( IntPtr move ) : PSMove_Battery_Level
psmove_get_button_events ( IntPtr move, uint &pressed, uint &released ) : uint
psmove_get_buttons ( IntPtr move ) : uint
psmove_get_gyroscope ( IntPtr move, int &gx, int &gy, int &gz ) : void
psmove_get_gyroscope_frame ( IntPtr move, PSMove_Frame frame, float &gx, float &gy, float &gz ) : void
psmove_get_magnetometer ( IntPtr move, int &mx, int &my, int &mz ) : void
psmove_get_orientation ( IntPtr move, float &q0, float &q1, float &q2, float &q3 ) : void
psmove_get_serial ( IntPtr move ) : string
psmove_get_temperature ( IntPtr move ) : float
psmove_get_trigger ( IntPtr move ) : char
psmove_has_calibration ( IntPtr move ) : int
psmove_has_orientation ( IntPtr move ) : int
psmove_pair ( IntPtr move ) : int
psmove_poll ( IntPtr move ) : uint
psmove_reset_orientation ( IntPtr move ) : void
psmove_set_leds ( IntPtr move, char r, char g, char b ) : void
psmove_set_rumble ( IntPtr move, char rumble ) : void
psmove_update_leds ( IntPtr move ) : int

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

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

Disconnect the controller
public Disconnect ( ) : void
Результат void

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

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

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

Returns true if "button" is currently down.
public GetButton ( PSMoveButton b ) : bool
b PSMoveButton
Результат bool

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

Returns true if "button" is pressed down this instant.
public GetButtonDown ( PSMoveButton b ) : bool
b PSMoveButton
Результат bool

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

Returns true if "button" is released this instant.
public GetButtonUp ( PSMoveButton b ) : bool
b PSMoveButton
Результат bool

GetNumConnected() публичный статический Метод

Static function that returns the number of *all* controller connections. This count will tally both USB and Bluetooth connections. Note that one physical controller, then, might register multiple connections. To discern between different connection types, see the ConnectionType property below.
public static GetNumConnected ( ) : int
Результат int

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

public HasCalibration ( ) : bool
Результат bool

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

public HasOrientation ( ) : bool
Результат bool

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

Returns whether the connecting succeeded or not. NOTE! This function does NOT pair the controller by Bluetooth. If the controller is not already paired, it can only be connected by USB. See README for more information.
public Init ( int index ) : bool
index int
Результат bool

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

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

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

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

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

Sets the LED color
public SetLED ( Color color ) : void
color Color Unity's Color type
Результат void

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

Sets the LED color
public SetLED ( byte r, byte g, byte b ) : void
r byte Red value of the LED color (0-255)
g byte Green value of the LED color (0-255)
b byte Blue value of the LED color (0-255)
Результат void

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

Sets the amount of rumble
public SetRumble ( float rumble ) : void
rumble float the rumble amount (0-1)
Результат void