Update walking queue on run toggle.

This commit is contained in:
Major-
2013-11-03 04:56:33 +00:00
parent 03216e1893
commit e93e60e143
+24 -2
View File
@@ -89,8 +89,6 @@ public final class Player extends Character {
}
}
/**
* The player's appearance.
@@ -157,6 +155,11 @@ public final class Player extends Character {
*/
private boolean regionChanged = false;
/**
* A flag indicating if this player is running.
*/
private boolean running = false;
/**
* The {@link GameSession} currently attached to this {@link Player}.
*/
@@ -625,4 +628,23 @@ public final class Player extends Character {
+ privilegeLevel + "]";
}
/**
* Gets whether the player is running or not.
*
* @return {@code true} if the player is running, otherwise {@code false}.
*/
public boolean isRunning() {
return running;
}
/**
* Sets whether the running toggle is enabled.
*
* @param running The toggle.
*/
public void setRunning(boolean running) {
this.running = running;
getWalkingQueue().setRunningQueue(running);
}
}