public class OrientableImageSprite extends ImageSprite
DEFAULT_FRAME_RATE, MOVEMENT_CUED, NO_ANIMATION, TIME_BASED, TIME_SEQUENTIALHUD_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 |
|---|
OrientableImageSprite()
Creates a new orientable image sprite.
|
OrientableImageSprite(Mirage image)
Creates a new orientable image sprite.
|
OrientableImageSprite(MultiFrameImage frames)
Creates a new orientable image sprite.
|
| Modifier and Type | Method and Description |
|---|---|
void |
paint(Graphics2D graphics)
Called by the appropriate manager to request that the media render itself with the given
graphics context.
|
void |
setOrientation(int orient)
Sprites have an orientation in one of the eight cardinal directions:
DirectionCodes.NORTH, DirectionCodes.NORTHEAST, etc. |
hitTest, layout, setAnimationMode, setFrameRate, setFrames, setMirage, tickaddSpriteObserver, cancelMove, contains, fastForward, getHeight, getOrientation, getPath, getWidth, getX, getXOffset, getY, getYOffset, inside, intersects, isMoving, move, paintPath, pathBeginning, pathCompleted, removeSpriteObserver, setLocation, viewLocationDidChangecontains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, intersects, intersects, invalidate, queueNotification, renderCompareTo, setRenderOrder, toStringpublic OrientableImageSprite()
public OrientableImageSprite(Mirage image)
image - the image to renderpublic OrientableImageSprite(MultiFrameImage frames)
frames - the frames to renderpublic void setOrientation(int orient)
SpriteDirectionCodes.NORTH, DirectionCodes.NORTHEAST, etc. Derived classes can
choose to override this member function and select a different set of images based on their
orientation, or they can ignore the orientation information.setOrientation in interface PathablesetOrientation in class SpriteDirectionCodespublic void paint(Graphics2D graphics)
AbstractMediapaint in class ImageSpriteCopyright © 2015. All rights reserved.