|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.background.FixedBackground
public class FixedBackground
Title: FixedBackground
Description: Renders a background image that is in a fixed location of 0, 0. It does not move even if the foreground does.
Copyright: (c) 2010
Field Summary | |
---|---|
protected Animation |
animation
|
Constructor Summary | |
---|---|
FixedBackground(Animation animation)
|
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 |
setScreenSize(int width,
int height)
setScreenSize |
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 |
Field Detail |
---|
protected Animation animation
Constructor Detail |
---|
public FixedBackground(Animation animation)
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
xOffset
- intyOffset
- intpublic java.lang.String getName()
getName
in interface Updateable
public void setMapSize(MapSize mapSize)
setMapSize
in interface Background
mapSize
- intpublic void setScreenSize(int width, int height)
setScreenSize
in interface Background
width
- intheight
- intpublic 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 |