public class SpritePathAnimation extends Animation implements PathObserver
Path in an Animation.HUD_LAYER| Constructor and Description |
|---|
SpritePathAnimation(Sprite sprite,
Path path) |
| Modifier and Type | Method and Description |
|---|---|
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 tickStamp)
Called periodically by this media's manager to give it a chance to do its thing.
|
addAnimationObserver, isFinished, removeAnimationObserver, reset, setLocationcontains, contains, contains, contains, fastForward, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, intersects, intersects, invalidate, queueNotification, renderCompareTo, setRenderOrder, toString, viewLocationDidChangepublic void paint(Graphics2D gfx)
AbstractMediapaint in class AbstractMediapublic void tick(long tickStamp)
AbstractMediatick in class AbstractMediatickStamp - 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 pathCancelled(Sprite sprite, Path path)
PathObserverSprite.cancelMove().pathCancelled in interface PathObserverpublic void pathCompleted(Sprite sprite, Path path, long when)
PathObserverpathCompleted 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()).Copyright © 2015. All rights reserved.