com.threerings.tudey.data.actor
Class EntryState

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.tudey.data.actor.Actor
          extended by com.threerings.tudey.data.actor.EntryState
All Implemented Interfaces:
Deltable, Streamable, Copyable, Cloneable

public class EntryState
extends Actor

An actor that represents the state of an entry. Entries themselves cannot have dynamic state per se, so stateful entries must create actor instances to represent their dynamic state. The sprites for these actors may manipulate the entries' sprites.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
protected  Object _key
          The key identifying the entry to which this actor corresponds.
protected  int _state
          The state of the entry.
protected  int _stateEntered
          The time at which the entry entered its current state.
 
Fields inherited from class com.threerings.tudey.data.actor.Actor
_config, _created, _destroyed, _dirty, _flags, _id, _original, _rotation, _translation, LAST_FLAG, NULL_ORIGINAL, WARP
 
Constructor Summary
EntryState()
          No-arg constructor for deserialization.
EntryState(ConfigReference<ActorConfig> config, int id, int created, Vector2f translation, float rotation)
          Creates a new entry state actor.
 
Method Summary
 Object getKey()
          Returns the key of the entry to which this actor corresponds.
 int getState()
          Returns the state that the entry is in.
 int getStateEntered()
          Returns the time at which the entry entered its current state.
 void setKey(Object key)
          Sets the key of the entry to which this actor corresponds.
 void setState(int state, int entered)
          Sets the state that the entry is in.
 
Methods inherited from class com.threerings.tudey.data.actor.Actor
canCollide, canCollide, clear, copy, createAdvancer, equals, extrapolate, getCollisionFlags, getCollisionMask, getConfig, getCreated, getDestroyed, getFlags, getId, getOriginal, getPreloads, getRotation, getTranslation, hashCode, init, interpolate, isClientControlled, isDirty, isSet, maybeCreateAdvancer, set, set, setConfig, setDestroyed, setDirty, setFlags, setRotation, setTranslation, toString
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_key

protected Object _key
The key identifying the entry to which this actor corresponds.


_state

protected int _state
The state of the entry.


_stateEntered

protected int _stateEntered
The time at which the entry entered its current state.

Constructor Detail

EntryState

public EntryState(ConfigReference<ActorConfig> config,
                  int id,
                  int created,
                  Vector2f translation,
                  float rotation)
Creates a new entry state actor.


EntryState

public EntryState()
No-arg constructor for deserialization.

Method Detail

setKey

public void setKey(Object key)
Sets the key of the entry to which this actor corresponds.


getKey

public Object getKey()
Returns the key of the entry to which this actor corresponds.


setState

public void setState(int state,
                     int entered)
Sets the state that the entry is in.


getState

public int getState()
Returns the state that the entry is in.


getStateEntered

public int getStateEntered()
Returns the time at which the entry entered its current state.