25 lines
468 B
Java
25 lines
468 B
Java
package ai.state;
|
|
|
|
import ai.AITransition;
|
|
import entity.Entity;
|
|
import game.GameLoop;
|
|
import state.State;
|
|
|
|
public class Stand extends AIState {
|
|
private int alive;
|
|
|
|
public Stand() {
|
|
this.alive = 0;
|
|
}
|
|
|
|
@Override
|
|
public AITransition initTransition() {
|
|
return new AITransition("wander", ((state, eneity) -> alive >= GameLoop.ups * 3));
|
|
}
|
|
|
|
@Override
|
|
public void update(State state, Entity entity) {
|
|
alive++;
|
|
}
|
|
}
|