com.threerings.tudey.server.logic
Class ActiveLogic
java.lang.Object
com.threerings.util.ShallowObject
com.threerings.tudey.server.logic.Logic
com.threerings.tudey.server.logic.ActorLogic
com.threerings.tudey.server.logic.MobileLogic
com.threerings.tudey.server.logic.ActiveLogic
- All Implemented Interfaces:
- HasActor, TudeySceneManager.TickParticipant, ActorAdvancer.Environment
- Direct Known Subclasses:
- AgentLogic, PawnLogic
public class ActiveLogic
- extends MobileLogic
Controls the state of an active actor.
| Fields inherited from class com.threerings.tudey.server.logic.ActorLogic |
_activator, _actor, _collisionFlagObservers, _collisionFlags, _config, _destroyed, _entityKey, _handlers, _previousSnapshot, _shape, _shapeDidChangeOp, _shapeObservers, _shapeWillChangeOp, _snapshot, _snapshotDelta, _snaptime, _source, MAX_ADJUSTMENT_DISTANCE, MAX_ADJUSTMENT_PATH_LENGTH |
|
Method Summary |
int |
getActivityAdvance()
Returns the amount of time to advance activities to compensate for control latency. |
boolean |
tick(int timestamp)
Ticks the participant. |
void |
transfer(Logic source,
Map<Object,Object> refs)
Transfers state from the specified source logic. |
protected void |
updateActivities(int timestamp)
Called to update any activities before they are ticked. |
| Methods inherited from class com.threerings.tudey.server.logic.MobileLogic |
collides, createAdvancer, didInit, enteredStasis, getDirection, getPenetration, getSceneModel, getSnapshot, leftStasis, penetratedEnvironment, stepLimit, updateShape, wasDestroyed |
| Methods inherited from class com.threerings.tudey.server.logic.ActorLogic |
addCollisionFlagObserver, addShapeObserver, adjustSpawnPoint, adjustSpawnPoint, bodyWillEnter, bodyWillLeave, createActor, destroy, getActivator, getActor, getCollisionFlags, getEntityKey, getModel, getPreviousSnapshot, getRotation, getShape, getShapeElement, getSnapshotDelta, getSource, getTags, getTranslation, init, isActive, isDefaultEntrance, isDestroyed, isRemoved, isStatic, move, remove, removeCollisionFlagObserver, removeOnNextTick, removeShapeObserver, request, set, setActivator, setSource, setVariable, signal, testSpawnPoint, updateCollisionFlags, updateSnapshot, warp, warp, warp, wasRemoved, wasUpdated |
| Methods inherited from class com.threerings.tudey.server.logic.Logic |
createAction, createCondition, createExpression, createHandler, createRegion, createTarget, getPatrolPath, getSceneManager, getTransform, getTransform, getVariable, init, isVisible, resolveTarget |
_activities
protected IntMap<ActivityLogic> _activities
- Activity logic mappings.
_lastActivityStarted
protected int _lastActivityStarted
- The time at which the last activity started.
ActiveLogic
public ActiveLogic()
getActivityAdvance
public int getActivityAdvance()
- Returns the amount of time to advance activities to compensate for control latency.
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 MobileLogic
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 MobileLogic
- Parameters:
timestamp - the timestamp of the current tick.
- Returns:
- true to continue ticking the participant, false to remove it from the list.
updateActivities
protected void updateActivities(int timestamp)
- Called to update any activities before they are ticked.