com.threerings.tudey.server.logic
Class HandlerLogic.Intersection

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
              extended by com.threerings.tudey.server.logic.HandlerLogic.ActionHandlerLogic
                  extended by com.threerings.tudey.server.logic.HandlerLogic.Transition
                      extended by com.threerings.tudey.server.logic.HandlerLogic.BaseIntersection
                          extended by com.threerings.tudey.server.logic.HandlerLogic.Intersection
All Implemented Interfaces:
Logic.ShapeObserver, TudeySceneManager.IntersectionSensor, TudeySceneManager.Sensor, TudeySceneManager.TickParticipant
Enclosing class:
HandlerLogic

public static class HandlerLogic.Intersection
extends HandlerLogic.BaseIntersection
implements TudeySceneManager.IntersectionSensor

Handles the intersection event.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.HandlerLogic
HandlerLogic.ActionHandlerLogic, HandlerLogic.ActorAdded, HandlerLogic.ActorRemoved, HandlerLogic.BaseActorObserver, HandlerLogic.BaseBodyObserver, HandlerLogic.BaseIntersection, HandlerLogic.BaseIntersectionCount, HandlerLogic.BodyEntered, HandlerLogic.BodyLeft, HandlerLogic.Intersection, HandlerLogic.IntersectionStart, HandlerLogic.IntersectionStop, HandlerLogic.Reference, HandlerLogic.Request, HandlerLogic.Shutdown, HandlerLogic.Signal, HandlerLogic.SignalStart, HandlerLogic.SignalStop, HandlerLogic.Startup, HandlerLogic.ThresholdIntersectionCount, HandlerLogic.Tick, HandlerLogic.Timer, HandlerLogic.Transition, HandlerLogic.VariableChanged, HandlerLogic.WarnTimer
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Field Summary
protected  int _minTimestamp
          The earliest time at which we may execute.
 
Fields inherited from class com.threerings.tudey.server.logic.HandlerLogic.BaseIntersection
_shape, _transform
 
Fields inherited from class com.threerings.tudey.server.logic.HandlerLogic.Transition
_activated, _added, _start, _stop
 
Fields inherited from class com.threerings.tudey.server.logic.HandlerLogic.ActionHandlerLogic
_action
 
Fields inherited from class com.threerings.tudey.server.logic.HandlerLogic
_config, _source
 
Fields inherited from class com.threerings.tudey.server.logic.Logic
_scenemgr, _variables
 
Constructor Summary
HandlerLogic.Intersection()
          Creates a new intersection handler.
 
Method Summary
 int getMask()
          Returns the sensor's bitmask.
 void transfer(Logic source, Map<Object,Object> refs)
          Transfers state from the specified source logic.
 void trigger(int timestamp, ActorLogic actor)
          Triggers the sensor.
 
Methods inherited from class com.threerings.tudey.server.logic.HandlerLogic.BaseIntersection
shapeDidChange, shapeWillChange, shutdown, startup
 
Methods inherited from class com.threerings.tudey.server.logic.HandlerLogic.Transition
activate, tick
 
Methods inherited from class com.threerings.tudey.server.logic.HandlerLogic.ActionHandlerLogic
didInit, execute, execute, wasRemoved
 
Methods inherited from class com.threerings.tudey.server.logic.HandlerLogic
getEntityKey, getRotation, getTranslation, init, isActive, removed, variableChanged
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
addShapeObserver, createAction, createCondition, createExpression, createHandler, createRegion, createTarget, 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
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_minTimestamp

protected int _minTimestamp
The earliest time at which we may execute.

Constructor Detail

HandlerLogic.Intersection

public HandlerLogic.Intersection()
Creates a new intersection handler.

Method Detail

getMask

public int getMask()
Description copied from interface: TudeySceneManager.Sensor
Returns the sensor's bitmask. Only triggers whose flags intersect the mask will activate the sensor.

Specified by:
getMask in interface TudeySceneManager.Sensor

trigger

public void trigger(int timestamp,
                    ActorLogic actor)
Description copied from interface: TudeySceneManager.Sensor
Triggers the sensor.

Specified by:
trigger in interface TudeySceneManager.Sensor
Parameters:
timestamp - the timestamp of the intersection.
actor - the logic object of the actor that triggered the sensor.

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 HandlerLogic.BaseIntersection