|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.ui.Sprite
public abstract class Sprite
A Sprite manages a moving visible object. You can use it for certain forms of animation. It keeps track of the location of the sprite.
| Constructor Summary | |
|---|---|
Sprite()
Construct an instance of Sprite. |
|
| Method Summary | |
|---|---|
void |
advance()
Advance the sprite to the next position, dependent on the the velocity set in setVelocity(danger.ui.Point). |
Point |
getPosition()
Get the current position of the sprite. |
Point |
getPosition(Point inPoint)
Get the current position of the sprite. |
abstract void |
paint(Pen inPen)
Paint the sprite at the current location. |
void |
setHotSpot(int inHotX,
int inHotY)
Set the hot spot for the sprite. |
void |
setHotSpot(Point inHotSpot)
Set the hot spot for the sprite. |
void |
setPosition(int inX,
int inY)
Set the position of the sprite. |
void |
setPosition(Point inPosition)
Set the position of the sprite. |
void |
setVelocity(int inVelocityH,
int inVelocityV)
Set the sprite's velocity. |
void |
setVelocity(Point inVelocity)
Set the sprite's velocity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sprite()
| Method Detail |
|---|
public void setHotSpot(Point inHotSpot)
setPosition(danger.ui.Point) and subsequently changed depending on the
sprite's velocity.
public void setHotSpot(int inHotX,
int inHotY)
setPosition(danger.ui.Point) and subsequently changed depending on the
sprite's velocity.
public void setVelocity(Point inVelocity)
advance() is called.
public void setVelocity(int inVelocityH,
int inVelocityV)
advance() is called.
public void advance()
setVelocity(danger.ui.Point).
public void setPosition(Point inPosition)
public void setPosition(int inX,
int inY)
public Point getPosition()
public Point getPosition(Point inPoint)
public abstract void paint(Pen inPen)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||