|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.expr.SimpleScope
com.threerings.tudey.client.sprite.Sprite
com.threerings.tudey.client.sprite.ActorSprite
public class ActorSprite
Represents an active element of the scene.
| Nested Class Summary | |
|---|---|
static class |
ActorSprite.Acting
Depicts an active actor with activity animations. |
static class |
ActorSprite.Implementation
The actual sprite implementation. |
static class |
ActorSprite.Moving
Depicts a mobile actor with optional movement animations. |
static class |
ActorSprite.Original
Superclass of the original implementations. |
static class |
ActorSprite.StatefulEntry
Executes animations on the corresponding entry sprite. |
| Field Summary |
|---|
| Fields inherited from interface com.threerings.expr.Scope |
|---|
EPOCH, NOW |
| Constructor Summary | |
|---|---|
ActorSprite(TudeyContext ctx,
TudeySceneView view,
int timestamp,
Actor actor)
Creates a new actor sprite. |
|
| Method Summary | |
|---|---|
void |
attachModel(Model model)
Attaches a model to this sprite. |
void |
attachScaledModel(Model model)
Attaches a model to this sprite, setting its scale to the product of its current scale and an attachment scale specified by the implementation. |
void |
attachScaledModel(Model model,
float baseScale)
Attaches a model to this sprite, setting its scale to the product of the provided base scale and an attachment scale specified by the implementation. |
void |
clearMessages()
Requests that the sprite clear any chat messages being displayed. |
void |
configUpdated(ConfigEvent<ActorConfig> event)
Called when a configuration has been updated. |
Component |
createTooltipComponent(String tiptext)
Creates a tooltip component for the sprite (will only be called if Sprite.getTooltipText()
returns true). |
void |
detachModel(Model model)
Detaches a model from this sprite. |
boolean |
dispatchEvent(Event event)
Dispatches an event on the sprite. |
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. |
void |
dispose()
Releases the resources associated with this scope. |
Actor |
getActor()
Returns a reference to the actor object. |
ActorAdvancer |
getAdvancer()
Returns a reference to the advancer used to advance the state, if this is actor is controlled by the client. |
int |
getFloorFlags()
Returns the sprite's floor flags. |
int |
getFloorMask()
Returns the sprite's floor mask. |
ActorSprite.Implementation |
getImplementation()
Returns a reference to the sprite implementation. |
Model |
getModel()
Returns the model associated with the sprite (if any). |
List<Model> |
getModels()
Returns a reference to all the sprites models. |
String |
getTooltipText()
Returns the sprite's tooltip text, or null for none. |
float |
getTooltipTimeout()
Returns the sprite's tooltip timeout, or -1 to use the default. |
String |
getTooltipWindowStyle()
Returns the sprite's tooltip window style. |
boolean |
isClickable()
Determines whether the sprite is clickable. |
boolean |
isHoverable()
Determines whether the sprite is hoverable (for purposes of in-game user interaction). |
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 |
reinit(int timestamp,
Actor actor)
Reinitializes the sprite. |
void |
remove(int timestamp)
Notes that the actor has been removed. |
void |
spawnAttachedTransientModel(ConfigReference<ModelConfig> ref)
Gets and attaches a transient model to this sprite. |
Model |
spawnOffsetTransientModel(ConfigReference<ModelConfig> ref,
boolean rotate)
Spawns a transient model at a z-offset of the location of this sprite. |
Model |
spawnOffsetTransientModel(ConfigReference<ModelConfig> ref,
boolean rotate,
float offset)
Spawns a transient model at a z-offset of the location of this sprite. |
Model |
spawnTransientModel(ConfigReference<ModelConfig> ref)
Spawns a transient model at the location (translation and rotation) of this sprite. |
Model |
spawnTransientModel(ConfigReference<ModelConfig> ref,
boolean rotate)
Spawns a transient model at the location of this sprite. |
boolean |
tick(int delayedTime)
Ticks the participant. |
void |
update(int timestamp,
Actor actor)
Updates this sprite with new state. |
| Methods inherited from class com.threerings.tudey.client.sprite.Sprite |
|---|
getScopeName, setVisible |
| Methods inherited from class com.threerings.expr.SimpleScope |
|---|
addListener, get, getParentScope, removeListener, scopeUpdated |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActorSprite(TudeyContext ctx,
TudeySceneView view,
int timestamp,
Actor actor)
| Method Detail |
|---|
public void reinit(int timestamp,
Actor actor)
public ActorAdvancer getAdvancer()
public List<Model> getModels()
public ActorSprite.Implementation getImplementation()
public void attachScaledModel(Model model)
public void attachScaledModel(Model model,
float baseScale)
public void attachModel(Model model)
public void detachModel(Model model)
public void spawnAttachedTransientModel(ConfigReference<ModelConfig> ref)
public Model spawnTransientModel(ConfigReference<ModelConfig> ref)
public Model spawnTransientModel(ConfigReference<ModelConfig> ref,
boolean rotate)
rotate - if true, match the rotation as well as the translation of the sprite.
public Model spawnOffsetTransientModel(ConfigReference<ModelConfig> ref,
boolean rotate)
rotate - if true, match the rotation as well as the translation of the sprite.
public void update(int timestamp,
Actor actor)
public void remove(int timestamp)
public void occupantEntered(TudeyOccupantInfo info)
public void occupantLeft(TudeyOccupantInfo info)
public void occupantUpdated(TudeyOccupantInfo oinfo,
TudeyOccupantInfo ninfo)
public boolean displayMessage(com.threerings.crowd.chat.data.UserMessage msg,
boolean alreadyDisplayed)
public void clearMessages()
public boolean tick(int delayedTime)
TudeySceneView.TickParticipant
tick in interface TudeySceneView.TickParticipantdelayedTime - the current delayed client time.
public void configUpdated(ConfigEvent<ActorConfig> event)
ConfigUpdateListener
configUpdated in interface ConfigUpdateListener<ActorConfig>public Actor getActor()
HasActor
getActor in interface HasActorpublic Model getModel()
Sprite
getModel in class Spritepublic int getFloorFlags()
Sprite
getFloorFlags in class Spritepublic int getFloorMask()
Sprite
getFloorMask in class Spritepublic boolean isHoverable()
Sprite
isHoverable in class Spritepublic boolean isClickable()
Sprite
isClickable in class Spritepublic String getTooltipText()
Spritenull for none.
getTooltipText in class Spritepublic float getTooltipTimeout()
Sprite
getTooltipTimeout in class Spritepublic String getTooltipWindowStyle()
Sprite
getTooltipWindowStyle in class Spritepublic Component createTooltipComponent(String tiptext)
SpriteSprite.getTooltipText()
returns true).
createTooltipComponent in class Spritepublic boolean dispatchEvent(Event event)
Sprite
dispatchEvent in class Spritepublic void dispose()
SimpleScope
dispose in class SimpleScope
public Model spawnOffsetTransientModel(ConfigReference<ModelConfig> ref,
boolean rotate,
float offset)
rotate - if true, match the rotation as well as the translation of the sprite.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||