Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
1f03b2439b | |||
b2cac2f40d | |||
fa6950d5c9 | |||
0df8b37ddd | |||
d481df0f96 | |||
ae93dca1b9 | |||
0fdef7c01c | |||
481fe1f428 |
@@ -1343,7 +1343,7 @@ public class InGameState extends BaseState{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean axisMoved(Controller controller, int axisCode, float value){
|
public boolean axisMoved(Controller controller, int axisCode, float value){
|
||||||
GamepadUserInput userInput = null;
|
GamepadUserInput userInput;
|
||||||
|
|
||||||
if(Math.abs(value) > Ouya.STICK_DEADZONE){
|
if(Math.abs(value) > Ouya.STICK_DEADZONE){
|
||||||
userInput = new GamepadUserInput();
|
userInput = new GamepadUserInput();
|
||||||
@@ -1357,22 +1357,9 @@ public class InGameState extends BaseState{
|
|||||||
userInput.axisRightY = value;
|
userInput.axisRightY = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(Math.abs(value) <= Ouya.STICK_DEADZONE){
|
|
||||||
userInput = new GamepadUserInput();
|
|
||||||
if(axisCode == Ouya.AXIS_LEFT_X){
|
|
||||||
userInput.axisLeftX = 0.0f;
|
|
||||||
}else if(axisCode == Ouya.AXIS_LEFT_Y){
|
|
||||||
userInput.axisLeftY = 0.0f;
|
|
||||||
}else if(axisCode == Ouya.AXIS_RIGHT_X){
|
|
||||||
userInput.axisRightX = 0.0f;
|
|
||||||
}else if(axisCode == Ouya.AXIS_RIGHT_Y){
|
|
||||||
userInput.axisRightY = 0.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(userInput != null){
|
|
||||||
robotArmPositioningSystem.setUserInput(userInput);
|
robotArmPositioningSystem.setUserInput(userInput);
|
||||||
robotArmPositioningSystem.process();
|
robotArmPositioningSystem.process();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user