public class Background extends UiComponent
| Modifier and Type | Field | Description |
|---|---|---|
private double |
speedX |
background, font, foreground, highlighted| Constructor | Description |
|---|---|
Background(double x,
double y,
double w,
double h,
Texture texture) |
Konstruiert neuen statischen Background.
|
Background(double x,
double y,
double w,
double h,
Texture texture,
double speedX) |
Konstruiert neuen bewegten Background.
|
| Modifier and Type | Method | Description |
|---|---|---|
double |
getSpeedX() |
|
void |
render(SimpleGraphics graphics) |
Methode für Render-Code.
|
void |
setSpeedX(double speedX) |
Setzt die Horizontale Geschwindigkeit dieses Backgrounds.
|
void |
update(double deltaTime,
InputHandler input) |
Methode für Update-Code.
|
collides, getH, getTexture, getW, getX, getY, isPointInside, move, resize, setH, setLocation, setSize, setTexture, setW, setX, setYclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBackground, getFont, getForeground, isHighlighted, setBackground, setFont, setForegroundpublic Background(double x,
double y,
double w,
double h,
Texture texture)
x - Horizontale Position in Pixelny - Vertikale Position in Pixelnw - Horizontale Größe in Pixelnh - Vertikale Größe in Pixelntexture - Textur dieses Backgroundspublic Background(double x,
double y,
double w,
double h,
Texture texture,
double speedX)
x - Horizontale Position in Pixelny - Vertikale Position in Pixelnw - Horizontale Größe in Pixelnh - Vertikale Größe in Pixelntexture - Textur dieses BackgroundsspeedX - Horizontale Geschwindigkeit dieses Backgrounds in Pixeln pro Sekundepublic void update(double deltaTime,
InputHandler input)
Entityupdate in class UiComponentdeltaTime - Zeit seit dem letzten Update in Sekundeninput - Schnittstelle für Inputpublic void render(SimpleGraphics graphics)
Entityrender in class UiComponentgraphics - Schnittstelle für Renderingpublic double getSpeedX()
public void setSpeedX(double speedX)
speedX - Horizontale Geschwindigkeit in Pixeln pro Sekunde