Java 类com.badlogic.gdx.ai.steer.behaviors.LookWhereYouAreGoing 实例源码

项目:JACWfA    文件:scBlended.java   
@Override
public void init(RunConfig config) throws InvalidTestFormatException {
    super.init(config);
    Ann = new Agent(new Vector2(0, 0), 0);
    Bob = new Agent(new Vector2(10000, 0), 0);

    Arrive<Vector2> aSB = new Arrive<Vector2>(Ann, Bob);
    LookWhereYouAreGoing<Vector2> lwyagSB = new LookWhereYouAreGoing<Vector2>(
            Ann);

    BlendedSteering<Vector2> sb = new BlendedSteering<Vector2>(Ann)
            .setLimiter(NullLimiter.NEUTRAL_LIMITER).add(aSB, 1f)
            .add(lwyagSB, 1f);

    Ann.setSteeringBehavior(sb);
}