Package it.unibo.alchemist.model.actions
Class FollowAtDistance
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Action
,java.io.Serializable
public final class FollowAtDistance<T extends Object> extends AbstractAction<T>
Makes the Node follow a target defined in a Molecule with some speed, but keeping a distance from it.
-
-
Constructor Summary
Constructors Constructor Description FollowAtDistance(Node<T> node, Reaction<T> reaction, Environment<T, Euclidean2DPosition> environment, Molecule target, Double distance, Double speed)
-
Method Summary
Modifier and Type Method Description FollowAtDistance<T>
cloneAction(Node<T> node, Reaction<T> reaction)
Unit
execute()
Context
getContext()
-
-
Constructor Detail
-
FollowAtDistance
FollowAtDistance(Node<T> node, Reaction<T> reaction, Environment<T, Euclidean2DPosition> environment, Molecule target, Double distance, Double speed)
- Parameters:
node
- the followerreaction
- the reaction hosting this actionenvironment
- the environment containing the nodestarget
- molecule from which to read the destination to follow in the form of coordinates or a tupledistance
- the distance to keep from the destinationspeed
- the maximum speed
-
-
Method Detail
-
cloneAction
FollowAtDistance<T> cloneAction(Node<T> node, Reaction<T> reaction)
-
getContext
Context getContext()
-
-
-
-