Package org.baseagent.behaviors.grid
Class WalkToBehavior
java.lang.Object
org.baseagent.behaviors.LifecycleBehavior
org.baseagent.behaviors.grid.WalkToBehavior
- All Implemented Interfaces:
Behavior
- Direct Known Subclasses:
RandomWanderBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionWalkToBehavior(GridAgent agent, int destinationX, int destinationY, double speed) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDestination(GridAgent gridAgent, int destinationX, int destinationY) voidexecuteBehavior(Agent agent) doublegetSpeed()voidsetSpeed(double speed) voidstartBehavior(Agent agent) Methods inherited from class org.baseagent.behaviors.LifecycleBehavior
endBehavior, isEnded, isPaused, isStarted, pauseBehavior, restartBehavior, resumeBehavior
-
Constructor Details
-
WalkToBehavior
public WalkToBehavior() -
WalkToBehavior
-
-
Method Details
-
startBehavior
- Overrides:
startBehaviorin classLifecycleBehavior
-
executeBehavior
-
addDestination
-
setSpeed
public void setSpeed(double speed) -
getCurrentDestination
-
getSpeed
public double getSpeed()
-