C# 클래스 UniMoveController, UniMove

상속: MonoBehaviour
파일 보기 프로젝트 열기: CopenhagenGameCollective/UniMove 1 사용 예제들

공개 메소드들

메소드 설명
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