|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.background.PanSpeedBackground
public class PanSpeedBackground
Title: PanSpeedBackground
Description: Pan the background image at the specified speed, tiling the image when needed, accress the length of the map.
Copyright: (c) 2010
Constructor Summary | |
---|---|
PanSpeedBackground(Animation animation)
|
Method Summary | |
---|---|
void |
addAnimation(Animation animation)
|
void |
draw(java.awt.Graphics2D graphics,
int xOffset,
int yOffset)
Draws the back ground based on the current offset of the map, and the Backgrounds equation for calculating its position. |
java.lang.String |
getName()
|
void |
setMapSize(MapSize mapSize)
Also sets the dividend for calculating the scroll position. |
void |
setScreenSize(int width,
int height)
Also sets the dividend for calculating the scroll position. |
void |
update(long elapseTime)
This method takes the elapse time, and calculates the new current frame of the animation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PanSpeedBackground(Animation animation)
Method Detail |
---|
public void draw(java.awt.Graphics2D graphics, int xOffset, int yOffset)
Background
draw
in interface Background
graphics
- xOffset
- intyOffset
- intpublic void addAnimation(Animation animation)
addAnimation
in interface Background
public void setMapSize(MapSize mapSize)
setMapSize
in interface Background
mapSize
- intpublic void setScreenSize(int width, int height)
setScreenSize
in interface Background
width
- intheight
- intpublic java.lang.String getName()
getName
in interface Updateable
public void update(long elapseTime)
Updateable
update
in interface Updateable
elapseTime
- long
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |