public class BalancedCompoundSteeringBehavior extends CompoundSteeringBehavior
CompoundSteeringBehavior
CompoundSteeringBehavior.steerBehaviorsLayerList
behaviors
timePerFrame, velocity
Constructor and Description |
---|
BalancedCompoundSteeringBehavior(Agent agent) |
BalancedCompoundSteeringBehavior(Agent agent,
com.jme3.scene.Spatial spatial) |
Modifier and Type | Method and Description |
---|---|
void |
addSteerBehavior(AbstractSteeringBehavior behavior)
Adds a behavior to the compound behavior.
|
protected com.jme3.math.Vector3f |
calculatePartialForce(AbstractSteeringBehavior behavior)
Calculates the steering force of a single behavior
|
protected void |
calculateTotalForce()
Calculates the total force if it is not calculated.
|
protected void |
partialForceCalculated()
Reset the forces if we have finished with all the forces.
|
void |
setStrengthIsBalanced(boolean strengthIsBalanced)
Turn on or off the balance.
|
addSteerBehavior, calculateRawSteering, controlUpdate, removeSteerBehavior
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControl
agentTotalMass, calculateNewVelocity, convertToGameEntities, getBrakingFactor, getTimePerFrame, getVelocity, rotateAgent, setBrakingFactor, setTimePerFrame, setVelocity
controlRender
public BalancedCompoundSteeringBehavior(Agent agent)
public BalancedCompoundSteeringBehavior(Agent agent, com.jme3.scene.Spatial spatial)
public void addSteerBehavior(AbstractSteeringBehavior behavior)
CompoundSteeringBehavior
addSteerBehavior
in class CompoundSteeringBehavior
behavior
- Behavior that you want to addaddSteerBehavior(com.jme3.ai.agents.behaviors.npc.steering.AbstractSteeringBehavior)
public void setStrengthIsBalanced(boolean strengthIsBalanced)
protected com.jme3.math.Vector3f calculatePartialForce(AbstractSteeringBehavior behavior)
CompoundSteeringBehavior
calculatePartialForce
in class CompoundSteeringBehavior
behavior
- The behavior.CompoundSteeringBehavior.calculatePartialForce(com.jme3.ai.agents.behaviors.npc.steering.AbstractSteeringBehavior)
protected void calculateTotalForce()
protected void partialForceCalculated()