This commit is contained in:
Jaggernaut555
2018-01-09 13:08:30 +00:00
committed by GitHub
5 changed files with 81 additions and 37 deletions

View File

@@ -108,7 +108,7 @@ public abstract class NonPlayerCharacter extends GameObject implements Updatable
LogManager.LOGGER.severe("FIXME: moveTo:NonPlayerCharacter, Direction is null");
}
if (incrementLocation()) {
if (incrementLocation(1)) {
lastAction = Action.WALKING;
return true;
}
@@ -131,7 +131,7 @@ public abstract class NonPlayerCharacter extends GameObject implements Updatable
getWorld().getX(), getWorld().getY() - 1) <= MAX_FACTORY_DISTANCE) {
if (!moveTo(8, 0, 0)) {
setDirection(Direction.NORTH);
incrementLocation();
incrementLocation(1);
}
return true;
} else {
@@ -143,7 +143,7 @@ public abstract class NonPlayerCharacter extends GameObject implements Updatable
getWorld().getX() + 1, getWorld().getY()) <= MAX_FACTORY_DISTANCE) {
if (!moveTo(15, 7, 0)) {
setDirection(Direction.EAST);
incrementLocation();
incrementLocation(1);
}
return true;
} else {
@@ -154,7 +154,7 @@ public abstract class NonPlayerCharacter extends GameObject implements Updatable
getWorld().getX(), getWorld().getY() + 1) <= MAX_FACTORY_DISTANCE) {
if (!moveTo(8, 15, 0)) {
setDirection(Direction.SOUTH);
incrementLocation();
incrementLocation(1);
}
return true;
} else {
@@ -165,7 +165,7 @@ public abstract class NonPlayerCharacter extends GameObject implements Updatable
getWorld().getX() - 1, getWorld().getY()) <= MAX_FACTORY_DISTANCE) {
if (!moveTo(0, 7, 0)) {
setDirection(Direction.WEST);
incrementLocation();
incrementLocation(1);
}
return true;
} else {