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, setY
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBackground, getFont, getForeground, isHighlighted, setBackground, setFont, setForeground
public 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)
Entity
update
in class UiComponent
deltaTime
- Zeit seit dem letzten Update in Sekundeninput
- Schnittstelle für Inputpublic void render(SimpleGraphics graphics)
Entity
render
in class UiComponent
graphics
- Schnittstelle für Renderingpublic double getSpeedX()
public void setSpeedX(double speedX)
speedX
- Horizontale Geschwindigkeit in Pixeln pro Sekunde