public interface Gamepad
| Modifier and Type | Interface and Description |
|---|---|
static class |
Gamepad.KeyType
The type of a general controller button
|
| Modifier and Type | Method and Description |
|---|---|
void |
connectGamepad()
Trigger the cloud machine to insert the virtual Gamepad.
|
void |
disconnectGamepad()
Trigger the cloud machine to pull out the virtual Gamepad.
|
void |
onGamepadKey(int keycode,
boolean down)
Trigger a key event of the cloud Gamepad.
|
void |
onGamepadStick(Gamepad.KeyType type,
int x,
int y)
Trigger a stick event of the cloud Gamepad.
|
void |
onGamepadTrigger(Gamepad.KeyType type,
int value,
boolean down)
Trigger a trigger event of the cloud Gamepad.
|
void connectGamepad()
void disconnectGamepad()
void onGamepadKey(int keycode,
boolean down)
keycode - The keycode. Please refer to WindowsKeyEvent for the
definition of key codes.down - true if the button is pressed, false if the button is released.void onGamepadStick(Gamepad.KeyType type, int x, int y)
type - The stick type. See Gamepad.KeyType.LS, Gamepad.KeyType.RS.x - The X coordinate of the sticky - The Y coordinate of the stickvoid onGamepadTrigger(Gamepad.KeyType type, int value, boolean down)
type - The trigger type. See Gamepad.KeyType.LT, Gamepad.KeyType.RT.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.