|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.util.ShallowObject
com.threerings.tudey.server.logic.Logic
public abstract class Logic
Handles the server-side processing for some entity.
| Nested Class Summary | |
|---|---|
static interface |
Logic.ShapeObserver
An interface for objects interested in updates to the logic's shape (as returned by getShape()). |
| Constructor Summary | |
|---|---|
Logic()
|
|
| Method Summary | |
|---|---|
void |
addShapeObserver(Logic.ShapeObserver observer)
Adds an observer for changes to the logic's shape. |
EntityKey |
getEntityKey()
Returns the entity key for this logic, if any. |
ConfigReference<ModelConfig> |
getModel()
Returns a reference to the model associated with this logic, if any. |
Vector2f[] |
getPatrolPath()
Returns a patrol path for this logic. |
float |
getRotation()
Returns the rotation of this logic for the purpose of spawning actors, etc. |
TudeySceneManager |
getSceneManager()
Returns a reference to the scene manager that owns the logic. |
Shape |
getShape()
Returns a reference to this logic's shape, or returns null for none. |
String[] |
getTags()
Returns the tags for this logic, if any. |
Transform2D |
getTransform()
Convenience method to retrieve the translation and rotation in a new transform. |
Transform2D |
getTransform(Transform2D result)
Convenience method to retrieve the translation and rotation in a transform. |
Vector2f |
getTranslation()
Returns the translation of this logic for the purpose of spawning actors, etc. |
Object |
getVariable(String name)
Retrieves the value of a variable (or null if unset). |
void |
init(TudeySceneManager scenemgr)
Initializes the logic. |
boolean |
isActive()
Determines whether this logic object is still active in the scene. |
boolean |
isDefaultEntrance()
Checks whether this logic object corresponds to a default entrance. |
boolean |
isVisible(ActorLogic actor)
Determines whether this logic object is "visible" to the specified actor. |
void |
removeShapeObserver(Logic.ShapeObserver observer)
Removes a shape observer. |
void |
request(int timestamp,
PawnLogic source,
String name)
Notifies the logic of a client request. |
Logic |
resolveTarget()
Resolve the appropriate source target logic. |
void |
setVariable(int timestamp,
Logic source,
String name,
Object value)
Sets the value of a variable. |
void |
signal(int timestamp,
Logic source,
String name)
Sends a generic "signal" to the logic. |
void |
transfer(Logic source,
Map<Object,Object> refs)
Transfers state from the specified source logic. |
| 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 |
|---|
public Logic()
| Method Detail |
|---|
public void init(TudeySceneManager scenemgr)
public TudeySceneManager getSceneManager()
public String[] getTags()
public boolean isDefaultEntrance()
public boolean isActive()
public boolean isVisible(ActorLogic actor)
public EntityKey getEntityKey()
public Transform2D getTransform()
public Transform2D getTransform(Transform2D result)
public Vector2f getTranslation()
public float getRotation()
public Shape getShape()
null for none.
public Vector2f[] getPatrolPath()
public void addShapeObserver(Logic.ShapeObserver observer)
public void removeShapeObserver(Logic.ShapeObserver observer)
public ConfigReference<ModelConfig> getModel()
public void signal(int timestamp,
Logic source,
String name)
timestamp - the signal timestamp.source - the source of the signal.
public void setVariable(int timestamp,
Logic source,
String name,
Object value)
timestamp - the set timestamp.source - the source of the request.public Object getVariable(String name)
null if unset).
public void request(int timestamp,
PawnLogic source,
String name)
timestamp - the request timestamp.source - the source of the request.public Logic resolveTarget()
public void transfer(Logic source,
Map<Object,Object> refs)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||