init
This commit is contained in:
24
src/ai/state/Stand.java
Normal file
24
src/ai/state/Stand.java
Normal file
@@ -0,0 +1,24 @@
|
||||
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++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user