public class AnimationSprite extends Sprite
HUD_LAYERCARDINAL_DIRECTIONS, CCW, CW, DIRECTION_COUNT, DOWN, EAST, EASTNORTHEAST, EASTSOUTHEAST, FINE_DIRECTION_COUNT, HORIZONTAL, LEFT, NONE, NORTH, NORTHEAST, NORTHNORTHEAST, NORTHNORTHWEST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHSOUTHEAST, SOUTHSOUTHWEST, SOUTHWEST, UP, VERTICAL, WEST, WESTNORTHWEST, WESTSOUTHWEST| Constructor and Description |
|---|
AnimationSprite(Animation anim,
MediaPanel owner) |
| Modifier and Type | Method and Description |
|---|---|
void |
init()
Called when the media has had its manager set.
|
void |
paint(Graphics2D gfx)
Called by the appropriate manager to request that the media render itself with the given
graphics context.
|
void |
setLocation(int x,
int y)
Set the location.
|
void |
tick(long tickStamp)
Called periodically by this media's manager to give it a chance to do its thing.
|
void |
willStart(long tickStamp)
Prior to the first call to
AbstractMedia.tick(long) on an abstract media, this method is called by the
AbstractMediaManager. |
addSpriteObserver, cancelMove, contains, fastForward, getHeight, getOrientation, getPath, getWidth, getX, getXOffset, getY, getYOffset, hitTest, inside, intersects, isMoving, move, paintPath, pathBeginning, pathCompleted, removeSpriteObserver, setOrientation, viewLocationDidChangecontains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, intersects, intersects, invalidate, queueNotification, renderCompareTo, setRenderOrder, toStringpublic AnimationSprite(Animation anim, MediaPanel owner)
public void init()
AbstractMediasuper.init().public void tick(long tickStamp)
AbstractMediatick in class SpritetickStamp - 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 setLocation(int x,
int y)
AbstractMediasetLocation in interface PathablesetLocation in class Spritepublic void willStart(long tickStamp)
AbstractMediaAbstractMedia.tick(long) on an abstract media, this method is called by the
AbstractMediaManager. It is called during the normal tick cycle, immediately prior
to the first call to AbstractMedia.tick(long).
Note: It is imperative that super.willStart() is called by any
entity that overrides this method because the AbstractMediaManager depends on the
setting of the AbstractMedia._firstTick value to know whether or not to call this method.
public void paint(Graphics2D gfx)
AbstractMediaCopyright © 2015. All rights reserved.