com.threerings.tudey.server.logic
Class HandlerLogic

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.HandlerLogic
Direct Known Subclasses:
HandlerLogic.BaseActorObserver, HandlerLogic.Request, HandlerLogic.Shutdown, HandlerLogic.Signal, HandlerLogic.Startup, HandlerLogic.Tick, HandlerLogic.Timer, HandlerLogic.Transition, HandlerLogic.VariableChanged

public abstract class HandlerLogic
extends Logic

Handles the server-side processing for an event handler type.


Nested Class Summary
static class HandlerLogic.ActorAdded
          Handles an actor added event.
static class HandlerLogic.ActorRemoved
          Handles an actor removed event.
static class HandlerLogic.BaseActorObserver
          Base class for HandlerLogic.ActorAdded and HandlerLogic.ActorRemoved.
static class HandlerLogic.BaseIntersection
          Base class for the various intersection-related handler logic classes.
static class HandlerLogic.BaseIntersectionCount
          Handles the intersection count event.
static class HandlerLogic.Intersection
          Handles the intersection event.
static class HandlerLogic.IntersectionStart
          Handles the intersection start event.
static class HandlerLogic.IntersectionStop
          Handles the intersection stop event.
static class HandlerLogic.Request
          Handles a client request event.
static class HandlerLogic.Shutdown
          Handles the shutdown event.
static class HandlerLogic.Signal
          Handles a signal event.
static class HandlerLogic.SignalStart
          Handles a signal start event.
static class HandlerLogic.SignalStop
          Handles a signal stop event.
static class HandlerLogic.Startup
          Handles the startup event.
static class HandlerLogic.ThresholdIntersectionCount
          Handles a threshold intersection count event.
static class HandlerLogic.Tick
          Handles the tick event.
static class HandlerLogic.Timer
          Handles the timer event.
static class HandlerLogic.Transition
          Base class for transition handlers.
static class HandlerLogic.VariableChanged
          Handles variable changes.
static class HandlerLogic.WarnTimer
          Handles the warn timer event.
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Constructor Summary
HandlerLogic()
           
 
Method Summary
 EntityKey getEntityKey()
          Returns the entity key for this logic, if any.
 float getRotation()
          Returns the rotation of this logic for the purpose of spawning actors, etc.
 Vector2f getTranslation()
          Returns the translation of this logic for the purpose of spawning actors, etc.
 void init(TudeySceneManager scenemgr, HandlerConfig config, Logic source)
          Initializes the logic.
 boolean isActive()
          Determines whether this logic object is still active in the scene.
 void removed()
          Notes that the logic has been removed.
 void shutdown(int timestamp, Logic activator)
          Shuts down the handler.
 void startup(int timestamp)
          Starts up the handler.
 void transfer(Logic source, Map<Object,Object> refs)
          Transfers state from the specified source logic.
 void variableChanged(int timestamp, Logic activator, String name)
          Notes that a variable has changed.
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
addShapeObserver, 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
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlerLogic

public HandlerLogic()
Method Detail

init

public void init(TudeySceneManager scenemgr,
                 HandlerConfig config,
                 Logic source)
Initializes the logic.


startup

public void startup(int timestamp)
Starts up the handler.


shutdown

public void shutdown(int timestamp,
                     Logic activator)
Shuts down the handler.


variableChanged

public void variableChanged(int timestamp,
                            Logic activator,
                            String name)
Notes that a variable has changed.


removed

public void removed()
Notes that the logic has been removed.


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

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.