|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEvolution.Drawable
private abstract class Evolution.Drawable
Inner class for all drawable items to derive from.
Field Summary | |
---|---|
int |
id
A unique-enough id |
double |
positionX
Item's X Coordinate |
double |
positionY
Item's Y Coordinate |
int[] |
sprite
Item's sprite as an array of pixels |
Constructor Summary | |
---|---|
private |
Evolution.Drawable()
|
Method Summary | |
---|---|
void |
die()
|
void |
drawSprite()
Overload for drawSprite, using the current position and default pixel array |
void |
drawSprite(int[] image)
Overload for drawSprite, using the current position |
void |
drawSprite(int x,
int y,
int[] image)
Draw the sprite at the specified position. |
int |
getPositionX()
|
int |
getPositionY()
|
int[] |
getSprite()
Getter for the sprite (can be overridden) |
void |
setPositionX(int positionX)
|
void |
setPositionY(int positionY)
|
void |
setSprite(int[] sprite)
Setter for the sprite (can be overridden) |
void |
wipeSprite()
Overload of wipeSprite, using the default pixel arrays. |
void |
wipeSprite(int[] setImage,
int[] fromImage)
Wipe this sprite from the screen. |
void |
wrapPosition()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int id
public double positionX
public double positionY
public int[] sprite
Constructor Detail |
---|
private Evolution.Drawable()
Method Detail |
---|
public int[] getSprite()
public void setSprite(int[] sprite)
sprite
- int array of the pixels for this spritepublic void wipeSprite()
public void wipeSprite(int[] setImage, int[] fromImage)
public void drawSprite()
public void drawSprite(int[] image)
image
- public void drawSprite(int x, int y, int[] image)
x
- X Coordinatey
- Y Coordinatepublic int getPositionX()
public void setPositionX(int positionX)
public int getPositionY()
public void setPositionY(int positionY)
public void wrapPosition()
public void die()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |