public class Body
extends java.lang.Object
| Constructor and Description |
|---|
Body(int x,
int y,
java.awt.Image body)
Constructor for body
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics g)
Used to print it to the window
|
int |
getX()
returnx x coordinate of the body
|
int |
getY()
returns y coordinate of the body
|
void |
rotate(double radians)
used to rotate it in one place
|
void |
setImage(java.awt.Image image)
sets image of the body
|
void |
shift(double x,
double y)
Used to move it to x and y
|
public Body(int x,
int y,
java.awt.Image body)
x - y - body - public void shift(double x,
double y)
x - y - public void rotate(double radians)
radians - public void draw(java.awt.Graphics g)
g - public int getX()
public int getY()
public void setImage(java.awt.Image image)
image -