com.threerings.tudey.server.logic
Class EntryLogic

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.EntryLogic
Direct Known Subclasses:
EntryLogic.Camera, EntryLogic.StatefulProp

public class EntryLogic
extends Logic

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
 
Constructor Summary
EntryLogic()
           
 
Method Summary
 void added()
          Notes that the entry has been added to the scene.
 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.
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
addShapeObserver, 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
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryLogic

public EntryLogic()
Method Detail

init

public void init(TudeySceneManager scenemgr,
                 TudeySceneModel.Entry entry)
Initializes the logic.


getEntry

public TudeySceneModel.Entry getEntry()
Returns a reference to the scene entry corresponding to this logic.


added

public void added()
Notes that the entry has been added to the scene.


removed

public void removed()
Notes that the entry has been removed from the scene.


getTags

public String[] getTags()
Description copied from class: Logic
Returns the tags for this logic, if any.

Overrides:
getTags in class Logic

isDefaultEntrance

public boolean isDefaultEntrance()
Description copied from class: Logic
Checks whether this logic object corresponds to a default entrance.

Overrides:
isDefaultEntrance in class Logic

isActive

public boolean isActive()
Description copied from class: Logic
Determines whether this logic object is still active in the scene.

Overrides:
isActive in class Logic

getEntityKey

public EntityKey getEntityKey()
Description copied from class: Logic
Returns the entity key for this logic, if any.

Overrides:
getEntityKey in class Logic

getTranslation

public Vector2f getTranslation()
Description copied from class: Logic
Returns the translation of this logic for the purpose of spawning actors, etc.

Overrides:
getTranslation in class Logic

getRotation

public float getRotation()
Description copied from class: Logic
Returns the rotation of this logic for the purpose of spawning actors, etc.

Overrides:
getRotation in class Logic

getShape

public Shape getShape()
Description copied from class: Logic
Returns a reference to this logic's shape, or returns null for none.

Overrides:
getShape in class Logic

getPatrolPath

public Vector2f[] getPatrolPath()
Description copied from class: Logic
Returns a patrol path for this logic.

Overrides:
getPatrolPath in class Logic

getModel

public ConfigReference<ModelConfig> getModel()
Description copied from class: Logic
Returns a reference to the model associated with this logic, if any.

Overrides:
getModel in class Logic

signal

public void signal(int timestamp,
                   Logic source,
                   String name)
Description copied from class: Logic
Sends a generic "signal" to the logic.

Overrides:
signal in class Logic
Parameters:
timestamp - the signal timestamp.
source - the source of the signal.

setVariable

public void setVariable(int timestamp,
                        Logic source,
                        String name,
                        Object value)
Description copied from class: Logic
Sets the value of a variable.

Overrides:
setVariable in class Logic
Parameters:
timestamp - the set timestamp.
source - the source of the request.

request

public void request(int timestamp,
                    PawnLogic source,
                    String name)
Description copied from class: Logic
Notifies the logic of a client request.

Overrides:
request in class Logic
Parameters:
timestamp - the request timestamp.
source - the source of the request.

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


Copyright © 2011. All Rights Reserved.