Quote:
Originally Posted by LFRobotics
Okay I get it - but why cant I just continue to use
Code:
Joystick joystick = new Joystick(1);
private Button button = new JoystickButton(joystick, 0);
to assign my buttons or even
Code:
private Button button = new JoystickButton(joystick, joystick.getRawButton(0));
instead of having to create a whole new class.
And if it is completely necessary to do so I would need some help - I have an idea of what to do but I would still need some guidance.
THANKS!
|
You don't need a whole new class. Writing the new class will just make it easier in the future to write code using the xbox controller, but they literally do the exact same thing.
Just using the JoystickButton along with the Joystick class is a perfectly fine way to do it. So for you I'd suggest you stick with the below for now.
Code:
Joystick joystick = new Joystick(1);
private Button button = new JoystickButton(joystick, 0);