|
|||||||||
| 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.ActorSprite.Implementation
com.threerings.tudey.client.sprite.ActorSprite.Original
com.threerings.tudey.client.sprite.ActorSprite.Moving
public static class ActorSprite.Moving
Depicts a mobile actor with optional movement animations.
| Field Summary | |
|---|---|
protected Animation |
_currentIdle
The current idle animation. |
protected Animation[] |
_idles
The resolved idle animations. |
protected float[] |
_idleWeights
The weights of the idle animations. |
protected Animation[][] |
_movements
The movement animations. |
protected Animation[][] |
_rotations
The rotation animations. |
| Fields inherited from class com.threerings.tudey.client.sprite.ActorSprite.Original |
|---|
_attachedModels, _config, _ctx, _initZ, _model, _view |
| Fields inherited from class com.threerings.expr.SimpleScope |
|---|
_parentScope |
| Fields inherited from interface com.threerings.expr.Scope |
|---|
EPOCH, NOW |
| Constructor Summary | |
|---|---|
protected |
ActorSprite.Moving(TudeyContext ctx,
Scope parentScope)
Creates a new implementation without configuring it. |
|
ActorSprite.Moving(TudeyContext ctx,
Scope parentScope,
ActorSpriteConfig.Moving config)
Creates a new implementation. |
| Method Summary | |
|---|---|
float |
getAttachedScale()
Returns a scale factor for attached models. |
protected Animation |
getBase(Mobile actor)
Returns the base animation for the actor. |
protected Animation |
getIdle()
Returns a reference to the idle animation that the sprite should be playing. |
protected Animation |
getMovement(Mobile actor)
Returns the movement animation appropriate to the actor's speed and direction, or null for none. |
protected static Animation |
getMovement(Mobile actor,
float scale,
ActorSpriteConfig.MovementSet[] sets,
Animation[][] movements)
Configures and returns the appropriate movement animation for the actor. |
protected Animation |
getRotation(Mobile actor)
Returns the rotation animation appropriate to the actor's turn rate and direction, or null for none. |
protected static Animation |
getRotation(Mobile actor,
ActorSpriteConfig.RotationSet[] sets,
Animation[][] rotations)
Configures and returns the appropriate rotation animation for the actor. |
protected static Animation |
getWeightedAnimation(Animation[] anims,
float[] weights)
Returns a weighted random animation (unless one of the animations is already playing, in which case the method will return that animation). |
protected Animation[][] |
resolve(ActorSpriteConfig.MovementSet[] sets)
Resolves the animations from an array of movement sets. |
protected Animation[][] |
resolve(ActorSpriteConfig.RotationSet[] sets)
Resolves the animations from an array of rotation sets. |
protected Animation[] |
resolve(ActorSpriteConfig.WeightedAnimation[] weighted)
Resolves an array of weighted animations. |
void |
setConfig(ActorSpriteConfig config)
(Re)configures the implementation. |
void |
update(Actor actor)
Updates the implementation with new interpolated state. |
| Methods inherited from class com.threerings.tudey.client.sprite.ActorSprite.Original |
|---|
createTooltipComponent, getFloorFlags, getFloorMask, getModelConfig, isControlled, wasCreated, willBeDestroyed |
| Methods inherited from class com.threerings.tudey.client.sprite.ActorSprite.Implementation |
|---|
clearMessages, dispatchEvent, displayMessage, 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 |
|---|
protected Animation[] _idles
protected float[] _idleWeights
protected Animation[][] _movements
protected Animation[][] _rotations
protected Animation _currentIdle
| Constructor Detail |
|---|
public ActorSprite.Moving(TudeyContext ctx,
Scope parentScope,
ActorSpriteConfig.Moving config)
protected ActorSprite.Moving(TudeyContext ctx,
Scope parentScope)
| Method Detail |
|---|
public void setConfig(ActorSpriteConfig config)
ActorSprite.Original
setConfig in class ActorSprite.Originalpublic void update(Actor actor)
ActorSprite.Implementation
update in class ActorSprite.Originalpublic float getAttachedScale()
ActorSprite.Implementation
getAttachedScale in class ActorSprite.Implementationprotected Animation[] resolve(ActorSpriteConfig.WeightedAnimation[] weighted)
protected Animation[][] resolve(ActorSpriteConfig.MovementSet[] sets)
protected Animation[][] resolve(ActorSpriteConfig.RotationSet[] sets)
protected Animation getBase(Mobile actor)
protected Animation getIdle()
protected Animation getMovement(Mobile actor)
null for none.
protected Animation getRotation(Mobile actor)
null for none.
protected static Animation getWeightedAnimation(Animation[] anims,
float[] weights)
protected static Animation getMovement(Mobile actor,
float scale,
ActorSpriteConfig.MovementSet[] sets,
Animation[][] movements)
scale - the actor scale.sets - the movement set configs.movements - the resolved movement animations.
protected static Animation getRotation(Mobile actor,
ActorSpriteConfig.RotationSet[] sets,
Animation[][] rotations)
sets - the rotation set configs.rotations - the resolved rotation animations.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||