List of usage examples for com.badlogic.gdx.ai.steer Steerable newVector
public T newVector();
From source file:com.mygdx.game.CustomCollisionAvoidance.java
License:Apache License
/** Creates a {@code CollisionAvoidance} behavior for the specified owner and proximity. * @param owner the owner of this behavior * @param proximity the proximity of this behavior. */ public CustomCollisionAvoidance(Steerable<T> owner, Proximity<T> proximity) { super(owner, proximity); this.firstRelativePosition = owner.newVector(); this.firstRelativeVelocity = owner.newVector(); this.relativeVelocity = owner.newVector(); }
From source file:com.mygdx.game.CustomSeperation.java
License:Apache License
/** Creates a {@code Separation} behavior for the specified owner and proximity. * @param owner the owner of this behavior * @param proximity the proximity to detect the owner's neighbors */ public CustomSeperation(Steerable<T> owner, Proximity<T> proximity) { super(owner, proximity); this.toAgent = owner.newVector(); linear = owner.newVector();//from w w w . j ava 2s . c o m }