enabled, limiter, owner| Constructor and Description |
|---|
Flee(Steerable<T> owner)
Creates a
Flee behavior for the specified owner. |
Flee(Steerable<T> owner,
Location<T> target)
Creates a
Flee behavior for the specified owner and target. |
| Modifier and Type | Method and Description |
|---|---|
protected SteeringAcceleration<T> |
calculateRealSteering(SteeringAcceleration<T> steering)
Calculates the steering acceleration produced by this behavior and writes it to the given steering output.
|
Flee<T> |
setEnabled(boolean enabled)
Sets this steering behavior on/off.
|
Flee<T> |
setLimiter(Limiter limiter)
Sets the limiter of this steering behavior.
|
Flee<T> |
setOwner(Steerable<T> owner)
Sets the owner of this steering behavior.
|
Flee<T> |
setTarget(Location<T> target)
Sets the target to seek.
|
calculateSteering, getActualLimiter, getLimiter, getOwner, isEnabled, newVectorpublic Flee(Steerable<T> owner)
Flee behavior for the specified owner.owner - the owner of this behavior.protected SteeringAcceleration<T> calculateRealSteering(SteeringAcceleration<T> steering)
SteeringBehavior
This method is called by SteeringBehavior.calculateSteering(SteeringAcceleration) when this steering behavior is enabled.
calculateRealSteering in class Seek<T extends com.badlogic.gdx.math.Vector<T>>steering - the steering acceleration to be calculated.public Flee<T> setOwner(Steerable<T> owner)
SteeringBehaviorpublic Flee<T> setEnabled(boolean enabled)
SteeringBehaviorsetEnabled in class Seek<T extends com.badlogic.gdx.math.Vector<T>>public Flee<T> setLimiter(Limiter limiter)
setLimiter in class Seek<T extends com.badlogic.gdx.math.Vector<T>>