Commit 3ce638c4 authored by Nico Mack's avatar Nico Mack

Code cleanup

parent aa9451d4
......@@ -69,10 +69,10 @@ public class StateManager {
protected Timer movementTimer = new Timer(Attenuator.getMovementCooldown(), new MovementTimerListener());
/** Flag raised by ActionListener of rotationTimer */
private boolean rotationTimerExpired = false;
protected boolean rotationTimerExpired = false;
/** Flag raised by ActionListener of movementTimer */
private boolean movementTimerExpired = false;
protected boolean movementTimerExpired = false;
/** The last position change managed by the {@link StateManager}. */
private Point lastPosition;
......@@ -103,7 +103,7 @@ public class StateManager {
private static final Logger logger = LoggerFactory.getLogger(StateManager.class.getSimpleName());
public static final Point UNDEFINED = new Point(-10, -10, 0);
private static final Point UNDEFINED = new Point(-10, -10, 0);
// ---------------------------------------------------------------------------
// ***************************************************************************
......@@ -279,13 +279,8 @@ public class StateManager {
@Override
public void actionPerformed(@Nullable ActionEvent event) {
rotationTimerExpired = true;
// checkForConsistency();
wasRotating = true;
rotationTimer.stop();
if (logger.isTraceEnabled()) {
logger.trace("Rotation stopped!"); //$NON-NLS-1$
}
}
}
......@@ -301,13 +296,8 @@ public class StateManager {
@Override
public void actionPerformed(@Nullable ActionEvent event) {
movementTimerExpired = true;
// checkForConsistency();
wasMoving = true;
movementTimer.stop();
if (logger.isTraceEnabled()) {
logger.trace("Movement stopped!"); //$NON-NLS-1$
}
}
}
......@@ -400,7 +390,7 @@ public class StateManager {
while (stateIterator.hasNext()) {
NuiState state = stateIterator.next();
Transition transition = state.move(position); // TODO ConcurrentModificationException
Transition transition = state.move(position);
if (transition != null) {
transitions.add(transition);
if (logger.isTraceEnabled()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment