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

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
Direct Known Subclasses:
BehaviorLogic.Pathing, BehaviorLogic.Random, BehaviorLogic.Wander
Enclosing class:
BehaviorLogic

public abstract static class BehaviorLogic.Evaluating
extends BehaviorLogic

Superclass of the evaluating behaviors.


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  int _nextEvaluation
          The time for which the next evaluation is scheduled.
 
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.Evaluating()
           
 
Method Summary
protected  void advanceEvaluation()
          Ensures that we will evaluate on the next tick.
protected  void evaluate()
          Performs an evaluation.
protected  void postponeNextEvaluation()
          Postpones the next evaluation until the next rescheduling.
protected  void scheduleNextEvaluation()
          Schedules the next evaluation.
 void startup()
          Starts up the behavior after initialization or suspension.
 void tick(int timestamp)
          Ticks the behavior.
 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
didInit, getCurrentTarget, 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

_nextEvaluation

protected int _nextEvaluation
The time for which the next evaluation is scheduled.

Constructor Detail

BehaviorLogic.Evaluating

public BehaviorLogic.Evaluating()
Method Detail

startup

public void startup()
Description copied from class: BehaviorLogic
Starts up the behavior after initialization or suspension.

Overrides:
startup in class BehaviorLogic

tick

public void tick(int timestamp)
Description copied from class: BehaviorLogic
Ticks the behavior.

Overrides:
tick 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 Logic

evaluate

protected void evaluate()
Performs an evaluation. Default implementation simply schedules the next evaluation.


scheduleNextEvaluation

protected void scheduleNextEvaluation()
Schedules the next evaluation.


postponeNextEvaluation

protected void postponeNextEvaluation()
Postpones the next evaluation until the next rescheduling.


advanceEvaluation

protected void advanceEvaluation()
Ensures that we will evaluate on the next tick.