|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.b3dgs.lionengine.game.background.AbstractClouds
public abstract class AbstractClouds
This class handle clouds effect.
Field Summary | |
---|---|
protected TiledSprite |
sprite
|
Constructor Summary | |
---|---|
AbstractClouds(java.lang.String path,
int cloudWidth,
int cloudHeight,
boolean wide,
int screenWidth,
int decY)
Create a new cloud. |
Method Summary | |
---|---|
void |
render(java.awt.Graphics2D g)
Render component. |
void |
setSpeed(int line,
float 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(int x,
int y,
float speed,
float extrp)
Update component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final TiledSprite sprite
Constructor Detail |
---|
public AbstractClouds(java.lang.String path, int cloudWidth, int cloudHeight, boolean wide, int screenWidth, int decY)
path
- clouds image path.cloudWidth
- image width.cloudHeight
- image height.wide
- screen wide.screenWidth
- screen height.decY
- vertical offset.Method Detail |
---|
public void setY(int line, int y)
line
- cloud line (0 = top, last = bottom).y
- cloud height.public void setSpeed(int line, float speed)
line
- cloud line (0 = top, last = bottom).speed
- cloud speed.public void update(int x, int y, float speed, float extrp)
BackgroundComponent
update
in interface BackgroundComponent
x
- horizontal offset.y
- vertical offset.speed
- scrolling speed.extrp
- extrapolation value.public void render(java.awt.Graphics2D g)
BackgroundComponent
render
in interface BackgroundComponent
g
- graphic output.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |