This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OuyaController c = OuyaController.getControllerByPlayer(i); | |
if(c != null) { | |
if(c.getButton(OuyaController.BUTTON_A)) { | |
//Do whatever it is you need to do. | |
//This can be repeated for each button on the controller | |
} | |
float axisY = c.getAxisValue(OuyaController.AXIS_LS_Y); | |
if(axisY > OuyaController.STICK_DEADZONE) { | |
switch(i) { //'i' being the player number if you're looping through the number of players | |
case 0: |
NewerOlder