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
ConstructorDescriptionWalkToBehavior
(GridAgent agent, int destinationX, int destinationY, double speed) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDestination
(GridAgent gridAgent, int destinationX, int destinationY) void
executeBehavior
(Agent agent) double
getSpeed()
void
setSpeed
(double speed) void
startBehavior
(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:
startBehavior
in classLifecycleBehavior
-
executeBehavior
-
addDestination
-
setSpeed
public void setSpeed(double speed) -
getCurrentDestination
-
getSpeed
public double getSpeed()
-