mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-19 16:57:20 +07:00
Removed redundant null checks for AI
This commit is contained in:
parent
022aea2013
commit
7f76f4c680
@ -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');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user