com.b3dgs.lionengine.game.background
Class BackgroundElement

java.lang.Object
  extended by com.b3dgs.lionengine.game.background.BackgroundElement
Direct Known Subclasses:
AbstractRasteredBackgroundElement

public class BackgroundElement
extends java.lang.Object

Represents a background element (contained in a background component).


Constructor Summary
BackgroundElement(int mainX, int mainY, Renderable sprite)
          Create a new background element.
 
Method Summary
 int getMainX()
          Get main location x.
 int getMainY()
          Get main location y.
 float getOffsetX()
          Get horizontal offset.
 float getOffsetY()
          Get vertical offset.
 Renderable getSprite()
          Get sprite reference.
 void setOffsetX(float offsetX)
          Set horizontal offset value.
 void setOffsetY(float offsetY)
          Set vertical offset value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackgroundElement

public BackgroundElement(int mainX,
                         int mainY,
                         Renderable sprite)
Create a new background element.

Parameters:
mainX - main location x.
mainY - main location y.
sprite - element sprite.
Method Detail

getSprite

public Renderable getSprite()
Get sprite reference.

Returns:
sprite reference.

getMainX

public int getMainX()
Get main location x.

Returns:
main location x.

getMainY

public int getMainY()
Get main location y.

Returns:
main location y.

getOffsetX

public float getOffsetX()
Get horizontal offset.

Returns:
horizontal offset.

getOffsetY

public float getOffsetY()
Get vertical offset.

Returns:
vertical offset.

setOffsetX

public void setOffsetX(float offsetX)
Set horizontal offset value.

Parameters:
offsetX - horizontal offset value.

setOffsetY

public void setOffsetY(float offsetY)
Set vertical offset value.

Parameters:
offsetY - vertical offset value.