com.b3dgs.lionengine.game.background
Class AbstractForeground

java.lang.Object
  extended by com.b3dgs.lionengine.game.background.AbstractForeground

public abstract class AbstractForeground
extends java.lang.Object

Foreground skeleton, used for future foregrounds implementation.


Field Summary
protected  BackgroundComponent[] components
          Array of components.
protected  int numberOfComponents
          Number of components.
protected  java.lang.String theme
          Foreground theme name.
protected  boolean wide
          Wide state.
 
Constructor Summary
AbstractForeground(java.lang.String theme)
          Create a new background.
 
Method Summary
protected abstract  void load()
          Load foreground ressources here, must be implemented.
 void primaryRender(java.awt.Graphics2D g)
          Foreground primary renderings (before map).
 void secondaryRender(java.awt.Graphics2D g)
          Foreground secondary renderings (after map).
 void update(float speed, int y, float extrp)
          Background updates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theme

protected final java.lang.String theme
Foreground theme name.


components

protected BackgroundComponent[] components
Array of components.


numberOfComponents

protected int numberOfComponents
Number of components.


wide

protected boolean wide
Wide state.

Constructor Detail

AbstractForeground

public AbstractForeground(java.lang.String theme)
Create a new background.

Parameters:
theme - foreground theme.
Method Detail

load

protected abstract void load()
Load foreground ressources here, must be implemented.


update

public void update(float speed,
                   int y,
                   float extrp)
Background updates.

Parameters:
speed - scrolling speed.
y - foreground y.
extrp - extrapolation value.

primaryRender

public void primaryRender(java.awt.Graphics2D g)
Foreground primary renderings (before map).

Parameters:
g - graphic output.

secondaryRender

public void secondaryRender(java.awt.Graphics2D g)
Foreground secondary renderings (after map).

Parameters:
g - graphic output.