|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.graphics.Sprite
Constructor Summary | |
Sprite(Animation anim)
Creates a new Sprite object with the specified Animation. |
Method Summary | |
java.lang.Object |
clone()
Clones this Sprite. |
int |
getHeight()
Gets this Sprite's height, based on the size of the current image. |
java.awt.Image |
getImage()
Gets this Sprite's current image. |
float |
getVelocityX()
Gets the horizontal velocity of this Sprite in pixels per millisecond. |
float |
getVelocityY()
Gets the vertical velocity of this Sprite in pixels per millisecond. |
int |
getWidth()
Gets this Sprite's width, based on the size of the current image. |
float |
getX()
Gets this Sprite's current x position. |
float |
getY()
Gets this Sprite's current y position. |
void |
setVelocityX(float dx)
Sets the horizontal velocity of this Sprite in pixels per millisecond. |
void |
setVelocityY(float dy)
Sets the vertical velocity of this Sprite in pixels per millisecond. |
void |
setX(float x)
Sets this Sprite's current x position. |
void |
setY(float y)
Sets this Sprite's current y position. |
void |
update(long elapsedTime)
Updates this Sprite's Animation and its position based on the velocity. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Sprite(Animation anim)
Method Detail |
public void update(long elapsedTime)
public float getX()
public float getY()
public void setX(float x)
public void setY(float y)
public int getWidth()
public int getHeight()
public float getVelocityX()
public float getVelocityY()
public void setVelocityX(float dx)
public void setVelocityY(float dy)
public java.awt.Image getImage()
public java.lang.Object clone()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |