com.threerings.tudey.server.logic
Class BehaviorLogic.Follow

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.BehaviorLogic
              extended by com.threerings.tudey.server.logic.BehaviorLogic.Evaluating
                  extended by com.threerings.tudey.server.logic.BehaviorLogic.Pathing
                      extended by com.threerings.tudey.server.logic.BehaviorLogic.Follow
Enclosing class:
BehaviorLogic

public static class BehaviorLogic.Follow
extends BehaviorLogic.Pathing

Handles the follow behavior.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.BehaviorLogic
BehaviorLogic.Combined, BehaviorLogic.Evaluating, BehaviorLogic.Follow, BehaviorLogic.Idle, BehaviorLogic.PathCandidate, BehaviorLogic.Pathing, BehaviorLogic.Patrol, BehaviorLogic.Random, BehaviorLogic.Scripted, BehaviorLogic.Wander
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Field Summary
protected  Logic _currentTarget
          The current target.
protected  TargetLogic _target
          The target to follow.
protected  ArrayList<Logic> _targets
          Holds targets during processing.
 
Fields inherited from class com.threerings.tudey.server.logic.BehaviorLogic.Pathing
_path, _pidx
 
Fields inherited from class com.threerings.tudey.server.logic.BehaviorLogic.Evaluating
_nextEvaluation
 
Fields inherited from class com.threerings.tudey.server.logic.BehaviorLogic
_agent, _config, MAX_FOLLOW_PATH_LENGTH
 
Fields inherited from class com.threerings.tudey.server.logic.Logic
_scenemgr, _variables
 
Constructor Summary
BehaviorLogic.Follow()
           
 
Method Summary
protected  void didInit()
          Override to perform custom initialization.
protected  void evaluate()
          Performs an evaluation.
 Logic getCurrentTarget()
          Returns the currently targeted logic, if any.
 void transfer(Logic source, Map<Object,Object> refs)
          Transfers state from the specified source logic.
 
Methods inherited from class com.threerings.tudey.server.logic.BehaviorLogic.Pathing
clearPath, completedPath, getReachRadius, reachedPathIndex, setPath, tick
 
Methods inherited from class com.threerings.tudey.server.logic.BehaviorLogic.Evaluating
advanceEvaluation, postponeNextEvaluation, scheduleNextEvaluation, startup
 
Methods inherited from class com.threerings.tudey.server.logic.BehaviorLogic
getEntityKey, getRotation, getTranslation, init, isActive, penetratedEnvironment, reachedTargetRotation, shutdown, suspend
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
addShapeObserver, createAction, createCondition, createExpression, createHandler, createRegion, createTarget, getModel, getPatrolPath, getSceneManager, getShape, getTags, getTransform, getTransform, getVariable, init, isDefaultEntrance, isVisible, removeShapeObserver, request, resolveTarget, setVariable, signal
 
Methods inherited from class com.threerings.util.ShallowObject
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_target

protected TargetLogic _target
The target to follow.


_targets

protected ArrayList<Logic> _targets
Holds targets during processing.


_currentTarget

protected Logic _currentTarget
The current target.

Constructor Detail

BehaviorLogic.Follow

public BehaviorLogic.Follow()
Method Detail

getCurrentTarget

public Logic getCurrentTarget()
Description copied from class: BehaviorLogic
Returns the currently targeted logic, if any.

Overrides:
getCurrentTarget in class BehaviorLogic

transfer

public void transfer(Logic source,
                     Map<Object,Object> refs)
Description copied from class: Logic
Transfers state from the specified source logic. Where relevant, this also takes the place of addition/startup notification.

Overrides:
transfer in class BehaviorLogic.Pathing

didInit

protected void didInit()
Description copied from class: BehaviorLogic
Override to perform custom initialization.

Overrides:
didInit in class BehaviorLogic

evaluate

protected void evaluate()
Description copied from class: BehaviorLogic.Evaluating
Performs an evaluation. Default implementation simply schedules the next evaluation.

Overrides:
evaluate in class BehaviorLogic.Evaluating