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

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

public abstract static class ActorSprite.Implementation
extends SimpleScope

The actual sprite implementation.


Field Summary
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
ActorSprite.Implementation(Scope parentScope)
          Creates a new implementation.
 
Method Summary
 void clearMessages()
          Requests that the sprite clear any chat messages being displayed.
 Component createTooltipComponent(String tiptext)
          Creates a tooltip component for the implementation (will only be called if getTooltipText() returns true).
 boolean dispatchEvent(Event event)
          Dispatches an event on the implementation.
 boolean displayMessage(com.threerings.crowd.chat.data.UserMessage msg, boolean alreadyDisplayed)
          Gives the sprite a chance to display a message sent by the occupant controlling the actor.
 float getAttachedScale()
          Returns a scale factor for attached models.
 int getFloorFlags()
          Returns the sprite's floor flags.
 int getFloorMask()
          Returns the sprite's floor mask.
 String getScopeName()
          Returns the name of this scope for purposes of qualification.
 String getTooltipText()
          Returns the implementation's tooltip text, or null for none.
 float getTooltipTimeout()
          Returns the implementation's tooltip timeout, or -1 to use the default.
 String getTooltipWindowStyle()
          Returns the implementation's tooltip window style.
 boolean isClickable()
          Determines whether the implementation is clickable.
 boolean isHoverable()
          Determines whether the implementation is hoverable.
 void occupantEntered(TudeyOccupantInfo info)
          Notes that the occupant controlling this actor has entered.
 void occupantLeft(TudeyOccupantInfo info)
          Notes that the occupant controlling this actor has left.
 void occupantUpdated(TudeyOccupantInfo oinfo, TudeyOccupantInfo ninfo)
          Notes that the occupant controlling this actor has been updated.
 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.expr.SimpleScope
addListener, dispose, get, getParentScope, removeListener, scopeUpdated
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActorSprite.Implementation

public ActorSprite.Implementation(Scope parentScope)
Creates a new implementation.

Method Detail

getFloorFlags

public int getFloorFlags()
Returns the sprite's floor flags.


getFloorMask

public int getFloorMask()
Returns the sprite's floor mask.


isHoverable

public boolean isHoverable()
Determines whether the implementation is hoverable.


isClickable

public boolean isClickable()
Determines whether the implementation is clickable.


getTooltipText

public String getTooltipText()
Returns the implementation's tooltip text, or null for none.


getTooltipTimeout

public float getTooltipTimeout()
Returns the implementation's tooltip timeout, or -1 to use the default.


getTooltipWindowStyle

public String getTooltipWindowStyle()
Returns the implementation's tooltip window style.


createTooltipComponent

public Component createTooltipComponent(String tiptext)
Creates a tooltip component for the implementation (will only be called if getTooltipText() returns true).


dispatchEvent

public boolean dispatchEvent(Event event)
Dispatches an event on the implementation.

Returns:
true if the implementation handled the event, false if it should be handled elsewhere.

update

public void update(Actor actor)
Updates the implementation with new interpolated state.


wasCreated

public void wasCreated()
Notes that the actor was just created (as opposed to just being added).


willBeDestroyed

public void willBeDestroyed()
Notes that the actor is about to be destroyed (as opposed to just being removed).


occupantEntered

public void occupantEntered(TudeyOccupantInfo info)
Notes that the occupant controlling this actor has entered.


occupantLeft

public void occupantLeft(TudeyOccupantInfo info)
Notes that the occupant controlling this actor has left.


occupantUpdated

public void occupantUpdated(TudeyOccupantInfo oinfo,
                            TudeyOccupantInfo ninfo)
Notes that the occupant controlling this actor has been updated.


displayMessage

public boolean displayMessage(com.threerings.crowd.chat.data.UserMessage msg,
                              boolean alreadyDisplayed)
Gives the sprite a chance to display a message sent by the occupant controlling the actor.

Returns:
true if the sprite displayed the message.

clearMessages

public void clearMessages()
Requests that the sprite clear any chat messages being displayed.


getAttachedScale

public float getAttachedScale()
Returns a scale factor for attached models.


getScopeName

public String getScopeName()
Description copied from interface: Scope
Returns the name of this scope for purposes of qualification. Can return null if qualified symbols cannot specifically address this scope.

Specified by:
getScopeName in interface Scope
Overrides:
getScopeName in class SimpleScope


Copyright © 2011. All Rights Reserved.