net.nexttext.behaviour.standard
Class Follow

java.lang.Object
  extended by net.nexttext.behaviour.AbstractAction
      extended by net.nexttext.behaviour.standard.Follow
All Implemented Interfaces:
Action, TargetingAction

public class Follow
extends AbstractAction
implements TargetingAction


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
Follow(Locatable followed)
          Follow the motion of an object.
Follow(processing.core.PVector vector)
          Follow the motion of a vector point.
 
Method Summary
 Action.ActionResult behave(TextObject to)
          Apply the action to a TextObject.
 void setTarget(float x, float y)
          Sets a target to approach.
 void setTarget(float x, float y, float z)
          Sets a target to approach.
 void setTarget(Locatable target)
          Set the followed object.
 void setTarget(processing.core.PVector target)
          Sets a target to approach.
 
Methods inherited from class net.nexttext.behaviour.AbstractAction
behave, behave, complete, getDisplayName, getRequiredProperties, makeBehaviour, properties, setDisplayName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.nexttext.behaviour.Action
behave, behave, complete, getRequiredProperties
 

Constructor Detail

Follow

public Follow(Locatable followed)
Follow the motion of an object.

Parameters:
followed - the followed object

Follow

public Follow(processing.core.PVector vector)
Follow the motion of a vector point.

Parameters:
vector - point to follow
Method Detail

setTarget

public void setTarget(Locatable target)
Set the followed object.

Specified by:
setTarget in interface TargetingAction
Parameters:
target - the followed object

setTarget

public void setTarget(float x,
                      float y)
Sets a target to approach.

Specified by:
setTarget in interface TargetingAction

setTarget

public void setTarget(float x,
                      float y,
                      float z)
Sets a target to approach.

Specified by:
setTarget in interface TargetingAction

setTarget

public void setTarget(processing.core.PVector target)
Sets a target to approach.

Specified by:
setTarget in interface TargetingAction

behave

public Action.ActionResult behave(TextObject to)
Apply the action to a TextObject.

Specified by:
behave in interface Action
Overrides:
behave in class AbstractAction
Parameters:
to - the affected text object