com.threerings.tudey.server.logic
Class ScriptLogic

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.ScriptLogic
Direct Known Subclasses:
ScriptLogic.Condition, ScriptLogic.Goto, ScriptLogic.Move, ScriptLogic.Rotate, ScriptLogic.Wait

public abstract class ScriptLogic
extends Logic

Performs script step logic for a scripted behavior.


Nested Class Summary
static class ScriptLogic.Condition
          Handles the condition script.
static class ScriptLogic.Goto
          Handles the goto script.
static class ScriptLogic.Move
          Handles a move script.
static class ScriptLogic.Rotate
          Handles the rotate script.
static class ScriptLogic.Wait
          Handles a wait script.
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Constructor Summary
ScriptLogic()
           
 
Method Summary
static ScriptLogic createScriptLogic(TudeySceneManager scenemgr, ScriptConfig config, AgentLogic agent, BehaviorLogic.Scripted scripted)
          Creates a script logic.
 void init(TudeySceneManager scenemgr, ScriptConfig config, AgentLogic agent, BehaviorLogic.Scripted scripted)
          Initializes the logic.
 void reachedTargetRotation()
          Called when the agent reached its target rotation.
 void start(int timestamp)
          Called when we are about to start the current script.
 boolean tick(int timestamp)
          Ticks the script.
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
addShapeObserver, getEntityKey, getModel, getPatrolPath, getRotation, getSceneManager, getShape, getTags, getTransform, getTransform, getTranslation, getVariable, init, isActive, isDefaultEntrance, isVisible, removeShapeObserver, request, resolveTarget, setVariable, signal, transfer
 
Methods inherited from class com.threerings.util.ShallowObject
equals, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptLogic

public ScriptLogic()
Method Detail

createScriptLogic

public static ScriptLogic createScriptLogic(TudeySceneManager scenemgr,
                                            ScriptConfig config,
                                            AgentLogic agent,
                                            BehaviorLogic.Scripted scripted)
Creates a script logic.


init

public void init(TudeySceneManager scenemgr,
                 ScriptConfig config,
                 AgentLogic agent,
                 BehaviorLogic.Scripted scripted)
Initializes the logic.


tick

public boolean tick(int timestamp)
Ticks the script.

Returns:
true if the script has completed

start

public void start(int timestamp)
Called when we are about to start the current script.


reachedTargetRotation

public void reachedTargetRotation()
Called when the agent reached its target rotation.



Copyright © 2011. All Rights Reserved.