Removed redundant null checks for AI

This commit is contained in:
Collin Smith 2019-04-12 01:43:29 -07:00
parent 022aea2013
commit 7f76f4c680

View File

@ -134,12 +134,12 @@ public class Monster extends Entity {
@Override
public void interact(GameScreen gameScreen) {
if (!monstats.interact) return;
if (ai != null) ai.interact(gameScreen);
ai.interact(gameScreen);
}
@Override
public void update(float delta) {
if (ai != null) ai.update(delta);
ai.update(delta);
super.update(delta);
}
@ -208,8 +208,6 @@ public class Monster extends Entity {
@Override
protected void appendToStatus(StringBuilder builder) {
if (ai != null) {
builder.append(ai.getState()).append('\n');
}
builder.append(ai.getState()).append('\n');
}
}