public class Parallax extends Object implements BackgroundComponent
Constructor and Description |
---|
Parallax(com.b3dgs.lionengine.Resolution source,
com.b3dgs.lionengine.core.Media media,
int parallaxsNumber,
int decX,
int decY,
int sx,
int sy)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
render(com.b3dgs.lionengine.Graphic g)
Render component.
|
void |
setScreenSize(int screenWidth,
int screenHeight)
Set the screen size.
|
void |
update(double extrp,
int x,
int y,
double speed)
Update component.
|
public Parallax(com.b3dgs.lionengine.Resolution source, com.b3dgs.lionengine.core.Media media, int parallaxsNumber, int decX, int decY, int sx, int sy)
source
- The resolution source used.media
- The parallax image media.parallaxsNumber
- The number parallax lines.decX
- The horizontal offset.decY
- The vertical offset.sx
- The starting width.sy
- The starting height.public final void setScreenSize(int screenWidth, int screenHeight)
screenWidth
- The screen width.screenHeight
- The screen height.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.Copyright © 2014 Byron 3D Games Studio. All rights reserved.