General clean-up. Fixed GateKeeper, updated startup scripts, fixed warnings.

This commit is contained in:
cognitivegears
2016-10-30 22:09:45 -05:00
parent c341825239
commit e90aa49444
9 changed files with 60 additions and 10 deletions

View File

@@ -64,7 +64,7 @@ public class GateKeeper extends Item {
public void Animate() {
if (behavior == 1) {
if (x != goToX && y != goToY) {
if (x != goToX || y != goToY) {
if (x != goToX) {
int diff = Math.abs(goToX - x);
int dir = diff / (goToX - x);

View File

@@ -240,9 +240,11 @@ public class Sentry extends Item {
if (behavior == -1) {
if (carrying == null) {
x = robot.x + robot.width / 2 - width / 2;
y = robot.y + robot.height / 2 - height / 2;
PicksUp(robot);
if(robot != null) {
x = robot.x + robot.width / 2 - width / 2;
y = robot.y + robot.height / 2 - height / 2;
PicksUp(robot);
}
}
}

View File

@@ -13,7 +13,7 @@ import com.droidquest.levels.Level;
public class BatteryIn extends Material {
// Charges the Battery when an Energy Crystal is passed over it.
public void BatteryIn() {
public BatteryIn() {
passable = true;
GenerateIcons();
}