|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.golden.gamedev.object.Background
Background where Sprites lived. A sprite is located somewhere on its background.
Field Summary | |
static Dimension |
screen
Screen resolution dimension. |
Constructor Summary | |
Background()
Creates new Background, with size and clipping area as large as screen size. |
|
Background(int w,
int h)
Creates new Background with specified size, and default clipping area (as large as screen size). |
Method Summary | |
Rectangle |
getClip()
|
static Background |
getDefaultBackground()
|
int |
getHeight()
|
int |
getWidth()
|
int |
getX()
|
int |
getY()
|
void |
move(int dx,
int dy)
|
void |
render(Graphics2D g)
|
void |
render(Graphics2D g,
int xbg,
int ybg,
int x,
int y,
int w,
int h)
|
void |
setClip(int x,
int y,
int width,
int height)
Sets background clipping area, the default is as large as screen size. |
void |
setLocation(int xs,
int ys)
|
void |
setSize(int w,
int h)
|
void |
setToCenter(int x,
int y,
int w,
int h)
|
void |
setToCenter(Sprite centered)
|
void |
update()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static Dimension screen
setClip(int, int, int, int)
Constructor Detail |
public Background(int w, int h)
public Background()
Method Detail |
public static Background getDefaultBackground()
public void setClip(int x, int y, int width, int height)
screen
public Rectangle getClip()
public int getX()
public int getY()
public int getWidth()
public int getHeight()
public void setSize(int w, int h)
public void setLocation(int xs, int ys)
public void move(int dx, int dy)
public void setToCenter(int x, int y, int w, int h)
public void setToCenter(Sprite centered)
public void update()
public void render(Graphics2D g)
public void render(Graphics2D g, int xbg, int ybg, int x, int y, int w, int h)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |