|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNGP.Timer
cs015.Swarm.BeeBehavior
cs015.Swarm.MoveBehavior
cs015.Swarm.FollowLeaderBehavior
This class represents a behavior that moves one Directional object towards another Directional object.
MoveBehavior
,
BeeBehavior
Constructor Summary | |
FollowLeaderBehavior(Directional target,
Locatable leader)
This constructor builds this behavior with a Directional to act on and a Directional to follow. |
|
FollowLeaderBehavior(Locatable leader)
This constructor builds this behavior with a Directional to follow as a leader and a null Directional as its target. |
Method Summary | |
void |
activate()
You should not call this method yourself. It will be called for you by the support code. |
BeeBehavior |
copy()
This method returns a copy of the behavior. |
Methods inherited from class cs015.Swarm.BeeBehavior |
getTarget, setTarget |
Methods inherited from class NGP.Timer |
actionPerformed, getDelay, setDelay, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FollowLeaderBehavior(Locatable leader)
leader
- the Locatable to follow.public FollowLeaderBehavior(Directional target, Locatable leader)
target
- The Directional this behavior will act on.leader
- The Directional the target will be following.Method Detail |
public void activate()
activate
method.
activate
in class MoveBehavior
public BeeBehavior copy()
setTarget(...)
method . The leader of the copy will be the same as the
original behavior's.
copy
in class BeeBehavior
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |