com.threerings.tudey.client.sprite
Class ActorSprite.Original

java.lang.Object
  extended by com.threerings.expr.SimpleScope
      extended by com.threerings.tudey.client.sprite.ActorSprite.Implementation
          extended by com.threerings.tudey.client.sprite.ActorSprite.Original
All Implemented Interfaces:
Scope, ScopeUpdateListener
Direct Known Subclasses:
ActorSprite.Moving, ActorSprite.StatefulEntry, ActorSprite.StatefulModelEntry
Enclosing class:
ActorSprite

public static class ActorSprite.Original
extends ActorSprite.Implementation

Superclass of the original implementations.


Field Summary
protected  List<Model> _attachedModels
          Other models attached to this sprite.
protected  ActorSpriteConfig _config
          The sprite configuration.
protected  TudeyContext _ctx
          The renderer context.
protected  boolean _initZ
          If we have initialized our z value.
protected  Model _model
          The model.
protected  TudeySceneView _view
          The owning view.
 
Fields inherited from class com.threerings.expr.SimpleScope
_parentScope
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
protected ActorSprite.Original(TudeyContext ctx, Scope parentScope)
          Creates a new implementation without configuring it.
  ActorSprite.Original(TudeyContext ctx, Scope parentScope, ActorSpriteConfig config)
          Creates a new implementation.
 
Method Summary
 Component createTooltipComponent(String tiptext)
          Creates a tooltip component for the implementation (will only be called if ActorSprite.Implementation.getTooltipText() returns true).
 int getFloorFlags()
          Returns the sprite's floor flags.
 int getFloorMask()
          Returns the sprite's floor mask.
protected  ConfigReference<ModelConfig> getModelConfig()
          Returns the configuration to use for the actor model (gives subclasses a chance to adjust the result).
protected  boolean isControlled()
          Returns true if this sprite is being controlled by the client.
 void setConfig(ActorSpriteConfig config)
          (Re)configures the implementation.
 void update(Actor actor)
          Updates the implementation with new interpolated state.
 void wasCreated()
          Notes that the actor was just created (as opposed to just being added).
 void willBeDestroyed()
          Notes that the actor is about to be destroyed (as opposed to just being removed).
 
Methods inherited from class com.threerings.tudey.client.sprite.ActorSprite.Implementation
clearMessages, dispatchEvent, displayMessage, getAttachedScale, getScopeName, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, isClickable, isHoverable, occupantEntered, occupantLeft, occupantUpdated
 
Methods inherited from class com.threerings.expr.SimpleScope
addListener, dispose, get, getParentScope, removeListener, scopeUpdated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ctx

protected TudeyContext _ctx
The renderer context.


_config

protected ActorSpriteConfig _config
The sprite configuration.


_initZ

protected boolean _initZ
If we have initialized our z value.


_model

@Bound
protected Model _model
The model.


_view

@Bound
protected TudeySceneView _view
The owning view.


_attachedModels

@Bound
protected List<Model> _attachedModels
Other models attached to this sprite.

Constructor Detail

ActorSprite.Original

public ActorSprite.Original(TudeyContext ctx,
                            Scope parentScope,
                            ActorSpriteConfig config)
Creates a new implementation.


ActorSprite.Original

protected ActorSprite.Original(TudeyContext ctx,
                               Scope parentScope)
Creates a new implementation without configuring it.

Method Detail

setConfig

public void setConfig(ActorSpriteConfig config)
(Re)configures the implementation.


getFloorFlags

public int getFloorFlags()
Description copied from class: ActorSprite.Implementation
Returns the sprite's floor flags.

Overrides:
getFloorFlags in class ActorSprite.Implementation

getFloorMask

public int getFloorMask()
Description copied from class: ActorSprite.Implementation
Returns the sprite's floor mask.

Overrides:
getFloorMask in class ActorSprite.Implementation

createTooltipComponent

public Component createTooltipComponent(String tiptext)
Description copied from class: ActorSprite.Implementation
Creates a tooltip component for the implementation (will only be called if ActorSprite.Implementation.getTooltipText() returns true).

Overrides:
createTooltipComponent in class ActorSprite.Implementation

update

public void update(Actor actor)
Description copied from class: ActorSprite.Implementation
Updates the implementation with new interpolated state.

Overrides:
update in class ActorSprite.Implementation

wasCreated

public void wasCreated()
Description copied from class: ActorSprite.Implementation
Notes that the actor was just created (as opposed to just being added).

Overrides:
wasCreated in class ActorSprite.Implementation

willBeDestroyed

public void willBeDestroyed()
Description copied from class: ActorSprite.Implementation
Notes that the actor is about to be destroyed (as opposed to just being removed).

Overrides:
willBeDestroyed in class ActorSprite.Implementation

getModelConfig

protected ConfigReference<ModelConfig> getModelConfig()
Returns the configuration to use for the actor model (gives subclasses a chance to adjust the result).


isControlled

protected boolean isControlled()
Returns true if this sprite is being controlled by the client.