Gamepad Protocol Reference
| Conforms to | NSObject | 
|---|---|
| Declared in | GamePad.h | 
– connectGamepad
required method
	Trigger the cloud machine to insert the virtual Gamepad.
- (void)connectGamepadDiscussion
Trigger the cloud machine to insert the virtual Gamepad.
Declared In
GamePad.h
– disconnectGamepad
required method
	Trigger the cloud machine to pull out the virtual Gamepad.
- (void)disconnectGamepadDiscussion
Trigger the cloud machine to pull out the virtual Gamepad.
Declared In
GamePad.h
– onGamepadKey:down:
required method
	Trigger a key event of the cloud Gamepad.
- (void)onGamepadKey:(NSInteger)keycode down:(BOOL)downParameters
keycode | 
						The keycode. Please refer to WindowsKeyEvent.h for the definition of key codes.  | 
					
|---|---|
down | 
						true if the button is pressed, false if the button is released.  | 
					
Discussion
Trigger a key event of the cloud Gamepad.
Declared In
GamePad.h
– onGamepadStick:x:y:
required method
	Trigger a stick event of the cloud Gamepad.
- (void)onGamepadStick:(KeyType)type x:(NSInteger)x y:(NSInteger)yParameters
type | 
						The stick type. See KeyTypeLS, KeyTypeRS in this file.  | 
					
|---|---|
x | 
						The X coordinate of the stick  | 
					
y | 
						The Y coordinate of the stick  | 
					
Discussion
Trigger a stick event of the cloud Gamepad.
Declared In
GamePad.h
– onGamepadTrigger:value:down:
required method
	Trigger a trigger event of the cloud Gamepad.
- (void)onGamepadTrigger:(KeyType)type value:(NSInteger)value down:(BOOL)downParameters
type | 
						The trigger type. See KeyTypeLT, KeyTypeRT in this file.  | 
					
|---|---|
value | 
						The absolute position of the trigger control. The value is normalized to a range from 0 (released) to 255 (fully pressed).  | 
					
down | 
						true if the trigger is pressed, false if the trigger is released.  | 
					
Discussion
Trigger a trigger event of the cloud Gamepad.
Declared In
GamePad.h