|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.background.ScrollBackground
public class ScrollBackground
Title: ScrollBackground
Description: Scroll the background image at the specified speed, tiling the image when needed. The image scrolls at a constant speed.
Copyright: (c) 2010
Constructor Summary | |
---|---|
ScrollBackground(Animation animation)
|
|
ScrollBackground(Animation animation,
GameVector direction)
|
Method Summary | |
---|---|
void |
addAnimation(Animation animation)
|
void |
draw(java.awt.Graphics2D graphics,
int xOffset,
int yOffset)
drawBackground |
java.lang.String |
getName()
|
void |
setMapSize(MapSize mapSize)
setMapSize |
void |
setName(java.lang.String name)
|
void |
setScreenSize(int width,
int height)
setScreenSize |
void |
update(long elapseTime)
update This updates the scroll position of the background image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScrollBackground(Animation animation)
public ScrollBackground(Animation animation, GameVector direction)
backgroundImage
- direction
- Method Detail |
---|
public void addAnimation(Animation animation)
addAnimation
in interface Background
public void draw(java.awt.Graphics2D graphics, int xOffset, int yOffset)
draw
in interface Background
graphics
- xOffset
- intyOffset
- intpublic java.lang.String getName()
getName
in interface Updateable
public void setScreenSize(int width, int height)
setScreenSize
in interface Background
width
- intheight
- intpublic void setMapSize(MapSize mapSize)
setMapSize
in interface Background
mapSize
- intpublic void setName(java.lang.String name)
public void update(long elapseTime)
update
in interface Updateable
elapseTime
- long
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |