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

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
All Implemented Interfaces:
TudeySceneManager.TickParticipant
Direct Known Subclasses:
HandlerLogic.BaseIntersection, HandlerLogic.SignalStart, HandlerLogic.SignalStop
Enclosing class:
HandlerLogic

public abstract static class HandlerLogic.Transition
extends HandlerLogic.ActionHandlerLogic
implements TudeySceneManager.TickParticipant

Base class for transition handlers.


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  Map<Logic,Boolean> _activated
          Whether or not each activator has activated on the current tick.
protected  boolean _added
          Whether or not we've been added as a tick participant.
protected  boolean _start
          Whether or not to execute the action on start/stop.
protected  boolean _stop
          Whether or not to execute the action on 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.Transition(boolean start, boolean stop)
          Creates a new transition handler.
 
Method Summary
protected  void activate(int timestamp, Logic source)
          Notes that the source has been activated.
 void shutdown(int timestamp, Logic activator)
          Shuts down the handler.
 boolean tick(int timestamp)
          Ticks the participant.
 
Methods inherited from class com.threerings.tudey.server.logic.HandlerLogic.ActionHandlerLogic
didInit, execute, execute, transfer, wasRemoved
 
Methods inherited from class com.threerings.tudey.server.logic.HandlerLogic
getEntityKey, getRotation, getTranslation, init, isActive, removed, startup, 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

_start

protected boolean _start
Whether or not to execute the action on start/stop.


_stop

protected boolean _stop
Whether or not to execute the action on start/stop.


_added

protected boolean _added
Whether or not we've been added as a tick participant.


_activated

protected Map<Logic,Boolean> _activated
Whether or not each activator has activated on the current tick.

Constructor Detail

HandlerLogic.Transition

public HandlerLogic.Transition(boolean start,
                               boolean stop)
Creates a new transition handler.

Parameters:
start - if true, execute the action on activation start.
stop - if true, execute the action on activation stop.
Method Detail

tick

public boolean tick(int timestamp)
Description copied from interface: TudeySceneManager.TickParticipant
Ticks the participant.

Specified by:
tick in interface TudeySceneManager.TickParticipant
Parameters:
timestamp - the timestamp of the current tick.
Returns:
true to continue ticking the participant, false to remove it from the list.

shutdown

public void shutdown(int timestamp,
                     Logic activator)
Description copied from class: HandlerLogic
Shuts down the handler.

Overrides:
shutdown in class HandlerLogic

activate

protected void activate(int timestamp,
                        Logic source)
Notes that the source has been activated.