public abstract class CloudsPlatform extends java.lang.Object implements BackgroundComponent
Constructor and Description |
---|
CloudsPlatform(com.b3dgs.lionengine.core.Media media,
int cloudWidth,
int cloudHeight,
int screenWidth,
int decY,
boolean alpha)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
render(com.b3dgs.lionengine.Graphic g)
Render component.
|
void |
setScreenWidth(int screenWidth)
Set the screen width.
|
void |
setSpeed(int line,
double speed)
Set cloud line speed (usually, line 0 is faster than last line).
|
void |
setY(int line,
int y)
Set cloud line height (usually, line 0 is higher than last line).
|
void |
update(double extrp,
int x,
int y,
double speed)
Update component.
|
public CloudsPlatform(com.b3dgs.lionengine.core.Media media, int cloudWidth, int cloudHeight, int screenWidth, int decY, boolean alpha)
media
- The clouds image media.cloudWidth
- The image width.cloudHeight
- The image height.screenWidth
- The screen height.decY
- The vertical offset.alpha
- true
if clouds surface uses alpha, false
else.public void setY(int line, int y)
line
- The cloud line (0 = top, last = bottom).y
- The cloud height.public void setSpeed(int line, double speed)
line
- The cloud line (0 = top, last = bottom).speed
- The cloud speed.public final void setScreenWidth(int screenWidth)
screenWidth
- The screen width.public void update(double extrp, int x, int y, double speed)
BackgroundComponent
update
in interface BackgroundComponent
extrp
- The extrapolation value.x
- The horizontal offset.y
- The vertical offset.speed
- The scrolling speed.public void render(com.b3dgs.lionengine.Graphic g)
BackgroundComponent
render
in interface BackgroundComponent
g
- The graphic output.