|
@@ -23,6 +23,7 @@ public class JoystickHandler implements KeyListener{
|
|
|
|
|
|
|
|
List<JoystickListener> listeners;
|
|
List<JoystickListener> listeners;
|
|
|
Set<Integer> keys;
|
|
Set<Integer> keys;
|
|
|
|
|
+ public static boolean REPEAT = false;
|
|
|
public static Joystick j = new Joystick();;
|
|
public static Joystick j = new Joystick();;
|
|
|
|
|
|
|
|
public JoystickHandler()
|
|
public JoystickHandler()
|
|
@@ -157,7 +158,7 @@ public class JoystickHandler implements KeyListener{
|
|
|
keys.add(e.getKeyCode());
|
|
keys.add(e.getKeyCode());
|
|
|
updateJoystickPosition();
|
|
updateJoystickPosition();
|
|
|
|
|
|
|
|
- if(!keys.equals(keysCopy))
|
|
|
|
|
|
|
+ if(REPEAT || !keys.equals(keysCopy) )
|
|
|
{
|
|
{
|
|
|
onJoystickMoved(j);
|
|
onJoystickMoved(j);
|
|
|
}
|
|
}
|
|
@@ -173,7 +174,7 @@ public class JoystickHandler implements KeyListener{
|
|
|
keys.remove(e.getKeyCode());
|
|
keys.remove(e.getKeyCode());
|
|
|
updateJoystickPosition();
|
|
updateJoystickPosition();
|
|
|
|
|
|
|
|
- if(!keys.equals(keysCopy))
|
|
|
|
|
|
|
+ if(REPEAT || !keys.equals(keysCopy))
|
|
|
{
|
|
{
|
|
|
onJoystickMoved(j);
|
|
onJoystickMoved(j);
|
|
|
}
|
|
}
|