|
|||||||||
| 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
com.threerings.tudey.server.logic.EntryLogic
public class EntryLogic
A logic object associated with a scene entry.
| Nested Class Summary | |
|---|---|
static class |
EntryLogic.Camera
Special camera logic. |
static class |
EntryLogic.StatefulProp
Logic for stateful props. |
| Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic |
|---|
Logic.ShapeObserver |
| Field Summary | |
|---|---|
protected boolean |
_defaultEntrance
Whether or not the entry represents a default entrance. |
protected EntityKey.Entry |
_entityKey
The entity key. |
protected TudeySceneModel.Entry |
_entry
The scene entry. |
protected HandlerLogic[] |
_handlers
The entry's event handlers. |
protected Vector2f[] |
_patrolPath
The entry's patrol path. |
protected float |
_rotation
The entry's approximate rotation. |
protected Shape |
_shape
The entry's shape. |
protected String[] |
_tags
The entry's tags. |
protected Vector2f |
_translation
The entry's approximate translation. |
| Fields inherited from class com.threerings.tudey.server.logic.Logic |
|---|
_scenemgr, _variables |
| Constructor Summary | |
|---|---|
EntryLogic()
|
|
| Method Summary | |
|---|---|
void |
added()
Notes that the entry has been added to the scene. |
protected void |
didInit()
Override to perform custom initialization. |
EntityKey |
getEntityKey()
Returns the entity key for this logic, if any. |
TudeySceneModel.Entry |
getEntry()
Returns a reference to the scene entry corresponding to this logic. |
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. |
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. |
Vector2f |
getTranslation()
Returns the translation of this logic for the purpose of spawning actors, etc. |
void |
init(TudeySceneManager scenemgr,
TudeySceneModel.Entry entry)
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. |
void |
removed()
Notes that the entry has been removed from the scene. |
void |
request(int timestamp,
PawnLogic source,
String name)
Notifies the logic of a client request. |
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. |
protected void |
wasAdded()
Override to perform custom startup. |
protected void |
wasRemoved()
Override to perform custom cleanup. |
| Methods inherited from class com.threerings.tudey.server.logic.Logic |
|---|
addShapeObserver, createAction, createCondition, createExpression, createHandler, createRegion, createTarget, getSceneManager, getTransform, getTransform, getVariable, init, isVisible, removeShapeObserver, resolveTarget |
| 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 |
|---|
protected EntityKey.Entry _entityKey
protected TudeySceneModel.Entry _entry
protected String[] _tags
protected boolean _defaultEntrance
protected Vector2f _translation
protected float _rotation
protected Shape _shape
protected Vector2f[] _patrolPath
protected HandlerLogic[] _handlers
| Constructor Detail |
|---|
public EntryLogic()
| Method Detail |
|---|
public void init(TudeySceneManager scenemgr,
TudeySceneModel.Entry entry)
public TudeySceneModel.Entry getEntry()
public void added()
public void removed()
public String[] getTags()
Logic
getTags in class Logicpublic boolean isDefaultEntrance()
Logic
isDefaultEntrance in class Logicpublic boolean isActive()
Logic
isActive in class Logicpublic EntityKey getEntityKey()
Logic
getEntityKey in class Logicpublic Vector2f getTranslation()
Logic
getTranslation in class Logicpublic float getRotation()
Logic
getRotation in class Logicpublic Shape getShape()
Logicnull for none.
getShape in class Logicpublic Vector2f[] getPatrolPath()
Logic
getPatrolPath in class Logicpublic ConfigReference<ModelConfig> getModel()
Logic
getModel in class Logic
public void signal(int timestamp,
Logic source,
String name)
Logic
signal in class Logictimestamp - the signal timestamp.source - the source of the signal.
public void setVariable(int timestamp,
Logic source,
String name,
Object value)
Logic
setVariable in class Logictimestamp - the set timestamp.source - the source of the request.
public void request(int timestamp,
PawnLogic source,
String name)
Logic
request in class Logictimestamp - the request timestamp.source - the source of the request.
public void transfer(Logic source,
Map<Object,Object> refs)
Logic
transfer in class Logicprotected void didInit()
protected void wasAdded()
protected void wasRemoved()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||