|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.AbstractMedia
com.threerings.media.animation.Animation
com.threerings.media.animation.SpriteAnimation
public class SpriteAnimation
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.media.animation.Animation |
|---|
Animation.AnimCompletedOp, Animation.AnimStartedOp |
| Field Summary | |
|---|---|
protected Path |
_path
The path along which we'll move our sprite. |
protected Sprite |
_sprite
The sprite associated with this animation. |
protected SpriteManager |
_spritemgr
The sprite manager managing our sprite. |
| Fields inherited from class com.threerings.media.animation.Animation |
|---|
_finished |
| Fields inherited from class com.threerings.media.AbstractMedia |
|---|
_bounds, _firstTick, _mgr, _observers, _renderOrder, HUD_LAYER |
| Constructor Summary | |
|---|---|
SpriteAnimation(SpriteManager spritemgr,
Sprite sprite,
Path path)
Constructs a sprite animation for the given sprite. |
|
| Method Summary | |
|---|---|
protected void |
didFinish(long tickStamp)
Called when the animation is finished and the animation manager has removed it from service. |
void |
paint(Graphics2D gfx)
Called by the appropriate manager to request that the media render itself with the given graphics context. |
void |
pathCancelled(Sprite sprite,
Path path)
Called when a sprite's path is cancelled either because a new path was started or the path was explicitly cancelled with Sprite.cancelMove(). |
void |
pathCompleted(Sprite sprite,
Path path,
long when)
Called when a sprite completes its traversal of a path. |
void |
tick(long timestamp)
Called periodically by this media's manager to give it a chance to do its thing. |
| Methods inherited from class com.threerings.media.animation.Animation |
|---|
addAnimationObserver, isFinished, removeAnimationObserver, reset, setLocation, willFinish, willStart |
| Methods inherited from class com.threerings.media.AbstractMedia |
|---|
addObserver, contains, contains, contains, contains, fastForward, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, init, intersects, intersects, invalidate, invalidateAfterChange, naturalCompareTo, queueNotification, removeObserver, renderCompareTo, setRenderOrder, shutdown, toString, toString, viewLocationDidChange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Sprite _sprite
protected SpriteManager _spritemgr
protected Path _path
| Constructor Detail |
|---|
public SpriteAnimation(SpriteManager spritemgr,
Sprite sprite,
Path path)
| Method Detail |
|---|
public void tick(long timestamp)
AbstractMedia
tick in class AbstractMediatimestamp - a time stamp associated with this tick. Note: this is not obtained
from a call to System.currentTimeMillis() and cannot be compared to timestamps
obtained there from.public void paint(Graphics2D gfx)
AbstractMedia
paint in class AbstractMedia
public void pathCancelled(Sprite sprite,
Path path)
PathObserverSprite.cancelMove().
pathCancelled in interface PathObserver
public void pathCompleted(Sprite sprite,
Path path,
long when)
PathObserver
pathCompleted in interface PathObserversprite - the sprite that completed its path.path - the path that was completed.when - the tick stamp of the media tick on which the path was completed (see
FrameManager.tick(long)) (this may not be in the same time domain as
System.currentTimeMillis()).protected void didFinish(long tickStamp)
Animation
didFinish in class Animation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||