com.threerings.tudey.server.logic
Class PawnLogic

java.lang.Object
  extended by com.threerings.util.ShallowObject
      extended by com.threerings.tudey.server.logic.Logic
          extended by com.threerings.tudey.server.logic.ActorLogic
              extended by com.threerings.tudey.server.logic.MobileLogic
                  extended by com.threerings.tudey.server.logic.ActiveLogic
                      extended by com.threerings.tudey.server.logic.PawnLogic
All Implemented Interfaces:
HasActor, TudeySceneManager.TickParticipant, ActorAdvancer.Environment

public class PawnLogic
extends ActiveLogic

Handles the state of a player-controlled actor.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.ActorLogic
ActorLogic.CollisionFlagObserver
 
Nested classes/interfaces inherited from class com.threerings.tudey.server.logic.Logic
Logic.ShapeObserver
 
Constructor Summary
PawnLogic()
           
 
Method Summary
 void bodyEntered(ClientLiaison client)
          Notes that the controlling client has entered.
 void enqueueInput(InputFrame frame)
          Enqueues a single frame of input for processing.
 int getActivityAdvance()
          Returns the amount of time to advance activities to compensate for control latency.
 int getControlDelta()
          Computes and returns the difference between the time at which the controlling client depicts this actor (its advanced time) and the time at which it depicts all other actors (its delayed time).
 boolean tick(int timestamp)
          Ticks the participant.
 
Methods inherited from class com.threerings.tudey.server.logic.ActiveLogic
transfer
 
Methods inherited from class com.threerings.tudey.server.logic.MobileLogic
collides, getDirection, getPenetration, getSceneModel, getSnapshot, stepLimit
 
Methods inherited from class com.threerings.tudey.server.logic.ActorLogic
addCollisionFlagObserver, addShapeObserver, bodyWillEnter, bodyWillLeave, destroy, getActivator, getActor, getCollisionFlags, getEntityKey, getModel, getPreviousSnapshot, getRotation, getShape, getShapeElement, getSnapshotDelta, getSource, getTags, getTranslation, init, isActive, isDefaultEntrance, isDestroyed, isRemoved, isStatic, move, remove, removeCollisionFlagObserver, removeShapeObserver, request, setActivator, setSource, setVariable, signal, warp, warp, warp
 
Methods inherited from class com.threerings.tudey.server.logic.Logic
getPatrolPath, getSceneManager, getTransform, getTransform, getVariable, init, isVisible, 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

PawnLogic

public PawnLogic()
Method Detail

bodyEntered

public void bodyEntered(ClientLiaison client)
Notes that the controlling client has entered.


enqueueInput

public void enqueueInput(InputFrame frame)
Enqueues a single frame of input for processing.


getControlDelta

public int getControlDelta()
Computes and returns the difference between the time at which the controlling client depicts this actor (its advanced time) and the time at which it depicts all other actors (its delayed time).


getActivityAdvance

public int getActivityAdvance()
Description copied from class: ActiveLogic
Returns the amount of time to advance activities to compensate for control latency.

Overrides:
getActivityAdvance in class ActiveLogic

tick

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

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


Copyright © 2011. All Rights Reserved.