public class SlowBehaviour extends AbstractStrengthSteeringBehaviour
CompoundSteeringBehaviour,
SimpleMainBehaviour| Modifier and Type | Class and Description |
|---|---|
static class |
SlowBehaviour.ObstacleAvoindanceWithoutTimeInterval |
AbstractStrengthSteeringBehaviour.negativeScalarMultiplierAbstractSteeringBehaviour.IllegalBrakingFactorBehaviour.behaviourNullAgentExceptionvelocity| Constructor and Description |
|---|
SlowBehaviour(Agent agent,
int timeInterval,
float percentajeSlow)
Slows a steer behaviour resultant velocity.
|
SlowBehaviour(Agent agent,
int timeInterval,
float percentajeSlow,
com.jme3.scene.Spatial spatial) |
| Modifier and Type | Method and Description |
|---|---|
protected com.jme3.math.Vector3f |
calculateFullSteering()
If a bheaviour class extend from CompoundSteeringBehaviour instead
of AbstractSteeringBehaviout, It must implement this method instead of
calculateSteering().
|
protected void |
controlRender(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp) |
void |
reset()
Reset the slow behaviour
|
void |
setAcive(boolean active)
Turns on or off the slow behaviour
|
void |
setMaxBrakingFactor(float maxBrakingFactor) |
void |
setPercentajeSlow(float percentajeSlow) |
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControlagentTotalMass, calculateNewVelocity, controlUpdate, getBrakingFactor, getTPF, getVelocity, rotateAgent, setBrakingFactor, setTPF, setVelocitypublic SlowBehaviour(Agent agent, int timeInterval, float percentajeSlow)
behaviour - Steer behaviourtimeInterval - How much time for each slow iteration in nspercentajeSlow - What percentaje will be reduced the vecocity for each iteration, a float betwen 0 and 1SlowBehaviour.ObstacleAvoindanceWithoutTimeInterval - If time interval is not a positive integerAbstractSteeringBehaviour.AbstractSteeringBehaviour(com.jme3.ai.agents.Agent)public SlowBehaviour(Agent agent, int timeInterval, float percentajeSlow, com.jme3.scene.Spatial spatial)
public void setMaxBrakingFactor(float maxBrakingFactor)
public void setPercentajeSlow(float percentajeSlow)
percentajeSlow - float in the interval [0, 1]public void setAcive(boolean active)
active - public void reset()
protected void controlRender(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp)
controlRender in class com.jme3.scene.control.AbstractControlprotected com.jme3.math.Vector3f calculateFullSteering()
AbstractStrengthSteeringBehaviourcalculateFullSteering in class AbstractStrengthSteeringBehaviourAbstractSteeringBehaviour.calculateSteering()