Files
java-2d-game-engine-example/src/ai/state/Stand.java
2026-09-04 12:52:46 +09:00

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++;
}
}